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 Alex A <al...@alex-andr.org> on 2010/11/12 21:14:59 UTC
NTLM in AXIS2 1.5.1
Hello
sorry if I am kicking a dead horse, but looks like I am running in
circles, thus asking for help here
(honestly spent two days trying and digging in archives)
I am trying to set up an Exchange 2007 EWS connection, using AXIS2 1.5.1
It works with Basic authentication, but I can't make it work with NTLM.
According to the logs, it doesn't even try:
AuthChallengeProcessor:selectAuthScheme() NTLM authentication scheme
selected
HttpMethodDirector:processWWWAuthChallenge() No credentials available
for NTLM <any realm>@192.1.1.243:80
Unable to sendViaPost to url[http://192.1.1.243/EWS/exchange.asmx]
HTTPSender:sendViaPost() org.apache.axis2.AxisFault: Transport error:
401 Error: Unauthorized
Here is the code
m_EWSservice = new ExchangeServiceStub(null, ewsUrl);
Options options = m_EWSservice._getServiceClient().getOptions();
Authenticator authenticator =
new
org.apache.axis2.transport.http.HttpTransportProperties.Authenticator();
List authScheme = new ArrayList();
authScheme.add("NTLM");
authenticator.setUsername(m_user);
authenticator.setPassword(m_password);
authenticator.setHost(host);
authenticator.setAllowedRetry(true);
authenticator.setDomain(domain);
authenticator.setRealm(domain);
authenticator.setPort(80);
authenticator.setAuthSchemes(authScheme);
options.setProperty(
org.apache.axis2.transport.http.HttpTransportProperties.Authenticator.NTLM,
authenticator);
options.setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,
authenticator);
options.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED,
false);
m_EWSservice._getServiceClient().setOptions(options);
Unfortunately, most of the examples I could google up use different set
of options (Now obsolete ???)
For example here :
http://wso2.org/library/161
and the examples in the documentation seem to be utterly insufficient.
http://axis.apache.org/axis2/java/core/1_5_1/http-transport.html
Please help answering the questions:
1) Am I missing something in the configuration?
2) Is there a good example how to configure NTLM and DIGEST (Yes, I will
need it too, but even frighten to think about it for now)
3) What are the external library dependencies? Do I need additional
Crypto jars to support NTLM?
4) I am getting INFO level messages - how can I enable DEBUG level for Axis?
Thanks,
~ Alex.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org