Creating a message map to transform SOAP messages

Create a message map with a SOAP message as input and a SOAP message as output.

About this task

This scenario demonstrates how to create a message map within one operation of a service.

If you want to use your own application, you can follow the same steps. The difference is that you create the map in a message flow or subflow within the application or library referenced by the application.

Procedure

Complete the following steps to create a map in the IBM® App Connect Enterprise Toolkit:

  1. Start the New Message Map wizard.
    1. Identify the SaveAddress operation.

      SaveAddress operation in user interface

    2. Double-click the SaveAddress operation and drag and drop a Mapping node.
    3. In the Mapping node properties, select the Description tab, and enter Normalize_AddressBook_Transform as the Node name.
    4. Connect the Normalize_Address_Transform Mapping node between the two nodes where the message transformation is required.

      This figure shows the flow after you create a Mapping node.

    5. Double-click the Normalize_AddressBook_Transform Mapping node to start the New Message Map wizard.
  2. Optional: Edit the Map name field and enter your map name.

    You can keep the default name provided by IBM App Connect Enterprise.

    In the scenario, the map name that you use is the default name SaveAddress_Request_Response_Mapping.map.

  3. Enter the broker schema name AddressBook in the field Schema to create a new broker schema.

    To organize your resources, and to define the scope of resource names to ensure uniqueness, you create broker schemas. For more information on how to create a broker schema in the IBM App Connect Enterprise Toolkit, see Creating a broker schema.

    After you enter AddressBook as the name of the broker schema, the window looks as follows:

    This figure shows the New Message Map window completed with the choices and information you have entered until this point in the process. It highlights the box where you enter the AddressBook broker schema.

  4. Click Next.
  5. Select the map inputs and outputs.
    1. Select the map input as schema type SaveAddress.
    2. Select the map output SOAP_Domain_MSG{}.

    In the scenario, you implement an integration service operation subflow, which removes the SOAP envelope from the SOAPInput node and passes only the operation input message into the subflow. For the output of the map, the scenario uses a SOAP_Domain_MSG so that the transform can set SOAP headers in addition to the operation response schema in the SOAP body.

    Note: In IBM App Connect Enterprise, you can choose from multiple inputs and multiple outputs in a message map. However, you can only select one input and one output for a message map.
    • If you use an integration service, in the operation subflow you must use the XMLNSC domain and the schema that is associated with operation request on the map input, and use either the schema for the operation response or a SOAP_Domain_Msg for the output of the map. Use the SOAP_Domain_MSG on the output of the map if you need to set parts of the SOAP message other than the contents of the SOAP body.
    • If you use a SOAPInput node followed by a SOAPExtract node, you must map the schema associated with your operation in the XMLNSC domain. You use the SOAPExtract node to remove SOAP envelopes, allowing just the body of a SOAP message to be processed.
    • If you use HTTP nodes or MQ nodes, you must map the SOAP 1.1 or the SOAP 1.2 schema as the root model of the map in the XMLNSC domain.
  6. Click Next.
  7. Select the output domain SOAP.
    Note: The only domain option available is the SOAP domain.

    The following figure shows what the New Message Map - Select the domain to create the output window looks like after you have selected the domain.

    This figure shows the Select the domain to create the output window after you have selected the domain.

  8. Click Finish.

Results

The message map SaveAddress_Request_Response_Mapping.map is created in the Application Development view, within the folder Maps located under your AddressBookProvider service project. The map is created under the AddressBook schema.

This figure shows the new map resource created in the Maps folder under the AddressBookProvider project.

The map opens in the Graphical Data Map editor. The following figure shows what the map looks like when it is first opened.

This figure shows how the map looks when it is first opened.

What to do next

Configure the Properties folder. For more information, see Transforming elements in the Properties folder by using the Override function.