Hi,
your code configures a HTTP authentication, not the
WSS handler. This is a big difference.
Just adding the handlers as Torgeir proposes is not enough.
The handlers must be configured as well.
first note: first try to do the wohle stuff using normal
Axis client deployment files. A complete dynamic setup
is somewhat more difficult. An example of a dynamic
setup to use the handler can be found in the test/interop
directory (JAXRPC testcase). This testcase uses the
JAX-RPC compliant handler (works similir to the Axis
dependend handlers)
Second NOTE: recently we discovered a problem in Axis
that could cause problems if you use the fully dynamic option.
Thus I would advise to use deploymentfiles to setup
the handler chain, other parameters like action,
user, etc. can be set via the configuration properties.
Torgeir Veimo schrieb:
On Fri, 2005-05-27 at 11:18 -0700, Sean Shubin wrote:
Ok, thanks. I was trying to make a SOAP call to an https service like so,
private Object invoke(String operationName, Object... params) throws
ServiceException, MalformedURLException, RemoteException {
String endpoint = WEB_SERVICE_URL;
Service service = new Service();
Call call = (Call) service.createCall();
call.setUsername(USERNAME);
call.setPassword(PASSWORD);
call.setTargetEndpointAddress(new URL(endpoint));
call.setOperationName(operationName);
Object ret = call.invoke(params);
return ret;
}
But I would still get the error "This service method requires user
authentication. Username/password is required.". Do you know if wss4j
has the solution? Or am I looking in the wrong place?
Try adding
call.setClientHandlers(new WSDoAllSender(), new WSDoAllReciever());