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 Arindam Roy <ar...@hotmail.com> on 2007/03/09 11:05:03 UTC
ntlm authentication and Axis 2
Hi,
I am using Axis 2 to communicate with a server which has ntlm authentication. When I am invoking web service methods which do not involve any attachment, it is working fine. Using TCP packet capturing, I can even see the NTLM authentication happening via challenge/response handshaking. One problem that I see here is that for every method invocation the ntlm authentication is occuring which is a kind of redundancy. I think this is happening because pre-authentication feature is not built into Axis 2 or common httpclient.
But the more serious problem is happening when I am trying to post data as attachment. The entire SOAP request is sent as a multipart MIME-encoded request. The first part is the SOAP envelope, and the second part is the attachment. But as it seems to me the ntlm authentication handshaking is getting into way and the client is not responding accordingly and is continuing with its multipart post. I am using Axis 2-1.1.1 version. The authentication code used is like below:
HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator(); auth.setUsername("Admin"); auth.setPassword("<password>"); auth.setRealm(""); auth.setDomain(""); auth.setHost("<ip-addr>"); auth.setPort(80); options.setProperty(HTTPConstants.AUTHENTICATE, auth); options.setProperty(HTTPConstants.HEADER_CONNECTION_KEEPALIVE,Constants.VALUE_TRUE); options.setTo(targetEPR); options.setTransportInProtocol(Constants.TRANSPORT_HTTP); options.setProperty(Constants.Configuration.ENABLE_MTOM,Constants.VALUE_TRUE); options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.BASE_64_CONTENT_QNAME); ServiceClient servClient = new ServiceClient(); servClient.setOptions(options); OMElement result = servClient.sendReceive(method);
I am new to Axis and authentication. Any suggestion would be of great help.
_________________________________________________________________
Windows Live Spaces is here! It’s easy to create your own personal Web site.
http://spaces.live.com/?mkt=en-in
RE: ntlm authentication and Axis 2
Posted by Brecht Yperman <Br...@invenso.com>.
Hi all,
I'm having a similar problem, where we are sending over 1000 calls in
about one hour.
However, for each call:
- first a simple request is done
- the proxy server responds that needs NTLM
- then a request is sent with the proxyhost and the proxyport
- the proxy server then responds that we don't have access to that URL
- then a request is sent with all of the proxy parameters (host, port,
user, domain, password)
Is it possible to get Axis2 to send all of the parameters the first
time? This would reduce sending time with at least one second, I think
(so over 25%).
Thanks,
Brecht
From: Arindam Roy [mailto:arin_bec@hotmail.com]
Sent: vrijdag 9 maart 2007 11:05
To: axis-user@ws.apache.org
Subject: ntlm authentication and Axis 2
Hi,
I am using Axis 2 to communicate with a server which has ntlm
authentication. When I am invoking web service methods which do not
involve any attachment, it is working fine. Using TCP packet capturing,
I can even see the NTLM authentication happening via challenge/response
handshaking. One problem that I see here is that for every method
invocation the ntlm authentication is occuring which is a kind of
redundancy. I think this is happening because pre-authentication feature
is not built into Axis 2 or common httpclient.