Which type WDSL style should you use ?

Really good article on the the difference in style of WSDL files :

http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/
(http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.wst.wsdl.u...)

There are 4 types of WSDL style you can use :

- RPC/encoded
- RPC/Literal
- Document/Encoded (this is generally not used any more)
- Document/Literal

And within Eclipse IDE you are given 3 options for the SOAP Binding Options when you create a WSDL file:

document literal.

Document style messages, literal encoding. Use this style of binding when you want to send SOAP messages that can be validated by an XML validator. All the data types in the SOAP message body are defined in a schema, so the WSDL parts must point to schema elements.

rpc literal.

RPC style messages, literal encoding. Use this style of binding when you want to specify the operation method names in your SOAP messages so a server can dispatch the specified methods. Data types must be defined, so the WSDL parts must point to XSD types.

rpc encoded.

RPC style messages and SOAP encoding. Use this style of binding when you want to encode data graphs in your SOAP messages so a server can deserialize the object data. Data types must be defined, so the WSDL parts must point to XSD types.

These are ALL WS-I compliant; generally the various web services specifications are sometimes inconsistent and unclear. The WS-I organization was formed to clear up the issues with the specs. It has defined a number of profiles which dictate how you should write your web services to be interoperable.

Generally 'Document Literal' seems to the best and preferred approach for the following reasons below (though there maybe reasons why you could use the other style .i.e to serial graph data objects) :

1. There is no type encoding info.
2. Everything that appears in the soap:body is defined by the schema, so you can easily validate this message.
3. Once again, you have the method name in the SOAP message.
4. Document/literal is WS-I compliant, and the wrapped pattern meets the WS-I restriction that the SOAP message's soap:body has only one child.




Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. The supported tag styles are: <foo>, [foo].

More information about formatting options

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.
Bg