AW: ntlm Auth , getting "Unable to respond to any of these challenges: {negotiate=Negotiate}"

Clemens Wyss DEV <[email protected]>
Newsgroups gmane.text.xml.axis.user
Message-ID <E594BA962D832C49A3CF858DAA3A696C17FCA79E4E@Exchange2007.mysigndomain.corp>
Calling the WS-URI with curl I get:

"HTTP/1.1 401 Unauthorized
Content-Length: 0
Server: Microsoft-HTTPAPI/2.0
WWW-Authenticate: Negotiate
Date: Fri, 19 Oct 2012 09:46:53 GMT

HTTP/1.1 401 Unauthorized
Content-Length: 0
Server: Microsoft-HTTPAPI/2.0
WWW-Authenticate: Negotiate
Date: Fri, 19 Oct 2012 09:46:53 GMT

HTTP/1.1 401 Unauthorized
Content-Length: 0
Server: Microsoft-HTTPAPI/2.0
WWW-Authenticate: Negotiate
Date: Fri, 19 Oct 2012 09:46:53 GMT
..."

And finally

"curl: (47) Maximum (50) redirects followed"

-----Ursprüngliche Nachricht-----
Von: Clemens Wyss DEV [mailto:[email protected]] 
Gesendet: Freitag, 19. Oktober 2012 11:46
An: [email protected]
Betreff: ntlm Auth , getting "Unable to respond to any of these challenges: {negotiate=Negotiate}"

Doing ntlm authentication to access a .NET Webservice. 
Unfortunately I am getting:
Unable to respond to any of these challenges: {negotiate=Negotiate}

When I access the site/uri with the browser (safari) I am getting the login-Dialog to authenticate and can then access the webservice.

My auth-code looks alike

...
final NTCredentials ntCredentials = new NTCredentials( "<uid>", "<pw>", "", "<domain>" ); final CredentialsProvider ntCredentialsProvider = new CredentialsProvider() {
	public Credentials getCredentials(final AuthScheme scheme, final String host, int port, boolean proxy) throws CredentialsNotAvailableException {
		return ntCredentials;
	}
};
DefaultHttpParams.getDefaultParams().setParameter( "http.authentication.credential-provider", ntCredentialsProvider ); ...

Also trying to force NTML-only (in order to omit negotiation) fails:
...
// force NTLM
DefaultHttpParams.getDefaultParams().setParameter( "http.protocol.handle-authentication", false ); List<String> authpref = new ArrayList<String>(); authpref.add( AuthPolicy.NTLM ); DefaultHttpParams.getDefaultParams().setParameter( "http.auth.target-scheme-pref", authpref );
DefaultHttpParams.getDefaultParams().setParameter( "http.auth.proxy-scheme-pref", authpref );        
...

It used to work before the endpoint was moved to another host. There I would/did see (in the log/console):
- ntlm authentication scheme selected

What can I do to narrow down this problem?

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.