Hello,
I'am trying to create a Xfire client to talk with a webservice behind a
username and password.
I use the XFireClientFactoryBean. When I call a method of the webservice
I get the following Exception:
java.io.IOException: Server returned HTTP response code: 401 for URL:
http://localhost:9080/fedora/services/access?wsdl
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1149)
I don't know why the client wants the wsdl url:
"http://localhost:9080/fedora/services/access?wsdl" because I set the
lookupServiceOnStartup to false.
I want to config the bean in spring. For testing I did the following:
HttpClientParams httpClientParams = new HttpClientParams();
httpClientParams.setBooleanParameter(HttpMethodParams.USE_EXPECT_CONTINUE,
true);
httpClientParams.setParameter("username", "fedoraAdmin");
httpClientParams.setParameter("password", "*****");
XFireClientFactoryBean factory = new XFireClientFactoryBean();
factory.setWsdlDocumentUrl("http://localhost:9080/fedora/services/access?wsdl");
factory.setServiceClass(FedoraAPIA.class);
// factory.setPassword("*****");
// factory.setUsername("fedoraAdmin");
factory.setLookupServiceOnStartup(false);
factory.setUrl("http://localhost:9080/fedora/services/access");
factory.setNamespaceUri("http://www.fedora.info/definitions/1/0/api/");
factory.setServiceName("Fedora-API-A-Service");
try {
factory.afterPropertiesSet();
} catch (Exception e) {
log.error(e,e);
throw new DaoException("could not init factory", e);
}
FedoraAPIA test = null;
try {
test = (FedoraAPIA)factory.getObject();
} catch (Exception e) {
log.error(e,e);
throw new DaoException("could not create client", e);
}
What should I do to call the webservice and don't get an error?
Regards,
Martin
--
Martin Tilma
Func. Internet Integration
W http://www.func.nl
T +31 20 4230000
F +31 20 4223500
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email