This tutorial demonstrates how to develop a web service with Spring WS. It’s a contract first web service that uses JAXB for the binding. The focus area is how to configure and use Spring WS. Details about how to create an XSD schema and JAXB classes are explained in this tutorial.
I will also briefly show exception handling and validation support in relation to SOAP faults. But first some words about the contract first part.
Generate an XSD schema and JAXB classes
The sample XML request document that I will create an XSD schema from:
And the corresponding response document:
After some tweaking, the XSD schema looks like this:
After I have generated the JAXB classes, the source folder containing generated classes looks like this:
Now I have created the data contract part of the WSDL and generated the data binding classes used to parse the Java object…
View original post 1,008 more words