You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Dennis Sosnoski <dm...@sosnoski.com> on 2009/07/15 00:54:22 UTC
[Axis2] Engage module (Rampart) at operation level on client?
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