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 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 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 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