You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Alistair Young <al...@uhi.ac.uk> on 2013/10/08 12:41:56 UTC

Axis2 client not getting Digest auth challenge from server

I've used Axis2 a fair bit but never seen this. Ruby client gets this when accessing SOAP service:

Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-Powered-By: PHP/5.2.12
...
WWW-Authenticate: Digest ...

the axis2 client gets nothing so it sends a Basic auth header and gets nowhere as the server uses Digest auth but doesn't tell that to the axis2 client.

HttpTransportProperties.Authenticator authenticator = new HttpTransportProperties.Authenticator();
authenticator.setUsername("...");
authenticator.setPassword("...");
authenticator.setPreemptiveAuthentication(true);
stub._getServiceClient().getOptions().setProperty(HTTPConstants.AUTHENTICATE, authenticator);

Is there anything I'm missing in the axis2 client?

thanks,

Alistair

--
mov eax,1
mov ebx,0
int 80h


Re: Axis2 client not getting Digest auth challenge from server

Posted by Alistair Young <al...@uhi.ac.uk>.
doh! answering my own question but hope it'll be useful. Apparently chunking causes IIS to fall over. This solved the problem:

stub._getServiceClient().getOptions().setProperty(HTTPConstants.CHUNKED, "false");

Alistair

--
mov eax,1
mov ebx,0
int 80h

From: Alistair Young <al...@uhi.ac.uk>>
Reply-To: "java-user@axis.apache.org<ma...@axis.apache.org>" <ja...@axis.apache.org>>
Date: Tuesday, 8 October 2013 11:41
To: "java-user@axis.apache.org<ma...@axis.apache.org>" <ja...@axis.apache.org>>
Subject: Axis2 client not getting Digest auth challenge from server

I've used Axis2 a fair bit but never seen this. Ruby client gets this when accessing SOAP service:

Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-Powered-By: PHP/5.2.12
...
WWW-Authenticate: Digest ...

the axis2 client gets nothing so it sends a Basic auth header and gets nowhere as the server uses Digest auth but doesn't tell that to the axis2 client.

HttpTransportProperties.Authenticator authenticator = new HttpTransportProperties.Authenticator();
authenticator.setUsername("...");
authenticator.setPassword("...");
authenticator.setPreemptiveAuthentication(true);
stub._getServiceClient().getOptions().setProperty(HTTPConstants.AUTHENTICATE, authenticator);

Is there anything I'm missing in the axis2 client?

thanks,

Alistair

--
mov eax,1
mov ebx,0
int 80h