On 12/05/13 18:53, arjjun dhar wrote:
I think I realize the issue ... when you provide multiple MessageBodyReader's under<jaxrs:providers>; it filters the provider by first matching MediaType (See {@link ProviderFactory#chooseMessageReader} ). (I dont understand why .. because its likely many WebService end points may have the same MediaType but different parameter (Object ) types .. so it picks the first one that matches always. I was also hoping "MessageBodyReader.isReadable(...)" .. would provide some filtering abilites, but looks like thats only called in a specific condition. And provides no real filtering ability.I've had to hack my way around this. I cant be the bright way so am sure in terms of configuring my providers Im doing something wrong. ... Is MEDIA TYPE the only filter for which Provider is used? Wierd !!
You've been asking about ParameterConverters as far as I recall. MessageBodyReaders are not even taken into consideration when processing the parameters (those annotated with @PathParam, etc), they are only used to handle typically a single method parameter representing a request/message body.
MBR.isReadable is checked, furthermore, the class a given MBR is typed upon is also checked, in 2.7.x it is a secondary key, in 2.8.0 - a primary key, media type - secondary key
Sergey
-- View this message in context: http://cxf.547215.n5.nabble.com/jaxrs-providers-not-respected-when-migrating-from-2-5-2-to-2-7-x-tp5723630p5727562.html Sent from the cxf-user mailing list archive at Nabble.com.
-- Sergey Beryozkin Talend Community Coders http://coders.talend.com/ Blog: http://sberyozkin.blogspot.com
