I am creating a simple OpenESB application. On left I have a rest inbound partner link and on the right I am calling a rest outbound partner link. I am trying to pass json to the service but openESB automatically parses it and converts it into XML.
So the question is how do I stop open esb from converting the json string into xml since the service doesn't accept xml input.
OpenESB can process XML only.
For
consume-types=[ "application/json" ]
JSON input is automatically converted into XML for further processing and invoke any external partner links if required.For
produce-types=[ "application/json" ]
XML data is converted into JSON by OpenESB.To achieve the same your JSON has to be in a format that when converted to XML, produces valid XML. For example,
{"name":äbc"}
looks like<name>abc</name>
when converted to XML.JSON input like,
looks like
Now name1 and name2 XML elements does not have root element so OpenESB can not process it.
If you give JSON input as
, converted XML would be like,
This should work in your case. :)