Hi

What version of Camel do you use?

On Thu, Jul 24, 2014 at 2:01 AM, cdryst <[email protected]> wrote:
> Hello I'm trying to set the providers property for the endpoint of my rest
> service:
>
> <route id="restEndpoint">
>                         <from
> uri="cxfrs:///restEp?resourceClasses=com.services.RestServiceInt&amp;bindingStyle=SimpleConsumer&amp;providers=#corsProvider"/>
> .
> .
> .
> </route>
>
> I've defined a bean to enable Cors on the service:
>
> <bean id="#corsProvider"
> class="org.apache.cxf.rs.security.cors.CrossOriginResourceSharingFilter" />
>
> When I run the application it gives me the error:
>
> Caused By: java.lang.IllegalArgumentException: Could not find a suitable
> setter for property: providers as there isn't a setter method with same
> type: java.lang.String nor type conversion possible: No type converter
> available to convert from type: java.lang.String to the required type:
> java.util.List with value #corsProvider
>         at
> org.apache.camel.util.IntrospectionSupport.setProperty(IntrospectionSupport.java:560)
>         at
> org.apache.camel.util.IntrospectionSupport.setProperty(IntrospectionSupport.java:570)
>         at
> org.apache.camel.util.IntrospectionSupport.setProperties(IntrospectionSupport.java:454)
>         at
> org.apache.camel.util.EndpointHelper.setProperties(EndpointHelper.java:249)
>         at
> org.apache.camel.impl.DefaultComponent.setProperties(DefaultComponent.java:272)
>         Truncated. see log file for complete stacktrace
>>
>
> I already notice that I must put a List instead a Cors bean but it always
> read it as a String so it has the same effect,
>
> How do I inject it then? will it fix my Cors problem anyway?
>
> Thanks
>
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Set-providers-property-on-uri-for-cxfrs-endpoint-tp5754319.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [email protected]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Reply via email to