< Previous | Next >

Create the XML map

Map the source business object fullname to the target business object title_firstname_lastname. When you save the map, an XSL file is generated.

  1. In the Business Integration view, select HelloWorldDataPowerLibrary. Right-click and select New > Data Map. The New Data Map wizard opens showing the Create an XML Map page.
    Create an XML Map page of the New Data Map wizard
  2. In the Name field, enter fullname_map and click Next. The Select Input and Output Business Objects window opens.
  3. Add the input business object by clicking the Add button. The Data Type Selection window opens.
  4. Type fullname in the entry field.
  5. Similarly add the output business object title_firstname_lastname. Click Finish.

    The XML Map editor opens, showing the input business object on the left side of the editor, and the output business object on the right:

    Input and output business objects in the XML map editor

    You can also add input and output objects by using the icons at the top of the XML Map editor, as shown below:
    Add an input object
  6. Wire the title element from fullname to the name element of title_firstname_lastname by dragging the cursor from title to name. This action creates a mapping with the default transform Move between the two elements:
    Move transform between title and name.
  7. Wire firstName to the Move transform in the middle.
  8. In the Connection Selection Helper dialog, choose to create a primary transform. This changes the Move transform to a Concat transform.
  9. Create another primary connection between lastName and Concat. The map is complete. The values of the elements title, firstName, and lastName will be input to the Concat transform, where the strings will be concatenated into a single result. The result will then be put into the output element name.
    Completed map
  10. Optional: You can set properties to change the order in which the strings are concatenated, or to add delimiters. Right-click on Concat and select Show In > Properties View. For example, if you want commas between the input strings you can set the delimiter property as shown below:
    Supplemental information
  11. Optional: The XML map editor provides a number of transforms and functions, including XPath, EXSLT and DataPower functions. To view the transforms and functions that are available, click the downward arrow in the transform box.
    Picture of arrow in transform box
  12. Optional: By default, the DataPower function set is enabled when you create a map in a DataPower library. You can choose to filter the function sets that you want to work with. To enable or disable function sets:
    1. Click the arrow in the transform box.
      Picture of arrow in transform box
    2. In the list of available transforms, click the arrow on the upper right corner to view the available function sets.
      Function selection window
    3. Click the function set you want to show or hide.
< Previous | Next >