Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

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!
 
I'm all tasted up for a BLT! This tiny ad wants a monte cristo!
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic