You need to determine the best encoding style, parameter style, and use values for your web service.
Check out the discussion below for advantages and disadvantages of the different combinations.
A web service definition is mapped to a WSDL binding in order to indicate the transport mechanism used to communicate with the service. Consider the following WSDL binding:
<binding name="CartEJBPortBinding" type="tns:CartEJB"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"> </soap:binding> <operation name="getVersion"> <soap:operation soapAction=""></soap:operation> <input> <soap:body use="literal"></soap:body> </input> <output> <soap:body use="literal"></soap:body> </output> </operation> </binding>
There are three items at work here, two of which are explicit and one that is implicit:
The SOAP binding style (“document”)
The SOAP binding use (“literal”)
The SOAP binding parameter Style (“wrapped”)
The two explicit items are style and use. They are specified in
soap:binding style attribute and
respectively. We’ll talk about parameter style in a moment.
soap:binding element’s style attribute can have the value of “rpc” or “document”. A value of “rpc” indicates that you want to use SOAP messages containing parameters and return values. In this way, your web service will mimic an RMI call. A value of “document” indicates you want your SOAP messages to use ...