Right, I checked this test:
https://github.com/apache/camel/blob/master/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringConsumerTest.java
which uses this resource:
https://github.com/apache/camel/blob/master/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringConsumer.xml
If I update CxfRsSpringConsumer.xml and remove for example a reference
to the exceptionMapper then the test starts failing, which proves the
provider registration works.
Perhaps you mean the actual CORS filter is not returning the right CORS
headers ? Typically you'd need to tune it or add Cors annotations to the
resource class for the filter to figure out what to do.
Next, re http://camel.apache.org/cxfrs.html using this "#" notation for
a number of properties such as providers=#MyProviders.
This is misleading and probably never worked as far as the assumption
that a '#' implies a reference to an instance as opposed to a class when
using it from a route cxfrs URI.
I've checked CXFRsComponent source - it pre-processes 'resourceClass' or
'resourceClasses' uri parameters *only* and it assumes the parsed values
represent classes as opposed to instances of specific classes.
CXFRsComponent does do something around #prefixed properties when a bean
is an instance of Blueprint or Spring Support but in this case these
properties are bean properties as opposed to the properties extracted
from a route cxfrs URI.
So, a summary:
- If you have a CXFRS bean then set all the providers/features/resource
classes/etc on that bean, do not overload a cxfrs URI. IMHO it does not
make sense to start over-complicating the URI if the bean is there which
is meant to support all sort of CXFRS properties.
- If one sets these parameters in URI then the only non-primitive
property which currently works is 'resourceClass(es)' whose values are
expected to be class names. I'll open a JIRA to make sure other
parameters are supported when using a URI only form, though will
probably keep the current restriction that such parameters refer to
classes only.
Cheers, Sergey
On 28/08/15 06:05, chaituu wrote:
even if i remove it from the route URI also its not working.can you check
from your side once.as per doc
http://camel.apache.org/cxfrs.html
providers Since Camel 2.12.2 set custom JAX-RS providers list to the CxfRs
endpoint.
providers=#MyProviders
initially i didn't checked the logs properly so thought its working even if
i removed from the route URI.
--
View this message in context:
http://camel.465427.n5.nabble.com/java-lang-NumberFormatException-For-input-string-cors-filter-in-camel-cxfrs-2-15-version-tp5771009p5771046.html
Sent from the Camel - Users mailing list archive at Nabble.com.
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/