camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: cxfEndpointConfigurer in an URI
Date Tue, 27 Oct 2015 13:41:10 GMT
Works in Java too, but you should add the bean to the registry. That
depends a bit how you create and start camel in java.

There is JndiRegistry / SimpleRegistry / CdiRegistry etc.

On Tue, Oct 27, 2015 at 2:24 PM, rambo <simon.gingras@dgag.ca> wrote:
> Hi Claus,
>
> Thanks for the reply. This will work using XML, but I forgot to say that we
> want to use java code to define the routes. If I use a reference to the
> registry in a java code URI, it does not work.
>
> ex: From("cxf:/customer?cxfEndpointConfigurer=#myEndpointConfigurer")
>
> I still get the same error message that there is no String setter for the
> cxfEndpointConfigurer property.
>
> I guess this specific situation is not supported right now. Will it be in
> the future?
>
> Thanks
>
>
> Claus Ibsen-2 wrote
>> You need to register your custom configurer in the registry and refer
>> to it using the # notation.
>>
>> See
>> http://camel.apache.org/how-do-i-configure-endpoints.html
>> http://camel.apache.org/registry.html
>>
>> On Mon, Oct 26, 2015 at 10:39 PM, rambo &lt;
>
>> simon.gingras@
>
>> &gt; wrote:
>>> Hi,
>>>
>>> I'm using camel to expose a CXF SOAP service and I want to do it using an
>>> URI only. I need to add a custom "In" interceptor so I want to use a
>>> CxfEndpointConfigurer and add code to configureServer().
>>>
>>> Here's my URI:
>>>
>>> From("cxf:/customer?serviceClass=my.package.Customer&loggingFeatureEnabled=True&cxfEndpointConfigurer=my.package.CustomerEndpointConfigurer")
>>>
>>> CustomerEndpointConfigurer is a class implementing the
>>> CxfEndpointConfigurer
>>> interface. I then override configure(), configureServer() and
>>> configureClient().
>>>
>>> When my .war starts in jboss 6.4 EAP, I get this error:
>>>
>>> Caused by: java.lang.IllegalArgumentException: Could not find a suitable
>>> setter for property: cxfEndpointConfigurer 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: org.apache.camel.component.cxf.CxfEndpointConfigurer with value
>>> my.package.CustomerEndpointConfigurer.
>>>
>>> Is there any way to make it work in an URI? As I see here, Camel is
>>> simply
>>> setting the String value to the CxfEndpointConfigurer property of
>>> CxfEndpoint without converting it to an object beforehand.
>>>
>>> Any help would be appreciated.
>>>
>>> Thank you!
>>>
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://camel.465427.n5.nabble.com/cxfEndpointConfigurer-in-an-URI-tp5773083.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> http://davsclaus.com @davsclaus
>> Camel in Action 2nd edition:
>> https://www.manning.com/books/camel-in-action-second-edition
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/cxfEndpointConfigurer-in-an-URI-tp5773083p5773115.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2nd edition:
https://www.manning.com/books/camel-in-action-second-edition

Mime
View raw message