0

I'm using a proxy service in WSO2 ESB in between a REST api and a WCF Service. The WCF service that I am calling accepts and returns an XElement object. When the response of the WCF service enters the out sequence of the proxy the result is in binary.

<?xml version='1.0' encoding='utf-8'?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
        <soapenv:Body>
            <axis2ns43:binary xmlns:axis2ns43="http://ws.apache.org/commons/ns/payload"></axis2ns43:binary>
        </soapenv:Body>
    </soapenv:Envelope>

The message in the soap body should look something like

<?xml version='1.0' encoding='utf-8'?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
        <soapenv:Body>
            <Location><Result>Success</Result></Location>
        </soapenv:Body>
    </soapenv:Envelope>

How can I transform the binary message into the actual XML that it is supposed to be? I'm guessing I need to use either a formatted or builder mediator to accomplish this, I'm just not sure how.

Community
  • 1
  • 1
drewfrisk
  • 451
  • 7
  • 17

1 Answers1

0

ESB 4..6.0, by default it uses passthru transport, which doesn't build message.. But with your binary out put, i can confirm taht ESB didnt receve any message..(ie: teh 'success' msg) If it received, you could see, something following like that;

  <axis2ns43:binary xmlns:axis2ns43="http://ws.apache.org/commons/ns/payload">6Ly9zY2hlbWFzLnhtbHNvY</axis2ns43:binary>

Can you switch back to NIO transport(you need to enable the transport sender and receiver at axi2.xml) and see, what you are actually receiving?

Ratha
  • 9,434
  • 17
  • 85
  • 163