Apache Muse - Project Artifacts for J2EE
Overview
When Muse applications are deployed as part of a J2EE WAR, they will rely on either Apache Axis2 or the Mini SOAP Engine for their HTTP/SOAP processing. The WARs will have almost identical structure no matter which SOAP engine you choose. This page describes the common files found in the generated WAR as well as any platform-specific files you might come across.
Application Layout
The J2EE web applications generated by WSDL2Java will have the following directory structure (items in bold are specific to Axis2):
Application Layout in J2EE WARs (items in bold are specific to Axis2)
/wsn-producer
/WEB-INF
/classes
/router-entries
...
/wsdl
WsResource.wsdl
...
muse.xml
muse-descriptor.xsd
/conf
axis2.xml
/lib
...
/modules
...
/services
/muse
/META-INF
services.xml
web.xml
The nature of these files and directories is as follows:
- /WEB-INF/classes/router-entries - This directory holds XML files that contain the endpoint references (EPRs) for resources
that are to be created upon application startup. WSDL2Java creates one such resource during code generation.
- /WEB-INF/classes/wsdl - This directory holds the WSDL and related schema files for the resource type implemented in the sample.
The WsResource.wsdl file is the WSDL for the sample resource type. The schema files define standard data types that are used in the resource
interface; all schemas in the Muse sample projects were authored by OASIS or W3C and represent the latest versions of their respective standards.
- /WEB-INF/classes/muse.xml - This is the Muse deployment descriptor. It is read by Muse at initialization in order to load, configure, and support the resource types that you have implemented.
- /WEB-INF/classes/muse-descriptor.xsd - This is the schema for the Muse deployment descriptor. It is provided here for educational purposes, and so you can validate any changes you might make to it.
- /WEB-INF/conf/axis2.xml - Axis2 only - This is an Axis2-specific configuration file that, among other things, enables the Axis2 WS-Addressing module.
- /WEB-INF/lib - This is the standard WAR directory for Java classes that are part of a JAR file.
All of the Muse JAR files can be identified by the muse- prefix. If you are using Axis2, you will
also find a large number of JARs for that project and its dependencies.
- /WEB-INF/modules - Axis2 only - This contains non-core functionality for the Axis2 SOAP engine. The Axis2 WS-Addressing
module is included by default.
- /WEB-INF/services/muse/META-INF/services.xml - Axis2 only - This is an Axis2 configuration file defines two key
elements: the context path for the resource type (http-server) and the WS-Addressing Action URIs
that are handled by the resource type. Note that all operations for the resource type are being funneled through
one method (handleRequest()) so that the Muse router can dispatch to the appropriate WS-resource instance.
All of a resource's WS-A Action URIs should be listed under the <service/> element.
- /WEB-INF/web.xml - This is the standard WAR configuration file. It will be static for Muse users.
Towards the end of the tutorial, you will learn how to build, deploy, and test this application with the help of Apache Tomcat.