2.4.10 got it reading the Spring HttpConduit.  2.4.10 has some extra logic in 
HttpTransportFactory that uses the Spring beanfactory to do additional 
initialization of the Conduit.  That I wasn't finding in 2.4.1. 

Thanks,
Sven

-----Original Message-----
From: Sergey Beryozkin [mailto:[email protected]] 
Sent: Monday, December 10, 2012 1:56 PM
To: [email protected]
Subject: Re: JAXRS client configuration via Spring

Hi
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: 
> http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html 
> 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="http://example.com/myendpoint";
>               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:
http://svn.apache.org/repos/asf/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/jaxrs-https-client4.xml

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

Reply via email to