0
votes

From ESB our api is making a call to the downstream service which in case of negative scenario is returning

`<html>
   <head>
      <meta content="HTML Tidy for Java (vers. 27 Sep 2004), see www.w3.org" name="generator"/>
      <title/>
   </head>
   <body>invalid address type</body>
</html>`

but when we log inside esb we see this

QUIgaXMgaW52YWxpZCBhZGRyZXNzIHR5cGU=

Also when the message is send to the caller using respond , the caller gets HTMl again.

We had enabled the following in axis2

`<messageBuilder contentType="text/html"

   class="org.wso2.carbon.relay.BinaryRelayBuilder"/> `

We want to transform the response into JSON and want to map body in the response before sending to the caller .

2

2 Answers

0
votes

The HTML content will be treated as a XML segment by the ESB. SO you can perform any manupulation operation on this content. Can try the Payload Mediator or Enrich mediator with some XPath expressions.

0
votes

we had observed that the content is coming as base64encoding string into the ESB, that was the reason we were not able to process it , so we did reqd decoding and processed as per our reqmt .