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 keith chapman <ke...@gmail.com> on 2008/09/02 06:58:27 UTC
Re: Problem using NTLM authentication
Can you try adding the following parameter to your client axis2.xml
<parameter name="Proxy">
<Configuration>
<ProxyHost>proxy.wso2.org</ProxyHost>
<ProxyPort>5678</ProxyPort>
<ProxyUser>EXAMPLE\keith</ProxyUser>
<ProxyPassword>keithsPassword</ProxyPassword>
</Configuration>
</parameter>
Thanks,
Keith.
On Thu, Aug 21, 2008 at 3:09 PM, Rajat Bhushan <ra...@oracle.com>wrote:
> Hi.
>
> I am trying to access a .NET web service which expects NTLM
> credentials. I am using the code given below but it is not working. Actually
> I am getting a pop-up asking me for the credentials. I don't want that to
> happen. I want to provide the credentials in the code itself. Can some one
> please point out what is going wrong or help me with how to do this.
>
> Options options = new Options();
> options.setAction(NAMESPACEProject+"ReadProject");
> options.setTo(targetUrl);
>
> Header hdr1 = new Header("PjAuth",contextString);
> ArrayList hdrs = new ArrayList();
> hdrs.add(hdr1);
>
> *HttpTransportProperties.Authenticator auth = new
> HttpTransportProperties.Authenticator();
> auth.setDomain("ST-IDC");
> auth.setUsername("rabhusha");
> auth.setPassword("123456");
> auth.setHost("RABHUSHA");*
>
> options.setProperty(HTTPConstants.AUTHENTICATE,auth);
>
> options.setProperty(HTTPConstants.HTTP_HEADERS,hdrs);
> client.setOptions(options);
>
> OMElement res = client.sendReceive(readProjectInfo);
>
>
> Thanks & Regards,
> Rajat Bhushan
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For additional
> commands, e-mail: axis-user-help@ws.apache.org
--
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/
blog: http://www.keith-chapman.org