Hi,

just some guess from the error message. Have you tried: <toD 
uri="http4://localhost:9001?cookieStore=#customCookieStore" />?

Best regards
Stephan

-----Original Message-----
From: Joery Vreijsen [mailto:jhjvreij...@gmail.com] 
Sent: Montag, 29. Januar 2018 10:53
To: users@camel.apache.org
Subject: camel-http4 cookieStore property

Hi,

I’m trying to set a customCookieStore to my http4 endpoint configured as below:

<toD uri="http4://localhost:9001?cookieStore=customCookieStore" />

This gives me the following exception:

Failed to resolve endpoint: 
http4://localhost:9001?cookieStore=customCookieStore due to: Could not find a 
suitable setter for property: cookieStore 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.http.client.CookieStore with value customCookieStore

It doesn’t seem get the reference to my declared bean of the customCookieStore:

<bean id=“customCookieStore" class=“org.company.package.customCookieStore" />

Am I doing something wrong in the configuration?

When declaring a bean for the http4 component in my blueprint.xml, it does 
however work as expected:

<bean id="http4" class="org.apache.camel.component.http4.HttpComponent">
    <property name="cookieStore" ref=“customCookieStore"/>
</bean>

Cheers!

- Joery Vreijsen



Reply via email to