Describe how W3C XML Schema is used as a typing mechanism in WSDL 1.1.

The types element encloses data type definitions that are relevant for the exchanged messages. For maximum interoperability and platform neutrality, WSDL prefers the use of XSD as the canonical type system, and treats it as the intrinsic type system.

<definitions .... >
        <xsd:schema .... />*
The XSD type system can be used to define the types in a message regardless of whether or not the resulting wire format is actually XML, or whether the resulting XSD schema validates the particular wire format. This is especially interesting if there will be multiple bindings for the same message, or if there is only one binding but that binding type does not already have a type system in widespread use.

A DESCRIPTION MUST NOT use QName references to elements in namespaces that have been neither imported, nor defined in the referring WSDL document.

A QName reference to a Schema component in a DESCRIPTION MUST use the namespace defined in the targetNamespace attribute on the xsd:schema element, or to a namespace defined in the namespace attribute on an xsd:import element within the xsd:schema element.

All xsd:schema elements contained in a wsdl:types element of a DESCRIPTION MUST have a targetNamespace attribute with a valid and non-null value, UNLESS the xsd:schema element has xsd:import and/or xsd:annotation as its only child element(s).

In a DESCRIPTION, array declarations MUST NOT extend or restrict the soapenc:Array type.

In a DESCRIPTION, array declarations MUST NOT use wsdl:arrayType attribute in the type declaration.

In a DESCRIPTION, array declaration wrapper elements SHOULD NOT be named using the convention ArrayOfXXX.

A MESSAGE containing serialized arrays MUST NOT include the soapenc:arrayType attribute.


Given the WSDL Description:

<xsd:element name="MyArray1" type="tns:MyArray1Type"/>
<xsd:complexType name="MyArray1Type">
   <xsd:element name="x" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>

The SOAP message would serialize as (omitting namespace declarations for clarity):



INCORRECT (uses soapenc:arrayType attribute and soapenc:Array type):

Given the WSDL Description:

<xsd:element name="MyArray2" type="tns:MyArray2Type"/>
<xsd:complexType name="MyArray2Type" 
  xmlns:wsdl="" >
     <xsd:restriction base="soapenc:Array">
          <xsd:element name="x" type="xsd:string" 
           minOccurs="0" maxOccurs="unbounded"/>
       <xsd:attribute ref="soapenc:arrayType" 

The SOAP message would serialize as (omitting namespace declarations for clarity):

<MyArray2 soapenc:arrayType="tns:MyArray2Type[]" >


Professional hosting     Belorussian informational portal         Free SCWCD 1.4 Study Guide     Free SCBCD 1.3 Study Guide     SCDJWS 1.4 Quiz     Free IBM Certified Associate Developer Study Guide     Free SCJP 5.0 (Tiger) Study Guide     Free Mock Exam Engine     IBM Test 000-287. Enterprise Application Development with IBM WebSphere Studio, V5.0 Study Guide     IBM Test 000-255. Developing with IBM Rational Application Developer for WebSphere Software V6 Study Guide