Forums Register Login

WSDL: Is use=encoded alowed?

+Pie Number of slices to send: Send
Hello All,

What are the values for the use attribe in WSDL? I thought that only literal is allowed. MK (chapter 4) shows a WSDL for EJB endpoint with the following binding section:

<binding name="TimeServiceBinding" type="tns:TimeService">
<operation name="getDateTime">
<input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="encoded" namespace="urn racle-ws"/>
</input>
<output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="encoded" namespace="urn racle-ws"/>
</output>
<soap peration soapAction=""/>
</operation>
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
</binding>

Notice: use="encoded"

Is this allowed by Basic Profile or SOAP spec. ? I thought that RPC-literal and Document-literal were the only message types allowed. Could anyone clarify this please?

Thanks in advance.

-Saha
+Pie Number of slices to send: Send
Basic Profile 1.0 only allows "literal" 4.1.7 SOAP encodingStyle Attribute

encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded"

refers to the infamous SOAP section 5 SOAP Encoding which lead to all sorts of interoperability problems.
+Pie Number of slices to send: Send
Hello Peer and All,

So this is saying that the EJB service interface is not conforming to the Basic Profile since it uses: use = "encoded" in the MK example I sited above.
I guess this is okay since the Basic Profile is just a recommendation.

Is my thinking correct about this?

-Saha
+Pie Number of slices to send: Send
can you use encoded style ? yes
can you use encoded style according to BP? no

If you dont use use="literal" you may have problems communicating between heterogenous systems..
+Pie Number of slices to send: Send
 

Originally posted by Saha Kumar:
I guess this is okay since the Basic Profile is just a recommendation.




This document defines the WS-I Basic Profile 1.0, consisting of a set of non-proprietary Web services specifications, along with clarifications and amendments to those specifications which promote interoperability.



Ignoring the Basic Profile is a "do at your own risk" proposition. Before BP it was quite common that .NET, Java, Perl (etc.) systems couldn't talk to one another even when they had web service interfaces. They were using interoperable technologies but in an incompatible manner. Either they were using differing interpretations of the SOAP encoding standard or required platform specific (de-)serializers - totally eliminating the potential benefits of using web services.

"WSDL-first" is another practice the encourages interoperability. By designing the XML-Document to be exchanged first (for a document-literal web service) you don't include any platform-centric "data structures" in your messages that may be difficult to consume by your web services client.

3.4.1 Designing the Interface
Patterns and Strategies for Building Document-Based Web Services
+Pie Number of slices to send: Send
The reason why the encoded encodingStyle exists is because the SOAP specification has been released before the XML schema specification, and thus, they needed a way to encode data structures using a SOAP-specific way. There is no need for that encodingStyle anymore since the literal style suits pretty much all needs.
+Pie Number of slices to send: Send
Thanks for the helpful replies and great discussion. This answers my question.

-Saha
Do you pee on your compost? Does this tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 4810 times.
Similar Threads
Problem with arrays of primitive types
Soap & attachments: encoded or literal??
reading soap-envelop messages
error when generating WS Client code using wsdl
java SOAP client " : hat is "QName qname" value ?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 18, 2024 20:18:23.