Java Reference
In-Depth Information
Choosing Encoding, Use, and Parameter Styles
Problem
You need to determine the best encoding style, parameter style, and use values for your web
service.
Solution
Check out the discussion below for advantages and disadvantages of the different combina-
tions.
Discussion
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 the soap:binding style attrib-
ute and the soap:body use attribute, respectively. We'll talk about parameter style in a mo-
ment.
Search WWH ::




Custom Search