synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Venkatesan, Kumaran" <Kumaran.Venkate...@in.standardchartered.com>
Subject Synapse mediator - Insert an element into soap xml
Date Tue, 19 Feb 2008 07:51:39 GMT
Hi,

 

The requirement is to insert an element into the soap xml before sending
it to the backend service in the mediation layer. 

Have created an element using AXIOM but facing issue in injecting it to
the soap.

 

      public boolean mediate(MessageContext ctx) {

          System.out.println("Inside the Router Mediator");

          SOAPBody soapBody = ctx.getEnvelope().getBody();

          OMFactory omf = soapBody.getOMFactory();

          OMElement ome = omf.createOMElement("userid", null);

          ome.setText("PSSWEBBANK");

          System.out.println("soap body "+ctx.getEnvelope().getBody());

            return true;

      }

 

How to do this?

This email is confidential. If you are not the addressee tell the sender immediately and destroy
this email
without using, sending or storing it. Emails are not secure and may suffer errors, viruses,
delay,
interception and amendment. Standard Chartered PLC and subsidiaries ("SCGroup") do not accept
liability for
damage caused by this email and may monitor email traffic.


Mime
View raw message