The WSDL style has two possible options: RPC and Document. (If neither is specified, it defaults to "document".) This attribute refers to the SOAP message style -- whether the SOAP Body contains a document defined by a schema or whether the Body is constructed dynamically based on the method name and a set of parameter types. WSDL has another attribute, "use", which indicates whether the message structure is defined by a schema (use="literal") or generated using the SOAP encoding data model (use="encoded"). Valid combinations of these two attributes include document/literal, rpc/literal, and rpc/encoded.
The WSDD style has four options: RPC, WRAPPED, DOCUMENT, MESSAGE. If no style is specified, it defaults to "RPC".) This style attribute encompasses both message style and programming style. There are three types of programming style:
- a parameterized invocation API (XML parameters are mapped to individual Java classes):
return method(arg1, arg2)
- an object-based invocation API (XML parameters are collectively mapped to a bean):
return method (object)
- a messaging API (XML messages are mapped to DOM):Document method(Document)
RPC produces rpc/encoded with a parameterized API (you can use the "use" attribute to specify that you want rpc/literal)
WRAPPED produces document/literal with a parameterized API
DOCUMENT produces document/literal with an object-based API
MESSAGE produces document/literal with a messaging API
For more information on the WRAPPED style, see my blog:
http://atmanes.blogspot.com/2005/03/wrapped-documentliteral-convention.html
Anne
On 2/8/06,
Yu-Hui Jin <[EMAIL PROTECTED]> wrote:
Hi,
Anyone can help me to understand the "style" element better. (well, or pointing me to some good articles on it?)
Here's what's puzzling me:
In Axis1.x user guide, it says the "service" element can have a "style" attribute. I also see under the "wsdl:binding" element, both "soap:binding" and "soap:operation" elements can have a "style" attribute as well. I've got a few questions:
- do they have the same meaning and one will overide the other?
- when do I select "rpc" and "document" for my WSDL? It seems "document" is suggested for Axis 1.x, is it still a better choice for Axis2?
thanks,
-Hui
