cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: JSONP is not works
Date Mon, 30 Jun 2014 09:52:27 GMT
Hi
On 30/06/14 06:54, Jack Huang wrote:
> Dear Sergey
>
> Thank you for your help, I have upgraded CXF 3.0.0, and the JSONP is very
> great now!
>
OK, thanks for testing it,
> Maven configuration:
>
>          <dependency>
>              <groupId>org.apache.cxf</groupId>
>              <artifactId>cxf-rt-frontend-jaxrs</artifactId>
>              <version>${cxf.version}</version>
>          </dependency>
>          <dependency>
>              <groupId>org.apache.cxf</groupId>
>              <artifactId>cxf-rt-rs-extension-providers</artifactId>
>              <version>${cxf.version}</version>
>          </dependency>
>
>          <dependency>
>              <groupId>com.fasterxml.jackson.jaxrs</groupId>
>              <artifactId>jackson-jaxrs-json-provider</artifactId>
>              <version>${jackson.version}</version>
>          </dependency>
>
> Spring configuration:
>      <jaxrs:server address="/rest">
>          <jaxrs:serviceBeans>
>              <ref bean="productServiceImpl"/>
>          </jaxrs:serviceBeans>
>          <jaxrs:providers>
>              <bean
> class="com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider"/>
>              <bean
> class="org.apache.cxf.jaxrs.provider.jsonp.JsonpPreStreamInterceptor"/>
>          </jaxrs:providers>
>          <jaxrs:inInterceptors>
>              <bean
> class="org.apache.cxf.jaxrs.provider.jsonp.JsonpInInterceptor"/>
>          </jaxrs:inInterceptors>
>          <jaxrs:outInterceptors>
>              <bean
> class="org.apache.cxf.jaxrs.provider.jsonp.JsonpPostStreamInterceptor"/>
>          </jaxrs:outInterceptors>
>      </jaxrs:server>
>
> Notes: JsonpPreStreamInterceptor must include in <jaxrs:providers> rather
> than <jaxrs:outInterceptors>.
>
I've checked the code, it implements JAX-RS WriteInterceptor but also 
CXF Interceptor so it should work if it is registered inside outInterceptors

Thanks, Sergey
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/JSONP-is-not-works-tp5739858p5745735.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>

Mime
View raw message