...
- Action - By specifying the action type, the relevant action can be applied to outgoing messages.
Replace - Replace is the default value of Action. It will be used if a specific value for Action is not given. This replaces the XML message based on the target type specified on the target configuration.
- Child - Adding as a child of the specified target type.
Sibling - Adding as a sibling of the specified target type.
Info For the target type '
envelope
', the action type should be'replace
'. Herein, action type 'child
' is not acceptable because it adds an envelope within an envelope, and action type 'sibling
' is also not acceptable because there will be two envelopes in a message if you use it. Type and XPath Expression - Refer the Source configuration above.
Info The target type depends on the source type. For the valid and invalid combinations of source and target types, see below table.
Target typeSource type custom envelope body property custom valid invalid valid valid envelope invalid invalid invalid valid body valid invalid invalid valid property valid valid valid valid inline valid valid valid valid
...
Using the Enrich Mediator with JSON
Note the following when using Enrich mediator with JSON payloads:
Only the add child operation is supported for JSON payloads. Add sibling operation can be achieved via add child indirectly.
Code Block { "Nimal" : { "student_Id" : "001" , "Marks" : [ 23, 34, 45, 56 ] } } Adding a sibling to $.Nimal.Marks[0] is equal to adding a child to $.Nimal.Marks
When providing inline JSON payloads we can add JSON arrays, objects, and primitives (
number
,string
,true
,false
). However, when enriching the inline content to the body, that content should be either a JSON object or an array.You can add any JSON element (object, array, primitive) as a child if the target is a JSON array.
You can only add a JSON object as a child if the target is a JSON object.
Clone true/false does not apply to JSON as they are applied to XML payloads.
Examples
Example 1: Setting the property symbol
...