Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Credentials cannot be used for NTLM authentication

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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);






----------------------------------------------------------------------
 
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cross posting won't help you in getting a better answer but surely it wastes time of others. Please stick to your original thread.
 
dhaval.shah
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i just posted initially in a wrong category so thought to correct myself.
thanks.
 
Wait for it ... wait .... wait .... NOW! Pafiffle! A perfect tiny ad!
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!