You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by las <la...@gmail.com> on 2014/10/04 01:22:34 UTC
Different "PropertyNamingStrategy - JsonProvider " for request and
response?
Is there a way to have different JsonProviders/PropertyNamingStrategy for
input and output when using jaxrs:client?
--
View this message in context: http://cxf.547215.n5.nabble.com/Different-PropertyNamingStrategy-JsonProvider-for-request-and-response-tp5749415.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Different "PropertyNamingStrategy - JsonProvider " for request
and response?
Posted by Sergey Beryozkin <sb...@gmail.com>.
On 07/10/14 04:39, las wrote:
> When serializing the request, I want to have firstName in the POJO to be
> FirstName in the JSON request. And in the response, i want firstName in JSON
> to get mapped to firstName in the POJO. Is there a way i can set different
> naming strategy for request and response? How do i go about this situation?
Have a look at
http://cxf.apache.org/docs/jax-rs-data-bindings.html#JAX-RSDataBindings-CustomizingJAXBXMLandJSONinputandoutput
outTransformElements and inTransformElements should help
That would work with a CXF JSONProvider only
Sergey
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Re-Different-PropertyNamingStrategy-JsonProvider-for-request-and-response-tp5749439p5749510.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
Re: Different "PropertyNamingStrategy - JsonProvider " for request
and response?
Posted by las <la...@gmail.com>.
When serializing the request, I want to have firstName in the POJO to be
FirstName in the JSON request. And in the response, i want firstName in JSON
to get mapped to firstName in the POJO. Is there a way i can set different
naming strategy for request and response? How do i go about this situation?
--
View this message in context: http://cxf.547215.n5.nabble.com/Re-Different-PropertyNamingStrategy-JsonProvider-for-request-and-response-tp5749439p5749510.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Different "PropertyNamingStrategy - JsonProvider " for request
and response?
Posted by Sergey Beryozkin <sb...@gmail.com>.
On 04/10/14 00:22, las wrote:
> Is there a way to have different JsonProviders/PropertyNamingStrategy for
> input and output when using jaxrs:client?
Can you clarify please what exactly you are looking for ? You can
register provider bean instances as jaxrs:client/jaxrs:providers and you
can set the properties on those provider instances as needed
Cheers, Sergey
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Different-PropertyNamingStrategy-JsonProvider-for-request-and-response-tp5749415.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>