Casting a wildcard defined as xsd:any into a specific type for a SOAP message

You can use the Cast function to redefine a wildcard element, that is, an element with type xsd:any, into a specific type. Each type is described by a schema.

About this task

You can transform a SOAP message that is defined by using the predefined format SOAP_Domain_Msg. This message type contains a Header, a Body, and an Attachment part. Each part contains an element that is named any to represent a wildcard, that is, an element of type xsd:any. The Header and Body sections also include an element that is named AnyAttribute. You can cast elements and attributes included in any of these SOAP sections by using the Cast function.

Note: When you transform a SOAP message, you cast the Body wildcard on the input side to the type of the request message for the SOAP operation. On the output side, you cast the Body wildcard to the type of the response message for the SOAP operation.

The following figure shows the message map in the Graphical Mapping Data editor after you create a message map to transform a SOAP message:

This figure shows the message map that you create in the Graphical Mapping Data editor in previous steps of the scenario. It shows how the Header, Body, and Attachment parts are described with a generic element of type any.

Procedure

To cast an element that is described as any or as anyAttribute in the message map, complete the following steps:

  1. Right-click the element any or anyAttribute located in the section of your SOAP_Domain_Msg where you want to specify a type, and then select Cast.
    • To cast a SOAP header wildcard element, right-click Header, and then select Cast.
    • To cast a SOAP body wildcard element, right-click Body, and then select Cast.
    • To cast a SOAP attachment wildcard element, right-click Attachment, and then select Cast.

    For example, to cast the Body section, right-click Body, and then select Cast.

    This figure demonstrates how to cast the Body section. Right-click Body, and then select Cast

  2. In the Type Selection window, select a type.

    The Type Selection window displays all the specific types that are available for selection. These types include the input and output elements that are defined in the WSDL file that describes your SOAP message.

    In the example, the element any of the SOAP_Domain_Msg Body is redefined to the complex element SaveAddress.

    Shows SaveAdress specific type redefined for a wildcard element.

Results

A wildcard element is redefined to a specific type.

What to do next

Define transformations between the input message assembly and the output message assembly. For more information, see Specifying a transform (mapping operation).