I am constructing a POC. And I created a pass through proxy service for Google Plus. Without using any proxy service I get this is my output :
{
\"kind
This is one of the limitations of the current axis2 JSON builder/formatter. We are currently working on a new builder/formatter pair for JSON that does not convert JSON <-> XML. Instead it(builder) stores the JSON message as a stream and the script mediator can be used to build a JSON object out of that stream. For example, if we send {"a" : "x", "b" : "y"} as the request, within the ESB, we can manipulate this request as a JSON object with javascript.
var a = mc.getJSON().a.toString();
var b = mc.getJSON().b.toString();
mc.setPayloadXML(
{a}
{b}
);
Similarly mc.setJSON()
method can be used to set arbitrary JSON objects.