October 25, 2014
Hot Topics:
RSS RSS feed Download our iPhone app

The Axis2 Information Model

  • December 19, 2008
  • By Deepal Jayasinghe
  • Send Email »
  • More Articles »

You have already reviewed a number of features and ways to use Axis2 in previous articles. The main focus of this article is to discuss some of the terms you encounter when you read Axis2 articles and documents. Axis2 it keeps its data and logic separately. That provides much flexibility and extensibility into Axis2. When you look at Axis2 data, it consists of two main parts, static data and dynamic data. In this article, I will discuss Axis2's static data hierarchy. At the end of the article, you will be able to understand Axis2 static data hierarchy and different type usage of them.

Axis2 Static Hierarchy

As the name implies, static data are the data that is not going to change over the time. However, it should be noted here that some of the configuration data I will discuss here may be changed over time. In other words, you can change them at runtime. Most of the data come from various configurations that you find in Axis2. In Axis2, you easily can find three types of configuration that make the static data hierarchy:

  • Global level configuration file: axis2.xml
  • Service level configuration file: services.xml
  • Module or service extension configuration file: module.xml

The global configuration file is called "axis2.xml" and contains all the bare minimum configuration data needed to start an Axis2 server. Meanwhile, you can edit your axis2.xml file to suit your requirements and start Axis2 using the edited file. A typical axis2.xml file has the following set of configuration options.

  • Deployment configuration data
  • Transport senders
  • Transport receivers
  • Execution chains
  • Phases
  • Parameters
  • Message formatters and Message builders

Figure 1 illustrates the relationship among various types of data (descriptions) in Axis2.

Figure 1: Relationship of Axis2 static data.

As you can see, the top component in the hierarchy is AxisConfiguration; it keeps track of all the configuration data either directly or indirectly. There are three major types of objects shown in the figure. Firstly, AxisModule originates from a descriptor file called "module.xml", so that when you deploy a module in Axis2 there will be a new AxisModule object to keep track of that particular module's configuration data. Secondly, the middle object hierarchy is created when you deploy a service in Axis2. Finally are the Transports and Other data that are read directly from axis2.xml.

AxisConfiguration

AxisConfiguration is the top component of the static data hierarchy. The whole AxisConfiguration object is effectively a collection of data coming from axis2.xml, a set of module.xml files, and a set of services.xml files. There are many ways to create AxisConfiguration. One could create an AxisConfiguration using the local file system, or using a remote repository, or even using a database. A typical axis2.xml that has the bare minimum configuration data to start an Axis2 server will look like the following:

<axisconfig name="AxisJava2.0">
   <parameter name="name">value</parameter>

   <messageReceivers>
      <messageReceiver mep="MPE"
         class="o.a.a.r.RawXMLINOnlyMessageReceiver"/>
   </messageReceivers>

   <messageFormatters>
      <messageFormatter
         contentType="application/x-www-form-urlencoded"
            class="o.a.a.t.h.XFormURLEncodedFormatter"/>
   </messageFormatters>

   <messageBuilders>
      <messageBuilder contentType="application/xml"
         class="o.a.a.b.ApplicationXMLBuilder"/>
   </messageBuilders>

   <transportReceiver name="http"
         class="o.a.a.t.h.SimpleHTTPServer">
      <parameter name="port">6060</parameter>
   </transportReceiver>

   <transportSender name="http"
         class="o.a.a.t.h.CommonsHTTPTransportSender">
      <parameter name="PROTOCOL">HTTP/1.1</parameter>
      <parameter name="Transfer-Encoding">chunked
      </parameter>
   </transportSender>
   <phaseOrder type="InFlow">
      <phase name="Transport">
         <handler name="RequestURIBasedDispatcher"
               class="o.a.a.d.RequestURIBasedDispatcher">
            <order phase="Transport"/>
         </handler>

      </phase>
      <phase name="Security"/>
      ....................................................
   </phaseOrder>
   <phaseOrder type="OutFlow">
      <phase name="OperationOutPhase"/>
      ....................................................
   </phaseOrder>
   <phaseOrder type="InFaultFlow">
      <phase name="PreDispatch"/>
      ....................................................
   </phaseOrder>
   <phaseOrder type="OutFaultFlow">
      <phase name="OperationOutFaultPhase"/>
      ....................................................
   </phaseOrder>
</axisconfig>




Page 1 of 3



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Sitemap | Contact Us

Rocket Fuel