• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question on WSDL  RSS feed

 
Lakshmi Pavani Kalidindi
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could WSDL document (with Document as messaging style) have both input and output messages?.If it is Yes, then why we call Document style messaging is
One - Way messaging?.

Thanks for your help,
Lakshmi
 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes it can. Document-style web services can use both one-way and two-way (request-response).
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Lakshmi Pavani Kalidindi:
then why we call Document style messaging is One - Way messaging?.


Document Style isn't one-way messaging - they represent two different concepts. "Document" is a messaging style ("Document/literal" is a mode of messaging), "One-way" is a message exchange pattern (MEP).

Message Exchange Patterns (MEP):
  • Request/Response
  • One-Way
  • Notification
  • Solicit Response


  • HTTP is a Request/Response protocol - so SOAP over HTTP can only directly support the "Request/Response" and "One-way" MEPs. In the case of "One-way" the HTTP response simply carries an HTTP status code but no SOAP response. For the other two you have to employ workarounds or additional protocols like WS-Addressing.

    Messaging Styles:
  • RPC
  • Document


  • The most obvious distinction between the two is that document messaging doesn't support the concept of "operations". You are submitting a document to the web service endpoint. The web service determines its actions based on the "type" (and/or contents) of the document. RPC also has additional rules about how an RPC call is mapped to an RPC message.

    Both Document and RPC have an "operation" in the "portType" and the "binding" sections of the WSDL. However only RPC style messages actually have an element with the name of the operation as the root of the SOAP message payload. In document style the document itself is the SOAP message payload - the operation name doesn't appear anywhere.

    For an example see here.

    WSDL "message" elements involved in a document style binding may at most have one "part" element as document messages can only contain one single document.

    Most WSDL-to-Code generators will use the operation name listed in the WSDL in the code that is generated from the WSDL even for document style bindings (where the operation name doesn't appear in the message). However you cannot use the same document type as a parameter for two operations in a web service interface that will use a document style binding (remember, the document style message won't carry the operation name to differentiate between the two).

    The following two methods cannot appear in the same web service interface if document style binding is used:


    The parameters have to be of different document types:


    BTW: submitPO would use the "One-Way" MEP - no SOAP response is returned. revisePO would use the "Request/Response" MEP.
     
    Lakshmi Kalidindi
    Greenhorn
    Posts: 14
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thank you so much for your explanation.

    Lakshmi
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!