uCosminexus Application Server, Application Development Guide
When developing a POJO Web service, to deploy Web Services, add the settings for operating as a Web Service in web.xml. When developing an EJB Web service, you need not edit web.xml.
The following table describes the elements to be added and the values to be specified:
Table 8-2 Elements added and values specified in web.xml
Element names in web.xml | Specified value | ||
---|---|---|---|
web-app | -- | ||
listener | -- | ||
listener-class | com.cosminexus.xml.ws.transport.http.servlet.WSServletContextListener | ||
servlet | -- | ||
servlet-name | WSServlet | ||
servlet-class | com.cosminexus.xml.ws.transport.http.servlet.WSServlet | ||
load-on-startup | 1 | ||
servlet-mapping | -- | ||
servlet-name | WSServlet | ||
url-pattern | Mapped URL# |
An example of specification is as follows:
<?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <listener> <listener-class>com.cosminexus.xml.ws.transport.http.servlet.WSServletContextListener</listener-class> </listener> <servlet> <servlet-name>WSServlet</servlet-name> <servlet-class>com.cosminexus.xml.ws.transport.http.servlet.WSServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>WSServlet</servlet-name> <url-pattern>/TestJaxWsService</url-pattern> </servlet-mapping> </web-app> |
For details on editing web.xml, see 3.4 Creating web.xml in the manual uCosminexus Application Server Web Service Development Guide.
All Rights Reserved. Copyright (C) 2012, 2013, Hitachi, Ltd.