Authentication? [message #187872] |
Fri, 09 February 2007 08:47 |
Eclipse User |
|
|
|
Originally posted by: dtinney.shaw.ca
Hi,
I've successfully generated a client stub from a .WSDL but this web service
requires authentication. I updated the SOAP interface to include
setUsername and setPassword properties and implemented them in the stub as
follows:
public void setUsername (String username) {
super.setUsername(username);
}
public void setPassword (String password) {
super.setPassword(password);
}
I'm still getting an "unauthorized" message back, my mainline looks like:
public void testExecute() {
AboutTimeLocator myLocator = new AboutTimeLocator();
ExecuteResponseExecuteResult myResult;
try {
AboutTimeSoap myService = myLocator.getAboutTimeSoap();
myService.setUsername("AENewman");
myService.setPassword("whatmeworry");
myResult = myService.execute("<?xml version=\"1.0\"
encoding=\"utf-16\"?...");
System.out.println(myResult.toString());
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ServiceException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
Were my assumptions regarding how to supply a username/password correct?
What else should I be doing?
Thanks,
Derek.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03776 seconds