axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caristi, Joe" <>
Subject Is Preemptive Digest Authentication Possible?
Date Thu, 07 Apr 2011 11:28:28 GMT
I am attempting to configure preemptive authentication for an Axis2 client.  From my research,
it seems like the code below should work, but in tcpmon I am still seeing pairs of unauthenticated
requests followed by digest requests.  I did find information on populating an authentication
data cache for preemptive authentication (
but this seems to be based on the org.apache.http.client components, not the org.apache.commons.httpclient
that is used by Axis2.  I would also assume that Axis2 is doing this for us?

Does anyone know how to make this work?  The service stub in the following code was generated
by Axis2 wsdl2java

HttpTransportProperties.Authenticator authenticator = new HttpTransportProperties.Authenticator();
authenticator.setAuthSchemes(Arrays.asList(new String[]{HttpTransportProperties.Authenticator.DIGEST}));
Options options = serviceStub._getServiceClient().getOptions();
options.setProperty(HTTPConstants.CONNECTION_TIMEOUT, 72000);
options.setProperty(HTTPConstants.SO_TIMEOUT, 72000);
options.setProperty(HTTPConstants.AUTHENTICATE, authenticator);


The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at,
and destroy all copies of this message and any attachments.

View raw message