Request to ESB is as follows:
<request><user>Sajith</user></request>
Backend expects the request as follows
http://localhost:8001/myservice?RequestXML=%3CRequest%3E%3CUser%3ESajith%3C%2FUser%3E%3C%2FRequest%3E
This was achieved by the following code. (Using javascript method encodeURL)
<script language="js" description=""> mc.setProperty("uri.var.encodedBody", encodeURI(mc.getPayloadXML())); </script> <send> <endpoint> <http method="post" uri-template="http://localhost:8001/myservice?RequestXML={uri.var.encodedBody}"/> </endpoint> </send>
No comments:
Post a Comment