6

In Java 1.8, I had no problems generating a WS client using:

wsdl2java -ant -client -d ClientDir hello_world.wsdl

as refers to Apache CXF documentation http://cxf.apache.org/docs/developing-a-consumer.html

But in Java 9, I have got the following error:

-Djava.endorsed.dirs=./../lib/endorsed is not supported. Endorsed standards and standalone APIs
in modular form will be supported via the concept of upgradeable modules.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

I know that part of this questions has already been covered in How do you replace endorsed directory in Java 9? however, the solution proposed by @nullpointer is not clear enough for a java beginner like me.

Can anybody explain in a "simple way" how can I generate the ws client stub without going back to Java 1.8?

Thanks

Ximo Dante
  • 67
  • 9
  • 3
    Have you checked the Apache CXF issue tracker to see if there is an issue tracking support for JDK 9 and newer JDK releases? An alternative may be to use the `wsgen` tool that is included with JAX-WS, assuming that is a useful alternative. – Alan Bateman Jan 03 '18 at 10:22
  • Thanks, Alan Bateman, I have been searching in Apache CXF Issue tracker and I have not been able to find a solution for this issue. Migrating to Java 9 seems to be not an easy matter. For the moment, as my java level is not good, I am using Java 1.8 to generate the client stub. Then for Java 9 with Maven, I have to import the needed dependencies referenced in [JEP 320](http://openjdk.java.net/jeps/320). – Ximo Dante Jan 04 '18 at 08:43
  • About `wsgen`, I have again the same problem. It is excluded from Java 9 as [JEP 320](http://openjdk.java.net/jeps/320) recommends. Now I need to consider how to use it taking into account that it is included in [Maven link] (https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.sun.xml.ws%22%20AND%20a%3A%22jaxws-tools%22) as JEP 320 states. – Ximo Dante Jan 04 '18 at 08:52
  • I have tested the new Apache CXF version (3.3.5) and the problem has been solved (it works with java 13). Thanks – Ximo Dante Mar 17 '20 at 16:17

0 Answers0