Apache CXF 2.3.0 WSDLToJava problem

I am trying apachecxf 2.3.0 and I am having problems using the wsdlToJava tool. No matter what, I get the WSDLToJava error: java.lang.reflect.UndeclaredThrowableException. I tried an older version 2.1, and it works fine on the same WSDL. Does anyone else have the same issue with this version?

+3
source share
1 answer

Add -frontend jaxws21 since jdk6 has 2.1 jaxb built in, while 2.3 tries to use 2.2 jaxb (or put 2.2 jaxb in your jdk, so it uses this instead of 2.1) ....

      <java classname="org.apache.cxf.tools.wsdlto.WSDLToJava" fork="true" failonerror="true">
         <arg value="-impl"/>
         <arg value="-d"/>
         <arg value="${gen.src}"/>
         <arg value="-frontend"/>
         <arg value="jaxws21"/>
         <arg value="${input}/schemas/enrollment.wsdl"/>
         <classpath>
            <path refid="cxf.classpath"/>
         </classpath>
      </java>
+7
source

Source: https://habr.com/ru/post/1775860/


All Articles