Hi all,

I am using Rampart 1.4 and Axis2 1.4, and trying to sign my messages. I had a 
piece of code working fine in Axis/Rampart 1.2, and I am trying to port it 1.4.

For some reason my client won't encrypt its messages and I cannot figure out 
why..... so everything is working in clear text (I haven't configured the 
server side yet, and simply wanted to see the signed request in TcpMon).

ConfigurationContext context = 
ConfigurationContextFactory.createConfigurationContextFromFileSystem("repository",
 null);
ServiceStub service = new ServiceStub(context, 
"http://localhost:1256/axis2/services/Service?wsdl";);
ServiceClient sc = service._getServiceClient();
sc.engageModule("rampart");
StAXOMBuilder builder = new StAXOMBuilder("rampart-config.xml");
Policy rampartConfig = PolicyEngine.getPolicy(builder.getDocumentElement());
sc.getAxisService().getPolicyInclude().addPolicyElement(PolicyInclude.AXIS_SERVICE_POLICY,
 rampartConfig);

FYI, the client is generated from the WSDL containing the encryption policy 
using the "wsdl2code" ANT task.

How can I debug the client side to see if the policy is correctly picked up? 
Thanks!

Best regards,

Phil

Reply via email to