WSDL based webservices on Wildfly

人走茶凉 提交于 2019-12-02 07:58:41

The reason for the message above is exactly that the webservices subsystem of WildFly spotted Apache CXF libraries in the deployment. That's not how a JavaEE application making use of webservices is expected to be provided and deployed on a JavaEE container like WildFly, basically because the container is responsible for supplying the WS engine functionalities. In particular, when it comes to WildFly, Apache CXF is internally used hence by adding some cxf libs in his deployment, the user can possibly end up into complex classloading issues that he might not be able to easily solve. Anyway, the message says what has to be done: (JBoss) modules dependencies has to be defined in the deployment. That can be easily done in the deployment MANIFEST.MF; some doc on this at https://docs.jboss.org/author/display/JBWS/JBoss+Modules (but you can google for JBoss Modules and find many info).

Generally speaking, I really suggest to read the doc at https://docs.jboss.org/author/display/JBWS/Apache+CXF+integration#ApacheCXFintegration-BuildingWSapplicationstheJBossway which explains the JBossWS integration with Apache CXF a bit more in details and gives direction on proper packaging apps.

Nirmal Dhara

Add all the dependancies with provided scope, as wildfly has its own cxf jars. wildfly does not required cxf jars to execute the ws. only you required cxf jars for IDE to compile the project.

<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-rt-frontend-jaxws</artifactId>
    <version>${cxf.version}</version>
    <scope>provided</scope>
</dependency>
<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-rt-transports-http</artifactId>
    <version>${cxf.version}</version>
    <scope>provided</scope>
</dependency>
    <!-- Jetty is needed if you're are not using the CXFServlet -->
<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-rt-transports-http-jetty</artifactId>
    <version>${cxf.version}</version>
    <scope>provided</scope>
</dependency>

you can find the answer here

Additional suggestion: read http://jbossws.blogspot.it/2014/09/how-to-kick-start-ws-project-in-few.html and try the described maven archetype to build a properly setup & working WS client in few seconds.

Should you be interested, I've also written a book which covers this topic too, see http://jbossws.blogspot.it/2014/09/a-book-on-jax-ws-in-wildfly-and-more.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!