Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WSDL: Is use=encoded alowed?

 
Saha Kumar
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Saha Kumar
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Rizwan Mohammad
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Saha Kumar
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the helpful replies and great discussion. This answers my question.

-Saha
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic