IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Defining and transforming data > Transforming data > Transforming data using XML maps > Testing XML Maps locally

Use a sample input file

A sample input file is used to ensure an XML map is performing the mapping properly. The file can be automatically generated from the New XML Mapping wizard or the XML Map editor. You can also create your own file to use for testing.

When you create a new XML map, you have the option to create a sample input file. Or, you can create a sample input file from the XML map editor. The sample input file is named after your XML map and the output file has "-out" appended to its name.

For example if your map file is purchaseMap.map the sample input file will be purchaseMap.xml and the sample output file will be purchaseMap-out.xml. The files created can be found in the Transformations category of the module or library in the Business Integration view.

To create a sample input file when you create a new XML map:

  1. In the Mediation Flow editor, right-click the Mapping primitive, select Show in properties then click Details.

  2. Click New to open the New XML Mapping wizard.
  3. Name your map and select Create a sample xml input file for testing the XML map.

To create a sample input file from the XML Map editor:

  1. Open the map in the XML Map editor.

  2. Click Associate XML Files.

  3. Click Generate Input. The file is now in the XML sample inputs for testing list.

If you want to reuse a sample input file created or was created before, you can add the file to the sample inputs for testing list:

  1. Open the map in the XML Map editor.

  2. Click Associate XML Files.

  3. Click Add, then select the file in the Resource Selection window. If : Your sample input file must be in the project directory.
To remove a sample input file association:
  1. Open the map in the XML Map editor.

  2. Click the Associate XML Files.

  3. Select the file you want to remove and click Remove.


Example


What to do next

Testing XML Maps


Related tasks:
Testing maps during iterative development
Testing XML maps in isolation
Debugging XML maps