views:

248

answers:

1
I created an implementation of LoggingHandler that implements SOAPHandler

It should log whenever handleMessage triggers. [ And it is never called in my case ]

then : MyService service = new MyService();
MyServicePort port = service.getPortType();

now I try this:

BindingProvider bindingProvider = (BindingProvider)port;
bindingProvider.getBinding().getHandlerChain().add(new LoggingHandler());

I do not see any request / response xml though.

Can you suggest any solution? Maybe there's other way to see output and request xml s ?

A: 

It starts working if use this method:

       binding.setHandlerChain(handlerList);

So, first initialize this list with

       binding.getHandlerChain()

then add your element to the list and after all

      setHandlerChain()
EugeneP