JAX-WS Metro : SOAP capturing on client side

ProfileService profileServicePort = ss.getProfileServicePort();
    BindingProvider bp = (BindingProvider)profileServicePort;
    List handlerChain = bp.getBinding().getHandlerChain();
    if ( handlerChain == null )
    {
      handlerChain = new ArrayList();
    }
    handlerChain.add( handler );//1
    bp.getBinding().setHandlerChain( handlerChain );//2

Note: //2 has to come before //1. Any handlers added after a call to setHandlerChain will be ingored, unless you call setHandlerChain again. Bad design I would say.
Source: http://blogs.sun.com/binublog/entry/jax_ws_capturing_soap_messages

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: