O'Reilly logo

Mastering Spring Application Development by Anjana Mankale

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Spring Web Services with JAXB marshalling for request

In this section, let's look at developing a simple web service using the Spring Web Service framework. We need JAXB for marshalling and unmarshalling the XML request. The Spring Web Service supports contract first web service. We need to design a XSD/WSDL first and then launch the web service.

We are creating an author web service which will give us a list of authors.

  1. Configuring the web.xml file: Let us first do a web service configuration in a web.xml file. We need to configure the Spring Web Service servlet. The Message Dispatcher servlet needs to be defined and the URL patterns it will handle. The contextConfigLocation is specified instead of allowing the default (/WEB-INF/spring-ws-servlet.xml ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required