1 Reply Latest reply on Apr 3, 2015 6:20 AM by Alessio Soldano

    cxf-xjc-runtime not included in Wildfly

    Alexandros Trifyllis Newbie

      I am using cxf-codegen-plugin version 2.7.13 (same as cxf version of Wildfly). I want to generate toString methods from wsdl so I add the <extraarg>-xjc-Xts</extraarg> argument and the dependency:

       

      <dependency>

        <groupId>org.apache.cxf.xjcplugins</groupId>

        <artifactId>cxf-xjc-ts</artifactId>

        <version>3.0.3</version>

      </dependency>

      The generated classes use org.apache.cxf.xjc.runtime.JAXBToStringStyle to create the toString methods which is only available in:

       

      <dependency>

        <groupId>org.apache.cxf.xjc-utils</groupId>

        <artifactId>cxf-xjc-runtime</artifactId>

      </dependency>

       

      This dependency is not in the wildfly cxf modules so when I use this dependency with scope "provided" I get the error:

      java.lang.ClassNotFoundException: org.apache.cxf.xjc.runtime.JAXBToStringStyle

       

      When I deploy the application together with the dependency I get the following error:

      Apache CXF library (cxf-xjc-runtime-2.6.2.jar) detected in ws endpoint deployment; either provide a proper deployment replacing embedded libraries with container module dependencies or disable the webservices subsystem for the current deployment adding a proper jboss-deployment-structure.xml descriptor to it. The former approach is recommended, as the latter approach causes most of the webservices Java EE and any JBossWS specific functionality to be disabled.

       

      What makes it more strange is an article I found:

       

      http://www.objectpartners.com/2010/11/25/leveraging-apache-cxf-and-maven-to-generate-client-side-web-service-bindings/

       

      which mentions that the generated classes use a different class namely:

      org.apache.cxf.jaxb.JAXBToStringStyle

       

      Any help will be appreciated.