Transforming elements in the Properties folder by using the Override function

You can use the Override function to copy a complex type from the input message to the output message, while updating some of the child elements in the complex type. A message assembly component is described by a complex data structure.

Before you begin

Create a message map. For more information, see Creating a message map to transform SOAP messages.

About this task

The Properties folder has a Move transform defined automatically when you create a message map so that all elements in the Properties folder are copied to the output Properties folder structure. The following figure shows the message map that you have created previously:

This figure shows graphically the result of adding a Move transform between the input Properties folder and the output Properties folder.

Note: You can only use the Override function to include Move transforms and Assign transforms.

In the scenario, you define an Assign transform to change the value of the CodedCharSetId element in the Properties folder from UTF-16 to UTF-8. Support for Universal Transformation Format (UTF)-16 encoding is required by the WS-I Basic Profile 1.0. UTF-16 is a unicode encoding scheme using 16-bit values to store Universal Character Set (UCS) characters. UTF-8 is the most common encoding that is used on the Internet and UTF-16 encoding is typically used for Java™ and Windows product applications. For more information on the values that you can set for the CodedCharSetId element, see Supported code pages.

Procedure

Complete the following steps to modify the CodedCharSetId element of the properties folder:

  1. Right-click the CodedCharSetId element, and then select the menu option Create Assign.

    The following figure shows the message map with the options you can choose from when you right-click the element CodedCharSetId.

    This figure shows the menu options that you get when you right-click an element. the Create Assign option is selected.

    The Assign transform is defined and connected to the CodedCharSetId element in the output Properties folder.

    This figure shows graphically the Assign transform connected to the output CodedCharSetId element.

    You get the following icons on the top left hand side of the transform:
    • An Error icon represented with a red exclamation mark. You can ignore this error and continue. You get the error because you have defined two transformations on an element and this is not allowed. By using the Override function, you fix the problem.

      This figure displays the error message: CodedCharSetId is mapped by a Move mapping on parent element Properties as well as a assign map directly on element CodedCharSetId.

    • A suggestion icon represented by a yellow light bulb.

      When you hover over the icon, you get the following pop-up window:

      This figure shows the pop-up window that opens whe you hover the light bulb icon.

  2. Set the value of the CodedCharSetId to 1208. This is the value for UTF-8.

    In the Assign transform properties tab, you set the value in the General tab. You set the element Value to 1208.

    This figure shows the Assign transform properties tab. In the general tab, you set the value to 1208.

  3. When you hover over the yellow light bulb, choose Group the conflicting transforms in an override group. This option is the recommended approach and allows you to maintain visibility of the transforms you have defined in the main transformation map.

    This figure shows the Override transform containing the parent component Move transform and the CodedCharSetid element Assign transform.

Results

You have transformed elements of the Properties folder by using the Override function.

If you choose Nest transforms within the parent map, a Local map transform is defined between the input Properties folder and the output Properties folder.

This figure shows the Local map transform that is defined when you choose Nest transforms within the parent map.

The local map that is created contains a Move transform per element, with the exception of the CodedCharSetId element that has an Assign transform.

This images shows graphically Move transforms for each element except CodedCharSetId that has an Assign transform.

What to do next

Configure the message map to include the local environment tree. For more information, see Customizing a message map to include the local environment tree.