Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Replacement for wsimport with JDK 11

Tags:

I'm currently working on a project which need wsimport but we use JDK11 and I just discovered that wsimport was removed from JDK since this version.

I searched for answers and I tried adding this dependency but it's not working at the moment.

     <dependency>
        <groupId>javax.xml.ws</groupId>
        <artifactId>jaxws-api</artifactId>
        <version>2.2.11</version>
    </dependency>

Is there any replacement for wsimport that I'm not aware of ?

Thank you !

like image 558
Etienne Ringot Avatar asked Nov 12 '18 17:11

Etienne Ringot


People also ask

Where can I find Wsimport?

wsimport is a command line utility installed with Java JDK and can be found in the default Java installation directory, C:\Program Files\Java\jdk1. 8.0_60\bin\wsimport. However, you may need to manually add this path to your System's Environment Variables.

What is Wsimport in Java?

The wsimport tool reads an existing WSDL file and generates the following artifacts: Service Endpoint Interface (SEI) - The SEI is the annotated Java representation of the WSDL file for the web service. This interface is used for implementing JavaBeans endpoints or creating dynamic proxy client instances. javax. xml.

What is Wsimport used for?

The wsimport tool is used to parse an existing Web Services Description Language (WSDL) file and generate required files (JAX-WS portable artifacts) for web service client to access the published web services. This wsimport tool is available in the $JDK/bin folder.

How do I generate stubs in Wsimport?

You can run wsimport command from any directory where you like to generate stubs. We have published a sample soap web service which we going to use in this example. You can use this sample service URL https://test.java4coding.com/core/service/service.php?wsdl to test the wsimport command.


1 Answers

Today, you can use a fork as a direct replacement of org.codehaus.mojo:jaxws-maven-plugin:2.5:

<plugin>
  <groupId>com.helger.maven</groupId>
  <artifactId>jaxws-maven-plugin</artifactId>
  <version>2.6</version>
  <configuration>
    ...
  </configuration>
</plugin>

https://github.com/phax/jaxws-maven-plugin. It works well with jdk11

like image 64
Florian Prud'homme Avatar answered Sep 29 '22 00:09

Florian Prud'homme