cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: Can't Get Jackson jaxrs:providers Working!!!
Date Tue, 18 Aug 2015 20:19:51 GMT
Well, is your custom provider selected ?
Looks like you have 2 json providers. If you keep a custom provider 
only, what happens ?
Sergey
On 18/08/15 20:40, craigrs84 wrote:
> I have the following setup, I'm trying to use Jackson Json provider with
> custom settings applied.
>
> However whenever I connect to my service the customizations are NOT applied.
> For example it still wraps the root element and doesn't indent the JSON.
> (see code below for explanation)
>
> I'm getting desperate, please respond with advice.  Thanks.
>
>
> <jaxrs:server id="textingService" address="/texting">
>
>          <jaxrs:serviceBeans>
>          	<bean class="com.vectren.ws.rest.TextingService"/>
>          </jaxrs:serviceBeans>
>
> 		<jaxrs:providers>
> 			<ref bean="jsonProvider"/>
> 			<ref bean="jaxbJsonProvider"/>
> 		</jaxrs:providers>
> 		
> </jaxrs:server>
>
> public class CustomJsonProvider extends
> com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider
> {
> 	public CustomJsonProvider()
>      {
>      	super();
>      	super.configure(SerializationFeature.WRAP_ROOT_VALUE, false);
>      	super.configure(SerializationFeature.INDENT_OUTPUT, true);
>      }
> }
>
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Can-t-Get-Jackson-jaxrs-providers-Working-tp5760269.html
> Sent from the cxf-dev mailing list archive at Nabble.com.
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Mime
View raw message