• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Document Style Web Service Message Definitions

 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good Day,

Ivan said the following -

Example of a message defined to be used with a document style web service. Note that a <part>
element inside a <message> element declares an element attribute.


Thus, a <part> element inside a <message> may declare a type attribute or an element attribute.
- When the <message> is to be used with an RPC web service, use the type attribute.
- When the <message> is to be used with a document style web service, use the element
attribute.
With document style web services, the BP mandates that each message have zero or one part.



I'm not clear why we can't use type instead of element in this case.



Regards,
Dan
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
A quick recap of what the WS-I BP 1.1 has to say about message definitions in Document/Literal and RPC/Literal bindings:


R2203 An rpc-literal binding in a DESCRIPTION MUST refer, in its soapbind:body element(s), only to wsdl:part element(s) that have been defined using the type attribute.



R2204 A document-literal binding in a DESCRIPTION MUST refer, in each of its soapbind:body element(s), only to wsdl:part element(s) that have been defined using the element attribute.


The WS-I BP 1.1, section 4.4.1, also contains a motivation for the above rules.
Briefly, the reason is because of a part defined using the type attribute cannot be nillable and must occur exactly once. This makes sense with RPC-type operations - the usually have a fixed number of parameters that always need to be present. Admitted, object references in method calls can be null, but it feels like an exception to me more than a rule.
Hope this sheds some light!
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Beautiful explanation - thanks a lot Ivan.
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ivan,

In the decorated WSDL document in the study guide you have an rpc styled document. Type is used in the two messages but the fault is an element. Is it correct?



Regards,
Dan
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
So it seems:
http://www.ws-i.org/Profiles/BasicProfile-1.1.html#Bindings_and_Faults
Best wishes!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic