You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by helenlok <he...@gmail.com> on 2016/10/14 05:15:30 UTC
http-conf:client not working
Hi, I'm trying to edit the default timeout for my web service to wait for a
response where it is set with a Thread.sleep for 5000 ms.
I set the timeout to be 1000 ms using http-conf:client and it suppose to be
timeout in 1000 ms seconds instead but nothing occurs.
Can someone enlighten me as to what I am doing wrong?
I had to edit out some of the names of my config file, but everything is
listed below.
Thanks a lot.
(Config file below)
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:camel="http://camel.apache.org/schema/spring"
xmlns:cxf="http://camel.apache.org/schema/cxf"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
http://camel.apache.org/schema/cxf
http://camel.apache.org/schema/cxf/camel-cxf.xsd
http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd">
<http-conf:conduit name="*.http-conduit">
<http-conf:client ReceiveTimeout="1000"
ConnectionTimeout="1000"/>
</http-conf:conduit>
<camelContext xmlns="http://camel.apache.org/schema/spring">
<endpoint
uri="cxf:http://someservice?dataFormat=PAYLOAD&wsdlURL=http://someservice?wsdl&"
id="endpointa" />
<endpoint
uri="cxf:http://someservice1?dataFormat=PAYLOAD&wsdlURL=http://someservice1?wsdl&"
id="endpointb" />
<route customId="true" id="route1">
<from uri="direct:route1" />
<to ref="endpointa" />
</route>
<route customId="true" id="route2">
<from uri="direct:route2"/>
<to ref="endpointb"/>
</route>
</camelContext>
</beans>
--
View this message in context: http://camel.465427.n5.nabble.com/http-conf-client-not-working-tp5788755.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: http-conf:client not working
Posted by Willem Jiang <wi...@gmail.com>.
Hi helenlok,
CXF uses a bus to pick up the configuration from spring, if the camel-cxf endpoint doesn’t have the bus you may have the trouble to set the client configuration from spring.
<import resource="classpath:META-INF/cxf/cxf.xml”/> can setup a bus in the spring application context.
Here is the test example[1] which we use in camel-cxf, you can take it as an example.
--
Willem Jiang
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem
On October 14, 2016 at 3:40:18 PM, helenlok (helenlok1960@gmail.com) wrote:
> Hi, I'm trying to edit the default timeout for my web service to wait for a
> response where it is set with a Thread.sleep for 5000 ms.
>
> I set the timeout to be 1000 ms using http-conf:client and it suppose to be
> timeout in 1000 ms seconds instead but nothing occurs.
>
> Can someone enlighten me as to what I am doing wrong?
>
> I had to edit out some of the names of my config file, but everything is
> listed below.
>
> Thanks a lot.
>
> (Config file below)
>
>
>
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:camel="http://camel.apache.org/schema/spring"
> xmlns:cxf="http://camel.apache.org/schema/cxf"
> xmlns:context="http://www.springframework.org/schema/context"
>
> xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
> xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
> http://www.springframework.org/schema/context
> http://www.springframework.org/schema/context/spring-context.xsd
> http://camel.apache.org/schema/spring
> http://camel.apache.org/schema/spring/camel-spring.xsd
> http://camel.apache.org/schema/cxf
> http://camel.apache.org/schema/cxf/camel-cxf.xsd
> http://cxf.apache.org/transports/http/configuration
> http://cxf.apache.org/schemas/configuration/http-conf.xsd">
>
>
> > ConnectionTimeout="1000"/>
>
>
>
>
> > uri="cxf:http://someservice?dataFormat=PAYLOAD&wsdlURL=http://someservice?wsdl&"
> id="endpointa" />
>
> > uri="cxf:http://someservice1?dataFormat=PAYLOAD&wsdlURL=http://someservice1?wsdl&"
> id="endpointb" />
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/http-conf-client-not-working-tp5788755.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>