Hi Isuru,

Below [1] worked for me to retrieve jsonbody. And then to set it back, what
you did worked for me. IE [2]

[1] - StringBuilder json =
JsonUtil.toJsonString(synCtx.getEnvelope().getBody());
[2] - JsonUtil.getNewJsonPayload(
                    ((Axis2MessageContext) synCtx).getAxis2MessageContext(),
                    transformedJson, true, true);

Thanks,

On 27 October 2016 at 17:55, Isuru Haththotuwa <[email protected]> wrote:

> Hi,
>
> How to do $subject? Need to modify the response payload from BE and send
> it to the client.
>
> Tried [1], but did not work.
>
> [1].
>            String jsonPayloadToString = JsonUtil
>                     .jsonPayloadToString(((Axis2MessageContext)
> messageContext)
>                             .getAxis2MessageContext());
>             try {
>                 JsonUtil.getNewJsonPayload(((Axis2MessageContext)
> messageContext).getAxis2MessageContext(),
>                         jsonPayloadToString, true, true);
>             } catch (AxisFault axisFault) {
>                 log.error("Error building aggregated JSON payload",
> axisFault);
>                 return false;
>             }
>
> --
> Thanks and Regards,
>
> Isuru H.
> +94 716 358 048* <http://wso2.com/>*
>
>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Rajith Vitharana

Senior Software Engineer,
WSO2 Inc. : wso2.com
Mobile : +94715883223
Blog : http://lankavitharana.blogspot.com/
<http://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to