cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Watson <>
Subject NTLM & Session Cookies
Date Tue, 26 Feb 2013 09:54:11 GMT

I am trying to authenticate to an IIS based web service using NTLM. The
credentials appear to be accepted but because the session cookie is not
being sent back to the server it ultimately returns a 401.5.

I can see the successful logon in the windows event log on the server and I
see the 401.5 in the IIS log. From the client side, using wireshark I can
see that the NTLM exchange goes as expected but that none of the cookies
set by the original 401 response are sent back to the server in the
subsequent requests.

I use this to supposedly trigger cookie maintenance loosely borrowed from
here <>:

And this is how I try to handle NTLM:
Bus bus = BusFactory.getDefaultBus();
bus.setProperty("use.async.http.conduit", "true");

Client client = ClientProxy.getClient(port);

HTTPConduit http = (HTTPConduit) client.getConduit();
if (http instanceof AsyncHTTPConduit) {
AsyncHTTPConduit conduit = (AsyncHTTPConduit) http;
 DefaultHttpAsyncClient defaultHttpAsyncClient;
try {
defaultHttpAsyncClient = conduit.getHttpAsyncClient();
 } catch (IOException exception) {
throw new RuntimeException(exception);
new NTCredentials(username, password,
                        InetAddress.getLocalHost().getHostName(), domain));


So I really have three questions:

   1. Do/why do I need to use HttpAsyncClient for NTLM?
   2. Is session cookie support implemented for HttpAsyncClient?
   3. If so, what am I doing wrong???

BTW I'm using CXF v2.7.3.

Thanks in advance

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message