config.put("signatureParts", "{}{http://schemas.xmlsoap.org/soap/envelope/}Body;STRTransform");
invokeService (config, 7);
}
public void invokeService (Map config, int interopNum) throws Exception {
PingServiceLocator service = new PingServiceLocator();
List handlerChain = new ArrayList();
handlerChain.add(new HandlerInfo( WSS4JHandler.class, config, null));
HandlerRegistry registry = service.getHandlerRegistry();
registry.setHandlerChain(new QName("Ping" + interopNum), handlerChain);
service.getHandlerRegistry().getHandlerChain(new QName("http://xmlsoap.org/Ping", "ticketType"));
java.lang.reflect.Method method = service.getClass().getMethod("getPing" + interopNum, new Class[] {URL.class});
PingPort port = (PingPort) method.invoke (service, new Object[] {new URL("http://localhost:8080/axis/services/Ping" + interopNum)});
StringHolder text =
new StringHolder("WSS4J - Scenario" + interopNum + " @ [" + new java.util.Date(System.currentTimeMillis()) + "]");
port.ping(new org.apache.ws.axis.oasis.ping.TicketType("WSS4J" + interopNum), text);