cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <>
Subject Re: JAXRS client configuration via Spring
Date Mon, 10 Dec 2012 21:55:39 GMT
On 10/12/12 21:35, Sven Zethelius wrote:
> I'm currently using CXF 2.4.1, with Spring 3.0 inside a tomcat container.  I have a working
jaxrs:client declaration.  I’m trying (and failing) to configure the timeout information
on the client so the client timeout sooner if the service we are calling is slow.  I was trying
to follow the "CXF way" before I go in and start writing code to fill out the necessary objects,
but I've reached a point where I can't figure out how the "CXF way" works under the covers
to debug it.  I've been following the documentation from here:
to create the following bean declaration:
> 	<http-conf:conduit name="*.http-conduit">
> 		<http-conf:client
> 				ReceiveTimeout="100" />
> 	</http-conf:conduit>
> 	<jaxrs:client id="MyClient"
> 		address=""
> 		serviceClass="com.expedia.IMyService">
> 		<jaxrs:inInterceptors>
> 			<ref bean="LoggingInInterceptor" />
> 		</jaxrs:inInterceptors>
> 		<jaxrs:outInterceptors>
> 			<ref bean="LoggingOutInterceptor" />
> 		</jaxrs:outInterceptors>
> 	</jaxrs:client>
> I've debugged far enough to see the bean definition for the HttpConduit being created
by the HttpConduitBeanDefinitionParser, but I'm not seeing what is linking the HttpConduit
bean with the HttpClientPolicy that gets put in the Spring ApplicationContext to the HttpTransportFactory
that is in use by the JAXRS client.  As far as I can tell, the HttpTransportFactory doesn't
look at the bus for existing Conduits, so it'll create a different instance with a new HttpClientPolicy.
> What am I missing?

I recall Dan helping me to get a bug fixed which was preventing the 
linking working, I added this test resource:

But I don't remember what exactly was done to get it working :-)

Try the last released CXF 2.4.10 - I think the fix should be there

thanks, Sergey

View raw message