Contract first webservice is more advantageous though as it eliminates the impedance mismatch problem.
Below code snippets explains how to use spring-ws to implement the SOAP based webservice.
The basis for most endpoints in Spring Web Services is the rather than just the payload.
When using the embedded HTTP server, no external deployment descriptor is needed ().
Being a singleton implies that more than one thread can use it at the same time, so the endpoint has to be thread safe.
If you want to use a different scope, such as prototype, refer to the Spring Reference documentation.
Spring-ws API works on the principal of contract first SOAP webservice.
In this type of webservice implementation the wsdl is created first.