Win a copy of Getting started with Java on the Raspberry Pi this week in the Raspberry Pi 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Liutauras Vilda
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Piet Souris

Question on WSDL

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes it can. Document-style web services can use both one-way and two-way (request-response).
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
     
    Greenhorn
    Posts: 14
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Thank you so much for your explanation.

    Lakshmi
     
    If you live in a cold climate and on the grid, incandescent light can use less energy than LED. Tiny ad:
    Low Tech Laboratory
    https://www.kickstarter.com/projects/paulwheaton/low-tech-0
    reply
      Bookmark Topic Watch Topic
    • New Topic