• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

WSDL: Is use=encoded alowed?

 
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the helpful replies and great discussion. This answers my question.

-Saha
reply
    Bookmark Topic Watch Topic
  • New Topic