apache > ws.apache
Apache Muse
 

Apache Muse - Project Artifacts for Apache Axis2

Overview

When Muse applications are deployed on top of Apache Axis2, they must fit into the Axis2 service model. However, because the Muse programming model is platform-independent, most of the Axis2-specific files and directories will be static no matter what kind of resource you're implementing; the Muse framework includes an Axis2 service that will manage all of the resources that you define in muse.xml. When the Axis2 engine is started, it will load the Muse service, which will in turn read the muse.xml descriptor and initialize your resources.

Application Layout

The Axis2 version of the sample project is a J2EE web application with the following directory structure:

Application Layout - J2EE WAR
/wsn-producer
    /WEB-INF
        /classes
            /router-entries
                ...
            /wsdl
                WsResource.wsdl
                ...
            muse.xml
            muse-descriptor.xsd
        /conf
            ...
        /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 - This holds 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. These JAR files fall into one of three categories:

    • Apache Axis2 1.1

    • Apache Axis2 1.1 dependencies (Apache Commons, XML, and other libraries)

    • Apache Muse (identified by the muse- prefix)

  • /WEB-INF/modules - This contains non-core functionality for the Axis2 SOAP engine. The Axis2 WS-Addressing module is included by default, and Muse relies on it for dispatching of operations.

  • /WEB-INF/services/muse/META-INF/services.xml - 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.


< Back      Next >