Reading a WSDL

A WebService emerges from a number of layers

Spray vs Splash

Spray is a WebServices implementation and understands SOAP, WSDL and XMLSchema.

Splash is a SOAP only implementation, and the user must determine the interface of a service from its WSDL or documentation.

Reading a WSDL

wsdl

The WSDL above contains two operations. The "Multiply" operation is RPC/Encoded, and the "Add" operation is Doc/Literal.

Style Difference

style="rpc"

env

style="document"

env

In document style any number of documents can be placed under the SOAP-ENV:Body node. RPC style is a special case of document style. There is only one child of SOAP-ENV:Body, and that child is the RPC Wrapper element.

The RPC Wrapper element is defined by the SOAP specification in the RPC section (Section 7 in the SOAP1.1 specification). It contains contains a method signature; method name and namespace as well as a number of parameters.

Many .NET services use the document style to describe soap envelopes that look like they contain a RPC Wrapper element

Encoding Difference

A WSDL which defines an operation with use="encoded" and encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", is stating that the xml has been encoded using Soap encoding, which is a set of rules (Section 5 in the SOAP1.1 specification) for serializing an object graph to XML.

When use="literal" the xml can be validated using a schema. XMLSchema is a specification for describing xml documents, which is a much broader in scope than simply describing xml documents that represent data structures.

Steve Waring