Map Message Structure
March 1, 2021
Intermediate
15 min.
Use the mapping step to convert the message structure to a structure desired by the recipient.
You will learn
- How to map message structures
- How to use the visual mapping editor
- How to use standard mapping functions
- How to create a custom groovy function in Message mapping
- How to create a custom function with multiple outputs
- How to simulate mappings
- How to work with resources
In this exercise, you shall convert the message structure from:
<orders>
<order>
<orderID>BS00010023</orderID>
<order>
<orderID>BS00010023</orderID>
<code>KWA2PRBK5I</code>
</order>
<OrderDate>11.04.2019</OrderDate>
<CustomerName>Kiara</CustomerName>
<CustomerLastName>Jain</CustomerLastName>
<Address>23,Prime View,Redfield,Bangalore,Karnataka,560037,India</Address>
<code>KWA2PRBK5I</code>
<ContactNumber>0091-8437329849</ContactNumber>
<items>
<item>
<ProductID>RPD4044543</ProductID>
<ProductDescription>Wireless Mouse</ProductDescription>
<Quantity>1</Quantity>
<ItemValue>1057</ItemValue>
</item>
</items>
<Shipping>200</Shipping>
<OrderValue>1257</OrderValue>
<ShippingType>Priority 2-day</ShippingType>
<SpecialPackaging>None</SpecialPackaging>
<PaymentType>CoD</PaymentType>
</order>
</orders>
to:
<orders>
<order>
<orderID>BS00010023</orderID>
<OrderDate>11.04.2019</OrderDate>
<CustomerName>Kiara Jain</CustomerName>
<HouseNumber>23</HouseNumber>
<AddressLine1>Prime View</AddressLine1>
<AddressLine2>Redfield</AddressLine2>
<City>Bangalore</City>
<State>Karnataka</State>
<Pin>560037</Pin>
<Country>India</Country>
<code>KWA2PRBK5I</code>
<ContactNumber>0091-8437329849</ContactNumber>
<items>
<item>
<ProductCode>RPD4044543</ProductCode>
<ProductDetails>Wireless Mouse</ProductDetails>
<Quantity>1</Quantity>
<ItemValue>1057</ItemValue>
</item>
</items>
<Shipping>200</Shipping>
<OrderValue>1257</OrderValue>
<ShippingType>Priority 2-day</ShippingType>
<SpecialPackaging>None</SpecialPackaging>
<PaymentType>CoD</PaymentType>
</order>
</orders>
Step 1: Add message mapping
Step 2: Use Standard functions
Step 3: Create a custom function with multiple output
Step 4: Simulate mapping
Step 5: Explore resources