aspose file tools*
The moose likes Web Services and the fly likes Credentials cannot be used for NTLM authentication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Credentials cannot be used for NTLM authentication" Watch "Credentials cannot be used for NTLM authentication" New topic
Author

Credentials cannot be used for NTLM authentication

dhaval.shah
Greenhorn

Joined: Oct 15, 2008
Posts: 7
i have webservice deployed over another server and on client side i am generating a stub which is using that service.

But the problem is that i have to pass through the proxy settings of my company so its giving me this errors


----------------------------------------------------------------------
ERROR

11:44:16,688 INFO [STDOUT] 2008-10-30 11:44:16,688 ERROR [HttpMethodDirector-authenticate-235]-Credentials cannot be used for NTLM authentication: org.apache.commons.httpclient.UsernamePasswordCredentials


org.apache.commons.httpclient.auth.InvalidCredentialsException: Credentials cannot be used for NTLM authentication: org.apache.commons.httpclient.UsernamePasswordCredentials


11:44:16,719 INFO [STDOUT] 2008-10-30 11:44:16,719 ERROR [searchTrip_jsp-_jspService-658]-Transport error: 407 Error: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
org.apache.axis2.AxisFault: Transport error: 407 Error: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )



my code is as folows

----------------------------------------------------------------------


HttpTransportProperties.ProxyProperties http = new HttpTransportProperties.ProxyProperties();
http.setUserName("username");
http.setPassWord("password");
http.setProxyName("urlofproxy");
http.setProxyPort(80);
http.setDomain("domainname");

Options options = new Options();
options.setProperty(HTTPConstants.PROXY, http);
options.setUseSeparateListener(false);
options.setTo(new org.apache.axis2.addressing.EndpointReference(
URLUtil.getUrl("webserviceurl", config)));

WebserviceStub webserviceStub= new WebserviceStub ("URL_of_wsdl");

ServiceClient serviceClient = webserviceStub._getServiceClient();
serviceClient.setTargetEPR(new org.apache.axis2.addressing.EndpointReference("URL_of_wsdl"));

serviceClient.setOptions(options);

webServiceStub._setServiceClient(serviceClient);






----------------------------------------------------------------------
Vinod K Singh
Ranch Hand

Joined: Sep 30, 2008
Posts: 198
Cross posting won't help you in getting a better answer but surely it wastes time of others. Please stick to your original thread.


My Blog
dhaval.shah
Greenhorn

Joined: Oct 15, 2008
Posts: 7
i just posted initially in a wrong category so thought to correct myself.
thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Credentials cannot be used for NTLM authentication
 
Similar Threads
Problem with Axis2 via proxy with NTLM authentication (currently defaulting to BASIC)
Generated Stub and Proxy Settings !!
Proxy authentication errors
proxy settings in servlet
axis2 ntlm authentication - No credentials available for NTLM