Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

WSO2 ESB Payload Mediator Tutorial

DZone's Guide to

WSO2 ESB Payload Mediator Tutorial

· Integration Zone
Free Resource

Build APIs from SQL and NoSQL or Salesforce data sources in seconds. Read the Creating REST APIs white paper, brought to you in partnership with CA Technologies.

This simple tutorial will lead you to write proxy with WSO2 ESB Payload Mediator.

Here is the client sending request payload for proxy

request:
<body>
   <p:getBusNo xmlns:p="http://transport.org">
      <xs:rootId>root1</xs:rootId>
   </p:getBusNo>
</body>

BackEnd service Request:
<body>
   <pos:getBusNo xmlns:p="http://pos.transport.org">
      <rooter:rootId>root1</rooter:rootId>
      <rooter:token>Aser4Tre321</rooter:token>
   </pos:getBusNo>
</body>

Proxy:

<payloadFactory>
  <format>
   <pos:getBusNo xmlns:pos="http://pos.transport.org">
      <rooter:rootId>$1</rooter:rootId>
      <rooter:token>MyToekn</rooter:token>
   </pos:getBusNo>
  </format>
<args>
    <arg  xmlns:p="http://transport.org" xmlns:xs="http://root.transport.org" expression="//p:getBusNo/xs:rootId"/>
</args>

</payloadFactory>

>

PUntitled

payload Factory will do the transformation.



The Integration Zone is brought to you in partnership with CA Technologies.  Use CA Live API Creator to quickly create complete application backends, with secure APIs and robust application logic, in an easy to use interface.

Topics:

Published at DZone with permission of Madhuka Udantha, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}