June 5, 2009

WSDL Styles

There are 5 types of WSDL styles.
  • RPC/Literal
  • RPC/Encoded
  • Document/Literal
  • Document/Encoded
  • Document Literal Wrapped Mode
Irrespective of the style differences, it can be applied to any technology.




WSDL Styles

Advantage

Disadvantage

RPC/Encoded

The WSDL is simple and straightforward

The operation name appears in the message, so the receiver has an easy time dispatching this message to the implementation of the operation.

The type encoding info (such as xsi:type="xsd:int") is usually just overhead which degrades throughput performance.

Message cannot be easily validated as very few lines contain things defined in a schema; the rest of the soap:body contents comes from WSDL definition

RPC/encoded is not WS-I compliant.

RPC/Literal

The WSDL is still simple and straightforward

The operation name still appears in the message.

The type encoding info is eliminated.

RPC/literal is WS-I compliant.

Message cannot be easily validated as very few lines contain things defined in a schema; the rest of the soap:body contents comes from WSDL definition

Document/Encoded

NIL

Nobody follows this style. It is not WS-I compliant

Dcoument/Literal

There is no type encoding info.

Message can be validated with any XML validator. Everything within the soap:body is defined in a schema.

Document/literal is WS-I compliant,

The WSDL is getting a bit more complicated.It is not easily understood by humans

The operation name in the
SOAP message is lost. Without the name, dispatching can be difficult, and sometimes impossible.

WS-I only allows one child of the soap:body in a
SOAP message.

Document/Literal Wrapped Mode

There is no type encoding info.

Everything that appears in the soap:body is defined by the schema,
Message can be validated with any XML validator.

Once again, you have the method name in the
SOAP message.

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.

The WSDL is even more complicated.

Reference: http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/

No comments: