The types element encloses data type definitions that are relevant for the exchanged messages between the proxy and the Web Service. For maximum interoperability and platform neutrality, WSDL prefers the use of XSD as the canonical type system. The “types” element from SAS Web Service WSDL is shown in Fig 3. As we can see, there are three elements: GetFlightStatus, GetFlightStatusResponse and string.
<types>
<s:schema attributeFormDefault="qualified"
elementFormDefault="qualified"
targetNamespace="http://tempuri.org/">
<s:element name="GetFlightStatus">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1"
name="nFlightNo" type="s:int" />
<s:element minOccurs="1" maxOccurs="1"
name="nDayOffset" type="s:int" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetFlightStatusResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1"
name="GetFlightStatusResult"
nillable="true" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="string" nillable="true" type="s:string" />
</s:schema>
</types>
Fig 3: types element from SAS Web Service WSDL
As we can see, the simple type definitions (the “type” attribute in “element” node) are referring to namespace “s” which is nothing but: http://www.w3.org/2001/XMLSchema. The structure of “GetFlightStatus” is defined as a sequence of two integers: “nFlightNo” and “nDayOffset”. The element “GetFlightStatusResponse” is defined as a “string” by name “GetFlightStatusResult”. The third and last element “string” is defined as a “string” type.