CXF doesn't use the HTTPClient at all. We just use the HTTPUrlConnection stuff built into the JDK. Thus, re-using an HTTPClient is a non-trivial task. I don't know if it's possible, but can you get the negotiated credentials (probably a cookie and some Authorization headers) from the HTTPClient object? (I'm not completely familiar with the API's) If so, you can configure the CXF http conduit to use the same data.

Dan


On May 12, 2008, at 7:20 PM, Mark_Huang wrote:


I am evalution a couple of WS framework for our new project.

One of the scenary we need to support:
We use SSL and siteMinder to protect the resource. The siteMinder
configuration requires the login using the passphrase challenge...
Eventually I need to reuse the same HTTPClient object that has been used for siteMinder authentication to send a soap request (client) to the protected
web service.

Can this be easily done in CXF? It seems HttpConduit uses the
HttpUrlconnection and not sure how easily it can be extended to support HttpClient and also be able to inject the existing httpClient instance?

Axis2 can achieve this by setting
options .setProperty (org.apache.axis2.transport.http.HTTPConstants.CACHED_HTTP_CLIENT,
existingHttpClientInstance);
options .setProperty (org.apache.axis2.transport.http.HTTPConstants.REUSE_HTTP_CLIENT,
Boolean.TRUE);

Any help will be appreciated.
--
View this message in context: 
http://www.nabble.com/How-to-reuse-HttpClient-in-CXF-tp17192853p17192853.html
Sent from the cxf-user mailing list archive at Nabble.com.


---
Daniel Kulp
[EMAIL PROTECTED]
http://www.dankulp.com/blog




Reply via email to