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.