O'Reilly logo

Java 7 JAX-WS Web Services by Deepak Vohra

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

Creating the deployment descriptors

The web.xml delegates requests for the web service to the JAX-WS runtime using a web service listener and a web service servlet. The following listener and servlet classes are configured in web.xml:

Listener class com.sun.xml.ws.transport. http.servlet.WSServletContextListener
Servlet class com.sun.xml.ws.transport. http.servlet.WSServlet

The HelloWSPort web service servlet is mapped to URL pattern /hellows and has the load-on-startup set to 1. The web.xml file is listed as follows; copy the web.xml file to the config folder:

<?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" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" ...

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