Hi
On Tue, Aug 2, 2011 at 12:18 PM, Carl-Erik Kopseng <[email protected]> wrote:
>>> That said, I have it fixed in on the trunk/branches
>>
>> Wonderful news. Thank you.
>
> The fixes in 2.4.2-SNAPSHOT (and trunk) now makes it possible to
> register the interceptor using init-params, but I have two problems:
>
> 1. JSONP support demands two outinterceptors (in addition to the
> ininterceptor); a pre-stream interceptor and a post-stream
> interceptor. How can I specify multiple interceptors using init-param?
> I have tried with
> <init-param>
> <param-name>jaxrs.outInterceptors</param-name>
>
> <param-value>org.apache.cxf.jaxrs.provider.jsonp.JsonpPreStreamInterceptor,
> org.apache.cxf.jaxrs.provider.jsonp.JsonpPostStreamInterceptor
> </init-param>
> , but it only picks up the last one, not both (reversing the two
> outinterceptors above showes it).
>
The values are space-separated,
<init-param>
<param-name>jaxrs.outInterceptors</param-name>
<param-value>
org.apache.cxf.jaxrs.provider.jsonp.JsonpPreStreamInterceptor
org.apache.cxf.jaxrs.provider.jsonp.JsonpPostStreamInterceptor
</param-value>
</init-param>
> 2. How can I specify properties to the interceptors like featured on
> http://cxf.apache.org/docs/jax-rs-data-bindings.html#JAX-RSDataBindings-JSONWithPadding?
> For instance to change the mediatype that is set.
>
That is not possible right now. I've been thinking of creating a
light-weight version of beans.xml, for
some simple injection be supported, for users be able to create say
application.xml and reference it from init param and
get it resolved without using Spring but I could not prioritize it -
I'll try to get to it at some later stage...
Cheers, Sergey
> Regards
> Carl-Erik Kopseng
>
--
Sergey Beryozkin
http://sberyozkin.blogspot.com
Talend - http://www.talend.com