On Tue, Jan 23, 2018 at 10:27 AM, Keerthika Mahendralingam <
[email protected]> wrote:

> HI All,
>
> When we use the latest version of cache mediator implementation with APIM,
> an empty response is getting cached instead of JSON message. But all
> headers are getting cached correctly. When I debugged the code, I found
> that response body is set to null in [1].
>
> As Riyafa suggested when I changed the JSON message builder as
> JsonStreamBuilder instead of JsonBuilder its worked as expected.
>
> Is there any specific reason for using JsonBuilder instead of
> JsonStreamBuilder? Can I go with this approach?
>
There are many instances which we have suggest to use  JsonStreamBuilder in
APIM usecases and it's the defualt builder in the EI. We had a limitation
using this when workflows enabled but there is a workaround. Hence it's
fine to use JsonStreamBuilder.

>
> Any suggestion on this?
>
> [1]. https://github.com/wso2/carbon-mediation/blob/master/
> components/mediators/cache/org.wso2.carbon.mediator.
> cache/src/main/java/org/wso2/carbon/mediator/cache/CacheMediator.java#L359
>
> Thanks,
> Keerthika.
>
> --
> <[email protected]>
> Keerthika Mahendralingam
> Software Engineer
> Mobile :+94 (0) 776 121144 <+94%2077%20612%201144>
> [email protected]
> WSO2, Inc.
> lean . enterprise . middleware
>



-- 
Harsha Kumara
Software Engineer, WSO2 Inc.
Mobile: +94775505618
Blog:harshcreationz.blogspot.com
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to