You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Franck LEFEBURE <fr...@orange.com> on 2013/11/12 21:21:50 UTC
SoapHandler and CXF Dynamic Client
Hi,
I would like to reuse a existing SoapHandler (I don't want to create a CXF interceptor) with a CXF dynamic Client and I have some difficulties.
CXF Client is created like this :
JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
Client myClient = dcf.createClient("/home/my.wsdl");
myClient.getRequestContext().put(Message.ENDPOINT_ADDRESS, "http://my.endpoint") ;
On the other side, I know how to add a SoapHandler to a JAX Client SimpleLoggingSoapHandler myHandler = new SimpleLoggingSoapHandler(); List<Handler> myHandlerChain = new ArrayList<Handler>(); myHandlerChain.add(sh); ((BindingProvider)port).getBinding().setHandlerChain(newHandlerChain);
Can you help me to join the two snippets, can I obtain the Port from the CXF Client, or can I do some kind of cast between a org.apache.cxf.endpoint.Binding and javax.xml.ws.Binding
Googled a lot but nothing helps...
Thanks for your help
BR
--
Franck LEFEBURE