I am going to explain you a typical scenario where you have to manipulate the incoming message
into WSO2 ESB proxy service.
Proxy service is going to receive the following message as a soap request.
This message should be send to two endpoints. Those are
- Student Record department - The entire request message should be send to this endpoint.
- Finance Department - Only interested with contents inside the "Payment" element.
Initially the proxy service is expected to perform the following operation.
Extract the
Lately remove the
This proxy service performs following operations
- Uses Enrich mediator to copy the complete envelope of incoming soap message.
- Property mediator extracts the PAYMENT element and child elements.
- Extracted Payment element can be used to create a new soap payload by using payload factory.
- If this operation is successful we can use the enrich mediator to recreate the payload
- On top of this enriched message XSLT mediator can be used to remove the Payment element.
- This message now can be send to the endpoint.
The xslt script, that used to remove the Payment can be found here. I have uploaded it to the registry.
Therefore, the proxy can reference to it by using key.
No comments:
Post a Comment