...
In this example, you add the SOAP envelope in a SOAP request as a property to a message. The Enrich mediator is useful in this scenario since adding the property directly using the Property mediator results in the SOAPEnvelope
object being created as an OM
type object. The OM
type object created cannot be converted back to a SOAPEnvelope
object.
Code Block |
---|
|
<enrich>
<source type="envelope" clone="true"/>
<target type="property" property="ExtractedEnvelope"/>
</enrich> |
In this example, you copy the original payload to a property using the Enrich mediator.
Code Block |
---|
|
<enrich>
<source clone="false" type="body"/>
<target action="replace" type="property" property="ORGINALORIGINAL_PAYLOAD"/>
</enrich> |
Then whenever you need the original payload, you replace the message body with this property value using the Enrich mediator as follows:
Code Block |
---|
|
<enrich>
<source clone="false" type="property" property="ORIGINAL_PAYLOAD"/>
<target action="replace" type="body"/>
</enrich> |
For other example using the Enrich mediator, see /wiki/spaces/EI6xx/pages/49610946 and /wiki/spaces/EI6xx/pages/49611297.