> On Nov 21, 2014, at 10:41 AM, Vladimir Sutskever 
> <[email protected]> wrote:
> 
> I was wondering how JAX-WS picks the SOAP provider if multiple providers are 
> found on the class path(METRO, CXF,, JDK's Metro Implementation)
> How do I guarantee that the CXF is always chosen over other implementations 
> that can possibly exist on the classpath?
> 

It’s through the JDK”s  service provider mechanisms which, in general, is 
fairly fragile and very class path ordering dependent.   For the most part, 
whichever META-INF/services/javax.xml.ws.spi.Provider is found first is the 
“winner”.

That’s one of the reasons that in CXF, we provide ways (custom API’s) that can 
be used to guarantee CXF.   The JaxWsProxyFactoryBean, JaxWsServerFactoryBean, 
etc…     With CXF 3.x, when you generate the code, you can also use “-frontend 
cxf” which makes the generated code more CXF dependent to make sure they are 
using CXF under the covers. (and provides constructors that take the Bus object 
and such).


-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to