My Handler is not invoked, with this code
Service serviceModel = new ObjectServiceFactory().create(DemoService.class, "DemoService", "http://demo.tranchida.ch/DemoService", null);
serviceModel.addOutHandler(new WSSEClientHandler());
DemoService service = (DemoService)
new XFireProxyFactory().create(serviceModel, "http://localhost:8080/DemoService/services/DemoService");
System.out.println(service.echo("hello"));
Looking at XFireProxy in debug, outHandlers list contains only OutMessageSender
But Using Dynamic client, it is ok, my Handler is normaly invoked
Client client = new Client(new URL("http://localhost:9999/DemoService/services/DemoService?wsdl"));
client.setEndpointUri("http://localhost:9999/DemoService/services/DemoService");
client.addOutHandler(new WSSEClientHandler());
System.out.println(client.invoke("echo", new Object[] { "hello" })[0]);
DemoService service = (DemoService)
new XFireProxyFactory().create(serviceModel, "http://localhost:8080/DemoService/services/DemoService");
Client client = ((XFireProxy) Proxy.getInvocationHandler(service)).getClient();
client.addOutHandler(handler);