6.4.1 WSDL types

<types>

<s:schema

attributeFormDefault="qualified" elementFormDefault="qualified"

targetNamespace="http://manning.com/dotnet/webservices"><s:element name="Greet"> <s:complexType> <s:sequence> <s:element

minOccurs="1" maxOccurs="1" name="name" nillable="true" type="s:string" /> </s:sequence> </s:complexType> </s:element>

<s:element name="GreetResponse"> <s:complexType> <s:sequence> <s:element

minOccurs="1" maxOccurs="1" name="GreetResult" nillable="true" type="s:string" /> </s:sequence> </s:complexType> </s:element>

<s:element name="string" nillable="true" type="s:string" /> </s:schema> </types>

WSDL supports a rich set of common types in accordance with the draft standard for the XML Schema Definition Language. These include signed and unsigned integer and floating-point types, boolean and string types, and arrays of same. The SOAP version of a service supports the serialization of complex types built from these underlying simple types.

A message can be compared to an envelope containing information moving from a source to a destination. In our example, HelloService1 defines a single Greet method which, when called, responds by returning a result. Both the call and the response are messages. Therefore the round-trip involves two messages. The generated WSDL specifies support for three protocols:

HttpGetUses HTTP GET to invoke service. See listing 6.2 for a sample client.

HttpPostUses HTTP POST to invoke the service.

SoapUses SOAP to invoke the service.

With two messages involved in a single round-trip method invocation, and three supported protocols, the generated WSDL defines six messages: