Auto-generate web-service JAX-WS from WSDL

15,343

Recreating a Web Service from WSDL

Based on the book, Java Web Services: Up and Running by Martin Kalin, one way to recreate a service from a WSDL is by starting at the client stubs.

wsimport -keep -p <your wsdl>

The item of interest will be the generated SEI code.

You can remove the client-specific annotations, replace them with server-side annotations and use this as your base interface when rebuilding the web service.

With the SEI at your disposal, you can easily create your own SIB and publish it.

Important Note: Of course, you will not see the logic behind their SIB, that will not be available to you at any point. But the above approach will hopefully be useful for you since you want to create your own implementation anyway.

JAX-WS with Maven

This deserves a separate question on its own. Maven has a jax-ws plugin (artifact ID: jaxws-maven-plugin) for you to start with. More info at this link: Using JAX-WS with Maven.

Share:
15,343
user2225076
Author by

user2225076

Updated on June 04, 2022

Comments

  • user2225076
    user2225076 almost 2 years

    I have to create a web service equal to an existing one. The WSDL must be the same because they do not want to change the client. How can I do this?

    Also, how I can do with JAX-WS with Maven?