Deploying and Managing Apama Applications > The Apama Web Services Client Adapter > Mapping Web Service message parameters > Template-based mapping
Template-based mapping
The template-based approach to mapping lets you map fields in an Apama event to elements and attributes in complex XML structures.
To use the template-based approach:
1. In the adapter editor's Event Mappings tab, right-click the operation's parameters entry and select Assign Template.
The Assign Template dialog appears.
2. In the Assign Template dialog's XML Template file field, enter the name of the template file you want to use or use the Browse and Down Arrow buttons to locate the file.
When you specify a template file, the contents of the file are added to the text field in the dialog. For example:
You must have previously written the template file. In the template file, you define variables to represent field values that you want the adapter to obtain from the input event. To define a variable, insert a dollar sign ($) following by the variable name. After you click OK, the variable name appears as an element in the Operation mapping tree.
3. Edit the template as needed and click OK.
The Operation hierarchical tree is re-displayed showing the various elements and attributes that are defined in the template.
4. In the Event hierarchical tree, click the Apama event field that you want to map to a particuler element or attribute and drag a line to that element or attribute in the Operation tree.
Copyright © 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.