hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Ostendorf <karl.ostend...@t-fs.de>
Subject Problems accessing MapPoint web service after upgrading to 3.0 RC4
Date Fri, 18 Nov 2005 16:27:11 GMT
Hello,

Our Axis 1.3 SOAP application to access Microsoft's Mappoint web services stopped working
after switching to http-client v3RC4 from v3RC3.  Specifically we started receiving 401 (Unauthorized)
responses under RC4 where in RC3 it just worked.  After some debugging I traced the problem
down to the HttpMethodDirector.promptForCredentials method lines 856-857.  Under RC4 the call
to params.getParameter to get the CredentialsProvider returns a null while under RC3 it returns
a valid CredentialsProvider.

The java code to access the MapPoint services we generated from the MapPoint WSDL file using
WSDL2Java from the Axis 1.3 package.  MapPoint authenticates clients via the DIGEST method
and because the built-in Axis web client doesn't support DIGEST we followed the documentation
and configured Axis to use the commons http-client.  Additionally, we are accessing the service
via SSL on the staging servers.


I have included the code to reproduce the problem below.  If any http-client developer would
like to tackle this problem please contact me.  I might be able to supply the login credentials
to our account in order to spare someone from having to create a new account and uploading
the necessary polygon data to the servers.

The code below retrieves a URL for a polygon on the servers.


  public String getUrl(int entityId) throws MalformedURLException,
      javax.xml.rpc.ServiceException, RemoteException {

    log.info("EntityID: " + entityId);

    FindServiceLocator flocator = new FindServiceLocator();
    FindServiceSoap_PortType finder = flocator.getFindServiceSoap();
    ((FindServiceSoap_BindingStub) finder).setUsername(this.username);
    ((FindServiceSoap_BindingStub) finder).setPassword(this.password);

    // location
    FindFilter filter = new FindFilter();
    filter.setEntityTypeName(ENTITY_TYPE);
    FindByIDSpecification spec = new FindByIDSpecification();
    spec.setDataSourceName(DS_POLYGONS);
    spec.setEntityIDs(new int[] { entityId });
    spec.setFilter(filter);

    FindResults found = finder.findByID(spec);

  }

-- 
T-FS

Karl Ostendorf
Friedrichstr. 30
49610 Quakenbr├╝ck
Germany

Mail: karl.ostendorf@t-fs.de
Fon: +49 5431 941215


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message