Library Link To Toggle Frames Print Feedback

Adding Data Units to a Contract

Depending on how you choose to create your WSDL contract, creating new data definitions requires varying amounts of knowledge. The Celtix Enterprise GUI tools provide a number of aids for describing data types using XML Schema. Other XML editors offer different levels of assistance. Regardless of the editor you choose, it is a good idea to at least have some knowledge about what the resulting contract will look like.

Procedure

Defining the data used in an WSDL contract involves seven steps:

  1. Determine all the data units used in the interface described by the contract.

  2. Create a types element in your contract.

  3. Create a schema element, shown in Example 2.1, “Schema Entry for a WSDL Contract”, as a child of the type element.

    The targetNamespace attribute is where you specify the namespace under which your new data types are defined. The remaining entries should not be changed.

    Example 2.1. Schema Entry for a WSDL Contract

    <schema targetNamespace="http://schemas.iona.com/bank.idl"
            xmlns="http://www.w3.org/2001/XMLSchema"
            xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">

  4. For each complex type that is a collection of elements, define the data type using a complexType element. See Defining Data Structures.

  5. For each array, define the data type using a complexType element. See Defining Arrays.

  6. For each complex type that is derived from a simple type, define the data type using a simpleType element. See Defining Types by Restriction.

  7. For each enumerated type, define the data type using a simpleType element. See Defining Enumerated Types.

  8. For each element, define it using an element element. See Defining Elements.