You can package a Java Application Programming Interface (API) for XML Web Services (JAX-WS) application as a Web service. A JAX-WS Web service is contained within a Web archive (WAR) file or a WAR module within an enterprise archive (EAR) file.
<?xml version="1.0" encoding="UTF-8"?> <web-app id="WebApp_ID" xmlns=”http://java.sun.com/xml/ns/j2ee” xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> </web-app>
The web.xml might contain servlet or servlet-mapping elements. When customizations to the web.xml file are not needed, the WebSphere® Application Server runtime defines them dynamically as the module is loaded. For more information on configuring the web.xml file, read about customizing Web URL patterns in the web.xml file for JAX-WS applications.
Annotated classes must contain, at a minimum, a Web service implementation class that includes the @WebService annotation. The definition and specification of the Web services-related annotations are provided by the JAX-WS and JSR-181 specifications. The Web service implementation classes can exist within the WEB-INF/classes or directory within a Java archive (JAR) file that is contained in the WEB-INF/lib directory of the WAR file.
You can optionally include WSDL documents in the JAX-WS application packaging. If the WSDL document for a particular Web service is omitted, then the WebSphere Application Server runtime constructs the WSDL definition dynamically from the annotations contained in the Web service implementation classes. You must include the @WebService, @WebMethod, @WebParam, @WebResult, and optionally the @SOAPBinding annotations if the WSDL document is omitted.