Are you supposed to be able to engage a module such as Rampart at the
operation level in client code (rather than for the service as a whole)?
I've tried the following, which looks like it should work based on the API:
// find the rampart module from configuration
ServiceClient client = stub._getServiceClient();
*AxisModule rampart =
client.getAxisConfiguration().getModule("rampart");*
// configure username token policy for retrieval operations
Policy policy = loadPolicy("username-policy.xml");
AxisOperation getbytype = client.getAxisService().
getOperation(new QName("http://ws.sosnoski.com/library/wsdl",
"getBooksByType"));
getbytype.applyPolicy(policy);
*getbytype.addModule("rampart");*
*getbytype.engageModule(rampart);*
Didn't work with 1.5 unless I engaged Rampart using the
client.engageModule() method, though.
- Dennis