O'Reilly logo

Java Web Services in a Nutshell by Kim Topley

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

J2EE 1.4 Web Services Configuration File

Availability

All J2EE 1.4 platforms.

Description

All J2EE modules that contain a web service are required to provide information that allows deployment tools to locate the classes that implement the service, the WSDL document describing its service interface, and a mapping file that describes how that interface should be mapped to elements of the Java programming language. The location of this file depends on the archive in which it resides:

  • For a web service hosted by a servlet, the file belongs to the hosting web application and must be called WEB-INF/webservices.xml.

  • For an EJB-hosted web service, the file is placed in the same EJB JAR file as the implementing bean and is called META-INF/webservices.xml.

The content of this file is defined by an XML Schema document that can be downloaded from http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd. An outline of the content of this file is shown in Example 8-12.

Example 8-12. The webservices.xml file

<webservices> <webservice-description> <!-- One or more --> <description>text</description> <!-- Optional --> <display-name>text</display-name> <!-- Optional --> <icon> <!-- Optional --> <small-icon>name</small-icon> <!-- Optional --> <large-icon>name</large-icon> <!-- Optional --> </icon> <web-service-description-name>name</web-service-description-name> <wsdl-file>file-location</wsdl-file> <jaxrpc-mapping-file>file-location</jaxrpc-mapping-file> <port-component> <!-- One or more --> <description>text</description> ...

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