This week's book giveaway is in the Java in General forum.
We're giving away four copies of Event Streams in Action and have Alexander Dean & Valentin Crettaz on-line!
See this thread for details.
Win a copy of Event Streams in Action this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Document Style Web Service Message Definitions

 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
Beautiful explanation - thanks a lot Ivan.
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Hi!
So it seems:
http://www.ws-i.org/Profiles/BasicProfile-1.1.html#Bindings_and_Faults
Best wishes!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!