I've tried dynamically setting a password callback for simple plain text
authentication, as per example in the documentation here;
http://ws.apache.org/ws-fx/wss4j/package.html

But it just doesn't work, there's no header added to the soap message.
I've seen that others have had problems, as described here;
http://www.mail-archive.com/[email protected]/msg00092.html

I've tried basically three ways of setting it up, here's one of them;

Service  service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(new java.net.URL("http://localhost:8000/Serve";));
call.setOperationName(new QName("https://localhost:8000/Serve";, "method0"));
call.setProperty(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN); 
               
call.setProperty(WSConstants.PASSWORD_TYPE_ATTR, WSConstants.PASSWORD_TEXT);
call.setProperty(WSHandlerConstants.PW_CALLBACK_CLASS, 
this.getClass().getName());
call.addParameter("param0", org.apache.axis.encoding.XMLType.XSD_STRING, 
javax.xml.rpc.ParameterMode.IN); 
call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING);
String result = (String) call.invoke(new String[] {param});

Is this supposed to work? What is the best way to debug this? I am using
axis v1.2 and wss4j form CVS yesterday. wss4j was compiled with axis
v1.2rc3 as it comes with wss4jj CVS, but I assume it's not important.

-- 
Torgeir Veimo <[EMAIL PROTECTED]>

Reply via email to