We should call an internal web service but we always get the error message Transport error: 401 Error: Unauthorized.

We try to authenticate with NTLM and we have the suspicion that we made wrong configuration settings. How can we configure Ivy to work with NTLM based web services?

asked 08.08.2011 at 11:09

Marcel%20L%C3%BCke's gravatar image

Marcel Lüke
(suspended)
accept rate: 0%


Xpert.ivy supports NTLM authentication for web services exclusively with Axis 2 which uses the good old HTTPClient library. Unfortunately this library does not support all NTLM versions.

Use something like this:

import org.apache.axis2.transport.http.HttpTransportProperties;
import org.apache.axis2.transport.http.HTTPConstants;

HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator();
auth.setDomain( "yourDomain" );
auth.setHost( "einHost" );
authSchemes.add(HttpTransportProperties.Authenticator.NTLM);
auth.setAuthSchemes(authSchemes)
auth.setPreemptiveAuthentication(true); // send authentication info at once
axisClientOptions.setProperty(HTTPConstants.AUTHENTICATE, auth);

This code work with some Sharepoint services and NTLM. If you need to know more about authentication with NTLM and Axis please refer to internet resources.

link

answered 17.08.2011 at 11:38

Tamas%20KIS's gravatar image

Tamas KIS
(suspended)
accept rate: 60%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×48
×40

Asked: 08.08.2011 at 11:09

Seen: 2,039 times

Last updated: 08.08.2011 at 11:09