This documentation is for WSO2 Enterprise Integrator version 6.1.1 . View documentation for the latest release.

All docs This doc

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

WSO2 Data Mapper is an independent component that does not depend on any other WSO2 product. However, other products can use the Data Mapper to achieve/offer data mapping capabilities. Data Mapper Mediator is the intermediate component you need for that, which gives the data mapping capability into the ESB profile of WSO2 EI.

Data Mapper mediator finds the configuration files from the Registry and configures the Data Mapper Engine with the input message type (XML/JSON/CSV) and output message type (XML/JSON/CSV). Then it takes the request message from the WSO2 EI message from the ESB profile message flow and uses the configured Data Mapper Engine to execute the transformation and adds the output message to the EI message ESB profile message flow.

Info

The Data Mapper mediator is a content-aware mediator.

...

You need to install the WSO2 Developer Studio EI Tool 5.0.0 EI Tooling to use the Data Mapper mediator. For instructions on installing this WSO2 EI Tooling Plugin, see Installing WSO2 EI Tooling.

...

The parameters available for configuring the Data Mapper mediator are as follows.

Parameter nameDescription
Mapping ConfigurationThe file, which contains the script file that is used to execute the mapping. You need to create a mapping configuration file using the Dev Studio-based Tooling plugin, and store it either in the Configuration Registry or Governance Registry, to select and upload it from here.
Input SchemaJSON schema, which represents the input message format. You need to create an input schema file using the Dev Studio-based Tooling plugin, and store it either in the Configuration Registry or Governance Registry to select and upload it from here.
Output SchemaJSON schema, which represents the output message format. You need to create an output schema file using the Dev Studio-based Tooling plugin, and store it either in the Configuration Registry or Governance Registry to select and upload it from here.
Input TypeExpected input message type (XML/JSON/CSV)
Output TypeTarget output message type (XML/JSON/CSV)
Info
titleNote

You can configure the mediator using XML. Click switch to source view in the Mediator window.

...

Info
When loading a sample input XML file, you cannot have the default namespace (i.e. without a prefix in the namespace element). Also, you need to use the same prefix in all occurrences that refer to the same namespace within one XML file. For example, see the use of the prefix axis2ns11 in the example below.


 

Expand
titleSample input XML file
Code Block
languagexml
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
    <axis2ns11:LimitInfoHeader xmlns:axis2ns11="urn:partner.soap.sforce.com">
        <axis2ns11:limitInfo>
            <axis2ns11:current>42336</axis2ns11:current>
            <axis2ns11:limit>83000</axis2ns11:limit>
            <axis2ns11:type>API REQUESTS</axis2ns11:type>
        </axis2ns11:limitInfo>
    </axis2ns11:LimitInfoHeader>
</soapenv:Header>
<soapenv:Body>
    <axis2ns11:records xmlns:axis2ns11="urn:partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="sf:sObject">
    <sf:type xmlns:sf="urn:sobject.partner.soap.sforce.com">Account</sf:type>
    <sf:Id xmlns:sf="urn:sobject.partner.soap.sforce.com">001E0000002SFO2IAO</sf:Id>
    <sf:CreatedDate xmlns:sf="urn:sobject.partner.soap.sforce.com">2011-03-15T00:15:00.000Z</sf:CreatedDate>
    <sf:Id xmlns:sf="urn:sobject.partner.soap.sforce.com">001E0000002SFO2IAO</sf:Id>
    <sf:Name xmlns:sf="urn:sobject.partner.soap.sforce.com">WSO2</sf:Name>
</axis2ns11:records>
</soapenv:Body>
</soapenv:Envelope>

...

For example, the Data Mapper mediator provides EI properties like  axis2/transport/synapse/axis2client/operation/.. In the Data Mapper diagram, you can use the  Property operator  and define the scope and the property name and use it in the mapping. Then, the Data Mapper mediator will identify the required properties to execute the mapping and populate a map with the required properties and will send it to the Data Mapper Engine. 

...