Apache CXF and Java 9. WS Consumer not generated
Asked Answered
A

0

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

Amends answered 2/1, 2018 at 19:3 Comment(4)
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.Draft
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.Amends
About wsgen, I have again the same problem. It is excluded from Java 9 as JEP 320 recommends. Now I need to consider how to use it taking into account that it is included in [Maven link] (search.maven.org/…) as JEP 320 states.Amends
I have tested the new Apache CXF version (3.3.5) and the problem has been solved (it works with java 13). ThanksAmends

© 2022 - 2024 — McMap. All rights reserved.