Spring with JAX-WS
In this section, let's create a simple JAX-WS web service. We shall also see how we can integrate the JAX-WS Web Service with Spring. JAX-WS is the latest version of JAX-RPC, which used remote method invocation protocol to access Web services.
All we need to do here is to expose Spring's service layer as JAX_WS
service provider layer. This can be done using the @webservice
annotation and involves just a few steps. Let us jot down the steps involved in it.
- Create a
PACKTJAXWS-Spring
simple Maven web project or a Dynamic web project in Eclipse. - Now, we need to configure JAX-WS servlet in a
web.xml
file:<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> <display...