Building Webservices using Spring
In this post, I'm going to explain how to write a contract first webservice using Spring. We are going to create a service for creating a person record. We are going to call the service as 'CreatePersonService'. It will accept first name, middle name and last name as parameters and return a id parameter back as a response. We need to first define the XSD representing the person record. Also, we need an XSD to represent the request to create the Person record. Let us first start with the maven dependencies required: pom.xml: We will be using jaxb for generating classes from xsd. <dependency> <groupId>org.springframework.ws</groupId> <artifactId>spring-ws-core</artifactId> <version>2.1.3.RELEASE</version> <type>jar</type> <scope>compile</scope> </dependency> <dependency> <groupId>org.dom4j</groupId> <artifactId>dom4j</artif