Which style of WSDL should I use? (reship)
RPC/literal
The RPC/literal WSDL for this method looks almost the same as the RPC/encoded WSDL (see Listing 4). The use in the binding is changed from encoded to literal. That’s it.
Listing 4. RPC/literal WSDL for myMethod
<message name="myMethodRequest">
<part name="x" type="xsd:int"/>
<part name="y" type="xsd:float"/>
</message>
<message name="empty"/>
<portType name="PT">
<operation name="myMethod">
<input message="myMethodRequest"/>
<output message="empty"/>
</operation>
</portType>
<binding .../>
<!-- I won't bother with the details, just assume it's RPC/literal. -->
|
What about the SOAP message for RPC/literal (see Listing 5)? Here there is a bit more of a change. The type encodings have been removed.
Listing 5. RPC/literal SOAP message for myMethod
<soap:envelope>
<soap:body>
<myMethod>
<x>5</x>
<y>5.0</y>
</myMethod>
</soap:body>
</soap:envelope>
|
Here are the strengths and weaknesses of this approach:
Strengths
- The WSDL is still about as straightforward as it is possible for WSDL to be.
- The operation name still appears in the message.
- The type encoding info is eliminated.
- RPC/literal is WS-I compliant.
Weaknesses
- You still cannot easily validate this message since only the
<x ...>5</x>and<y ...>5.0</y>lines contain things defined in a schema; the rest of thesoap:bodycontents comes from WSDL definitions.
What about the document styles? Do they help overcome this weakness?
Pages: previous pagenext page
By javafuns on July 7, 2009 at 16:40 ·
Views: 572 · Permalink
Categorized in: SOA · Tagged with: schema, SOAP, UDDI, Webservice, WSDL, XML
Categorized in: SOA · Tagged with: schema, SOAP, UDDI, Webservice, WSDL, XML


(