I have created my own MediatorClass. Which has this major method:
public boolean mediate(MessageContext context) {
// TODO Implement your mediation logic here
return true;
}
Now there is a problem. This mediator is part of REST API sequence which has Text body that I want to edit.
How it's possible to extract this Payload as String?
Get the root element of the soap body :
OMElement element = (OMElement) context.getEnvelope().getBody().getFirstOMChild();
(see MessageContext)
Just use element.toString()
(see OMElement)