Using spring-ws with already existing WSDL

When developing a web service using Java you can use one of two approaches:

  • Contract-first: start with an WSDL that defines the web service operations and their input/output messages. Then generate the corresponding Java objects to implement the service.
  • Contract last: Start with the implementation of one or more methods in Java and generate the WSDL files based on these methods and the Java objects that they use.

Spring-WS, as you already mentioned, only supports the contract first approach. This means that you cannot develop a web service using Spring-WS without first having a WSDL or XSD that describes the input/output messages.

You should be able to create a service using Spring-WS using any valid WSDL file. For a concrete example let me point you to a blog post that I created that illustrates how you can develop a web service using Spring-WS starting from a WSDL file.

Tags:

Spring Ws