[Wildflfy 24] - Apache-CXF SOAP Client not used, instead standard JaxWS Implementation is used

192 views
Skip to first unread message

Andreas Wüst

unread,
Jan 23, 2023, 10:24:15 AM1/23/23
to WildFly
Hi,

when updating our application from Wildfly 14 to 24 (with Java 8) we are running into various errors,
because the Apache CXF Webservice implementation for the client is not used. For some
reason always the com.sun.xml.ws.client.sei.SEIStub is used instead of org.apache.cxf.jaxws.spi.ProviderImpl.

When i define a service loader file javax.xml.ws.spi.Provider in the WEB-INF/services directory
to force the service loader to load the Apache CXF Provider Implementation we are running into the following error:

java.util.ServiceConfigurationError: javax.xml.ws.spi.Provider: Provider org.apache.cxf.jaxws.spi.ProviderImpl not a subtype
    at java.util.ServiceLoader.fail(ServiceLoader.java:239)
    at java.util.ServiceLoader.access$300(ServiceLoader.java:185)
    at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:376)
    at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
    at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
    at javax.xml.ws.spi.ServiceLoaderUtil.firstByServiceLoader(ServiceLoaderUtil.java:33)


What i do not understand is why the apache cxf implementation is not picked over the standard jaxws implementation and
why we are getting this strange "not a subtype" error which makes no sense to me.

The ear file contains the following jars in lib (classpath):

jakarta.xml.bin-api-2.3.3
jakarta.xml.soap-api-1.4.2
jakarta.xml-ws-api-2.3.3
jaxws-rt-2.3.3

cxf is is used from the wildfly classpath

The deployment structure looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.3">
    <deployment>
        <dependencies>
            <module name="org.apache.commons.beanutils" export="true"/>
            <module name="org.apache.commons.logging" export="true"/>
            <module name="org.apache.xerces" export="true"/>
            <module name="org.jboss.remote-naming" export="true"/>
            <module name="org.jboss.marshalling" export="true"/>
            <module name="com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider" export="true"/>
            <module name="org.apache.cxf.impl" export="true"/>
            <system export="true">
                <paths>
                    <path name="org/w3c/dom/css"/>
                </paths>
            </system>
        </dependencies>
        <exclusions>
            <module name="org.jboss.resteasy.resteasy-json-binding-provider"/>
        </exclusions>
    </deployment>
</jboss-deployment-structure>
Reply all
Reply to author
Forward
0 new messages