lingpri

Failure Authenticating with NTLM

Discussion created by lingpri on May 7, 2014
Hi I'm trying to access the webservice thru a standalone java application in Windows and am getting the following error. Pls advise

May 7, 2014 4:37:09 PM org.apache.commons.httpclient.HttpMethodDirector processWWWAuthChallenge
INFO: Failure authenticating with NTLM <any realm>@agsdev:80
Exception in thread "main" com.esri.arcgisws.runtime.exception.ArcGISWebServiceException: HTTP status code {401 - Unauthorized} received from server
at com.esri.arcgisws.runtime.WebServiceProxyImpl.dispatchRequest(Unknown Source)
at com.esri.arcgisws.runtime.WebServiceProxyImpl.dispatchRequest(Unknown Source)
at com.esri.arcgisws.FeatureServerBindingStub.getCount(FeatureServerBindingStub.java:65)
at TestArcObjects.main(TestArcObjects.java:27)
Caused by: com.esri.arcgisws.runtime.exception.ArcGISWebServiceException: HTTP status code {401 - Unauthorized} received from server
at com.esri.arcgisws.runtime.transport.http.HttpClientConnectionChannelImpl.a(Unknown Source)
at com.esri.arcgisws.runtime.transport.http.HttpClientConnectionChannelImpl.sendRequest(Unknown Source)
 
FeatureServerBindingStub stub = new FeatureServerBindingStub("http://agsdev/ags/services/PING/COMMFLMSW/MapServer/FeatureServer?wsdl","username","***");

  if(stub != null){
   stub.setProperty("Domain", "WM");
   com.esri.arcgisws.QueryFilter filter = new com.esri.arcgisws.QueryFilter();
   filter.setWhereClause("1=1");
   System.out.println("Test passed"+stub.getCount(0,"POLYGON_STATUS = 1" , filter, null));
     
   
  }

Outcomes