axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nand...@apache.org
Subject svn commit: r688807 [4/17] - in /webservices/axis2/site/1_4_1: ./ adb/ adb/images/ images/ images/archi-guide/ images/userguide/ jibx/ src/
Date Mon, 25 Aug 2008 18:10:09 GMT
Added: webservices/axis2/site/1_4_1/clustering-guide.html
URL: http://svn.apache.org/viewvc/webservices/axis2/site/1_4_1/clustering-guide.html?rev=688807&view=auto
==============================================================================
--- webservices/axis2/site/1_4_1/clustering-guide.html (added)
+++ webservices/axis2/site/1_4_1/clustering-guide.html Mon Aug 25 11:10:04 2008
@@ -0,0 +1,507 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+
+
+
+
+
+
+
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>Apache Axis2 - </title>
+    <style type="text/css" media="all">
+      @import url("../css/maven-base.css");
+      @import url("../css/maven-theme.css");
+      @import url("../css/site.css");
+    </style>
+    <link rel="stylesheet" href="../css/print.css" type="text/css" media="print" />
+        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+      </head>
+  <body class="composite">
+    <div id="banner">
+                  <a href="../" id="bannerLeft">
+    
+                                    <img src="http://www.apache.org/images/asf_logo_wide.png" alt="" />
+    
+            </a>
+                          <span id="bannerRight">
+    
+                                            <img src="../../images/axis.jpg" alt="" />
+    
+            </span>
+            <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="breadcrumbs">
+          
+  
+
+  
+    
+  
+  
+    
+            <div class="xleft">
+        Last Published: 2008-08-24
+                      </div>
+            <div class="xright">            <a href="../index.html">Axis2/Java</a>
+            |
+                <a href="../../c">Axis2/C</a>
+            |
+                <a href="../../..">Apache WS</a>
+            |
+                <a href="http://www.apache.org" class="externalLink">Apache</a>
+            
+  
+
+  
+    
+  
+  
+    
+  </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="leftColumn">
+      <div id="navcolumn">
+           
+  
+
+  
+    
+  
+  
+    
+                   <h5>Axis2/Java</h5>
+            <ul>
+              
+    <li class="none">
+                    <a href="../index.html">Home</a>
+          </li>
+          </ul>
+              <h5>Downloads</h5>
+            <ul>
+              
+    <li class="none">
+                    <a href="../download.cgi">Releases</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../modules/index.html">Modules</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../tools/index.html">Tools</a>
+          </li>
+          </ul>
+              <h5>Documentation</h5>
+            <ul>
+              
+          
+              
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+              
+        <li class="expanded">
+                    <a href="../1_4_1/contents.html">Version 1.4.1</a>
+                  <ul>
+                  
+    <li class="none">
+                    <a href="../1_4_1/toc.html">Table of Contents</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/installationguide.html">Installation Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/quickstartguide.html">QuickStart Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/userguide.html">User Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/jaxws-guide.html">JAXWS Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/pojoguide.html">POJO Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/spring.html">Spring Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/webadminguide.html">Web Administrator's Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/migration.html">Migration Guide (from Axis1)</a>
+          </li>
+              </ul>
+        </li>
+              
+    <li class="none">
+                    <a href="../1_4/contents.html">Version 1.4</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../1_3/contents.html">Version 1.3</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../1_2/contents.html">Version 1.2</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../1_1_1/contents.html">Version 1.1.1</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../1_1/contents.html">Version 1.1</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../1_0/index.html">Version 1.0</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../0_95/index.html">Version 0.95</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../0_94/index.html">Version 0.94</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../0_93/index.html">Version 0.93</a>
+          </li>
+          </ul>
+              <h5>Resources</h5>
+            <ul>
+              
+    <li class="none">
+                    <a href="../faq.html">FAQ</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../articles.html">Articles</a>
+          </li>
+              
+    <li class="none">
+                    <a href="http://wiki.apache.org/ws/FrontPage/Axis2/" class="externalLink">Wiki</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../refLib.html">Reference Library</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../../1_4_1/api/index.html">Online Java Docs</a>
+          </li>
+          </ul>
+              <h5>Get Involved</h5>
+            <ul>
+              
+    <li class="none">
+                    <a href="../overview.html">Overview</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../svn.html">Checkout the Source</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../mail-lists.html">Mailing Lists</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../release-process.html">Release Process</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../guidelines.html">Developer Guidelines</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../siteHowTo.html">Build the Site</a>
+          </li>
+          </ul>
+              <h5>Project Information</h5>
+            <ul>
+              
+    <li class="none">
+                    <a href="../team-list.html">Project Team</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../issue-tracking.html">Issue Tracking</a>
+          </li>
+              
+    <li class="none">
+                    <a href="http://svn.apache.org/viewcvs.cgi/webservices/axis2/trunk/?root=Apache-SVN" class="externalLink">Source Code</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../thanks.html">Acknowledgements</a>
+          </li>
+              
+    <li class="none">
+                    <a href="http://www.apache.org/licenses/LICENSE-2.0.html" class="externalLink">License</a>
+          </li>
+          </ul>
+                                           <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
+            <img alt="Built by Maven" src="../images/logos/maven-feather.png"></img>
+          </a>
+                       
+  
+
+  
+    
+  
+  
+    
+        </div>
+    </div>
+    <div id="bodyColumn">
+      <div id="contentBox">
+        <html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><meta http-equiv="content-type" content="">Axis2 Clustering Support<link href="../css/axis-docs.css" rel="stylesheet" type="text/css" media="all"></head><h1>Axis2 Clustering Support</h1><p>Are you interested in improving Scalability and High Availability of your Web Services?</p>
+<p>Axis2 1.4 provides experimental clustering support to add <b><i>Scalability, Failover and High Availability</i></b> to your Web Services.
+This guide will explain the extent of clustering support and it's the current limitations.
+It also highlights the recommended approaches using examples.</p>
+<p>Axis2 clustering support can be used in several scenarios.
+However it is important to understand the current limitations and the risks/impacts associated with each scenario.
+</p>
+<h2>Content</h2><ul><li><a href="#introduction">Introduction</a></li>
+<li><a href="#scalability">Scalability</a></li>
+<li><a href="#failover">Failover</a></li>
+<li><a href="#ha">High Availability</a></li>
+<li><a href="#stateless_webservices">Clustering for Stateless Web Services</a></li>
+<li><a href="#stateful Web Services">Clustering for Stateful Web Services</a></li>
+<li><a href="#config">Configuring Axis2 to add Clustering Support</a></li>
+<li><a href="#scalability_stateless_example">Example 1: Scalability and HA with Stateless Web Services</a></li>
+<li><a href="#failover_stateful_example">Example 2: Failover for Stateful Web Services</a></li>
+<li><a href="#scalability_stateful_example">Example 3: Scalability and HA with Stateful Web Services</a></li>
+<li><a href="#summary">Summary</a></li>
+<li><a href="#furtherstudy">For Further Study</a></li>
+</ul>
+<a name="introduction"></a><h2>Introduction</h2><p>In the context of Axis2 clustering, a node is defined as a separate process with a unique port number where it listens for requests on a given transport . A physical machine can contain more than one node.</p>
+<a name="scalability"></a><h2>Scalability</h2><p>In order to maintain the same level of serviceability (QoS) during an increase in load you need the ability to scale.
+Axis2 provides replication support to scale horizontally. That is, you can deploy the same service in more than one node to share the work load, thereby increasing or maintaining the same level of serviceability (throughput etc).</p>
+<a name="failover"></a><h2>Failover</h2><p>Axis2 provides excellent support for Failover by replicating to backup node(s). 
+If you deploy your Stateful Web Services in this mode, you can designate 1-2 backups and replicate state. 
+In the event the primary node fails, the clients can switch to one of the backups. 
+If you use Synapse with the Failover mediator you can provide transparent Failover.</p>
+<a name="ha"></a><h2>High Availability</h2><p>You can improve the availability of your Web Service by using the following Axis2 functionality. 
+<ul><li><b>Failover</b> support will ensure that a client will continued be served, without any interruption due to a node failure.</li>
+<li><b>Scalability</b> support will ensure that your services can maintain the same level of serviceability/availability (QoS) in increased load conditions.</li>
+<li><b>Hot Deploy</b> feature ensures that you could deploy new services without shutting down your existing services.</li>
+</ul>
+</p>
+<a name="stateless_webservices"></a><h2>Clustering for Stateless Web Services</h2><p>This is the simplest use case. 
+If your Web Service does not store any state in the context hierarchy then you could deploy your service in &quot;n&quot; number of nodes. To ensure identical configuration for your services, you can load from a central repository using the URLBasedAxisConfigurator. This is not a must, but it makes management of the cluster easy and less error prone.</p>
+<p>Since it is stateless no explicit replication is needed. If a node fails any other node in the cluster can take over. You can use a load balancer to direct requests based on a particular algorithm (Ex: Round Robin, Weight based, Affinity based). You can increase the no of nodes to handle scalability (to scale vertically) without worrying about the overhead of replication as the services are stateless</p>
+<a name="stateful_webservices"></a><h2>Clustering for Stateful Web Services</h2><p>This is a more complicated use case where your Web Service needs to store state in the context hierarchy. Each Web Service instance (deployed in separate nodes) will need to share state among themselves. Axis2 provides replication to support sharing of state among services.</p>
+<p>However, if more than one node tries to update the same state in the context hierarchy, conflicts will arise and the integrity of your data will be compromised. Now your cluster will have inconsistent state. This can be avoided using a locking mechanism. However Axis2 currently does not support it yet.</p>
+<p>If this shared state is read more frequently and updated rarely the probability of conflicts decrease. You may use Axis2 in the above use case for Stateful Web Services based on your discretion. However it's important to remember that there can be conflicts.<i><b>If you have frequent writes it is not advisable to use Axis2 until we introduce locking support</b></i></p>
+<p>Please note this warning is only applicable to the following use cases.
+<ul><li>Your Service is deployed in Application Scope</li>
+<li>You store information in the ServiceGroupContext (irrespective of your scope)</li>
+</ul>
+</p>
+<p>You may safely use services in &quot;soapsession&quot; scope provided you <i><b>don't modify (or modify at all) state in ServiceGroupContext frequently</b></i>. In soap-session the service context is exclusive to the client who owns the session. Therefore only that client can modify state. A conflict might arise if the same client tries to access the same service in two different nodes simultaneously which happens to modify the same state. However this is rare, but might arise due to an error in the load balancer or the client. If you use Sticky sessions, it will ensure that state will be changed in one node only by directing all requests by the same client to the same node. This is the safest way to use Axis2 clustering support for Stateful Web Services to acheive scalability.
+</p>
+<a name="config"></a><h2>Configuring Axis2 to add Clustering Support</h2><p>You need to add the following snippet to your axis2.xml</p>
+<pre>
+   &lt;cluster class=&quot;org.apache.axis2.clustering.tribes.TribesClusterManager&quot;&gt;
+     &lt;contextManager class=&quot;org.apache.axis2.clustering.context.DefaultContextManager&quot;&gt;
+        &lt;listener class=&quot;org.apache.axis2.clustering.context.DefaultContextManagerListener&quot;/&gt;
+        &lt;replication&gt;
+            &lt;defaults&gt;
+                &lt;exclude name=&quot;local_*&quot;/&gt;
+                &lt;exclude name=&quot;LOCAL_*&quot;/&gt;
+            &lt;/defaults&gt;
+            &lt;context class=&quot;org.apache.axis2.context.ConfigurationContext&quot;&gt;
+                &lt;exclude name=&quot;SequencePropertyBeanMap&quot;/&gt;
+                &lt;exclude name=&quot;NextMsgBeanMap&quot;/&gt;
+                &lt;exclude name=&quot;RetransmitterBeanMap&quot;/&gt;
+                &lt;exclude name=&quot;StorageMapBeanMap&quot;/&gt;
+                &lt;exclude name=&quot;CreateSequenceBeanMap&quot;/&gt;
+                &lt;exclude name=&quot;ConfigContextTimeoutInterval&quot;/&gt;
+                &lt;exclude name=&quot;ContainerManaged&quot;/&gt;
+            &lt;/context&gt;
+            &lt;context class=&quot;org.apache.axis2.context.ServiceGroupContext&quot;&gt;
+                &lt;exclude name=&quot;my.sandesha.*&quot;/&gt;
+            &lt;/context&gt;
+            &lt;context class=&quot;org.apache.axis2.context.ServiceContext&quot;&gt;
+                &lt;exclude name=&quot;my.sandesha.*&quot;/&gt;
+            &lt;/context&gt;
+        &lt;/replication&gt;
+     &lt;/contextManager&gt;
+   &lt;/cluster&gt;
+</pre><p>The exclude tag tells the system to avoid replicating that particular property. This is a useful
+feature as you would need to have properties that is node specific only. 
+The default config in axis2 will have all properties the axis2 system doesn't want to replicate. Web Service developers can also use this to filter out properties that should be local only.
+</p>
+<a name="scalability_stateless_example"></a><h2>Example 1: Scalability and HA with Stateless Web Services</h2><p>The following is a good example for deploying a Stateless Web Service for Scalability and High Availability.
+The following service can be deployed in &quot;application&quot; scope in &quot;n&quot; nodes using a central repository. 
+Once state is loaded by a particular node it will be shared by other nodes as the config context will replicate the data.
+Even if two nodes load the data at the same time, there want be any conflicts as it is the same set of data.
+(All nodes should synchronize their clocks using a time server to avoid loading different sets of data)</p>
+<p>For the sake of this example we assume replication is cheaper than querying the database.
+So once queried it will be replicated to the cluster</p>
+<pre>
+/**
+ * This Service is responsible for providing the top 5
+ * stocks for the day, week or quarter
+ */
+public class Top5StockService
+{
+	public String[] getTop5StocksForToday()
+	{
+		// If cache is null or invalid fetch it from data base
+		ConfigurationContext configContext =
+            MessageContext.getCurrentMessageContext().getConfigurationContext();
+		
+		String[]  symbols = (String[])configContext.getProperty(TOP5_TODAY);
+		if (!checkValidity(configContext.getProperty(TOP5_TODAY_LOAD_TIME)))
+                {
+		    symbols = loadFromDatabase(TOP5_TODAY);
+                    configContext.setProperty(TOP5_TODAY,symbols);
+		    configContext.setProperty(TOP5_TODAY_LOAD_TIME,new java.util.Date()); 	 
+                } 
+		
+		return symbols;
+	}
+	
+	public String[] getTop5StocksForTheWeek()
+	{
+		 // If cache is null or invalid fetch it from data base
+		.............
+	}
+	
+	public String[] getTop5StocksForTheQuarter()
+	{
+		// If cache is null or invalid fetch it from data base
+                ............
+	}
+}
+</pre><a name="failover_stateful_example"></a><h2>Example 2: Failover for Stateful Web Services</h2><p>The following example demonstrates Failover support by replicating state in a service deployed in &quot;soapsession&quot; scope.
+You can deploy the service in 2 nodes. Then point a client to the first node and add a few items to the shopping cart.
+Assuming the primary node has crashed, point the client to the backup node. You should be able to checkout the cart with the items you added in the first node.</p>
+<pre>
+public class ShoppingCart
+{	
+	public final static String SHOPPING_CART = &quot;SHOPPING_CART&quot;;
+	public final static String DISCOUNT = &quot;DISCOUNT&quot;;
+	
+	public void createSession()
+	{
+		List&lt;Item&gt; cart = new ArrayList&lt;Item&gt;();
+		ServiceContext serviceContext =
+            MessageContext.getCurrentMessageContext().getServiceContext();
+		serviceContext.setProperty(SHOPPING_CART, cart);
+	}
+	
+	public void addItem(Item item)
+	{
+		ServiceContext serviceContext =
+            MessageContext.getCurrentMessageContext().getServiceContext();
+		List&lt;Item&gt; cart = (List&lt;Item&gt;)serviceContext.getProperty(SHOPPING_CART);
+		cart.add(item);
+	}
+	
+	public void removeItem(Item item)
+	{
+		ServiceContext serviceContext =
+            MessageContext.getCurrentMessageContext().getServiceContext();
+		List&lt;Item&gt; cart = (List&lt;Item&gt;)serviceContext.getProperty(SHOPPING_CART);
+		cart.remove(item);
+	}
+	
+	public double checkout()
+	{
+		ServiceContext serviceContext =
+            MessageContext.getCurrentMessageContext().getServiceContext();
+		List&lt;Item&gt; cart = (List&lt;Item&gt;)serviceContext.getProperty(SHOPPING_CART);
+		
+		double discount = (Double)serviceContext.getServiceGroupContext().getProperty(DISCOUNT);
+		
+		double total = 0;
+		for (Item i : cart)
+		{
+			total = total + i.getPrice();
+		}
+		
+		total = total - total * (discount/100);
+		
+		return total;
+	}	
+}
+</pre><a name="scalability_stateful_example"></a><h2>Example3: Scalability and HA with Stateful Web Services</h2><p>You can deploy the the above Shopping Cart service in several active nodes (with a backup(s) for each node). 
+You only replicate to your backup nodes for Failover. The load balancer should ensure sticky sessions. 
+ The strategy is to partition your load between the active nodes to achieve scalability and replication to the backups to achieve Failover. These in turn will increase the high availability of your services. Since the above example doesn't use Service Group Context to write any state there want be any conflicts.</p>
+<p>For the sake of this example we assume that all read only properties for the Service Group Context is loaded at initialization
+ <b><i>Please note this is the recommended approach for Stateful Web Services due to the current limitations</i></b></p>
+<a name="summary"></a><h2>Summary</h2><p>Apache Axis2 provides experimental support for clustering to improve the following properties of your Web Services.
+<ul><li>Scalability</li>
+<li>Failover</li>
+<li>High Availability</li>
+</ul>
+
+It is important to understand the current limitations when leveraging clustering support.
+</p>
+<a name="furtherstudy"></a><h2>For Further Study</h2><p>Apache Axis2-<a class="externalLink" href="http://ws.apache.org/axis2/">http://ws.apache.org/axis2/</a></p>
+<p>Axis2 Architecture-<a class="externalLink" href="http://ws.apache.org/axis2/1_0/Axis2ArchitectureGuide.html">http://ws.apache.org/axis2/1_0/Axis2ArchitectureGuide.html</a></p>
+<p>Introduction to Apache Axis2-<a class="externalLink" href="http://www.redhat.com/magazine/021jul06/features/apache_axis2/">http://www.redhat.com/magazine/021jul06/features/apache_axis2/</a></p>
+</html>
+      </div>
+    </div>
+    <div class="clear">
+      <hr/>
+    </div>
+    <div id="footer">
+      <div class="xright">&#169;  
+          2004-2008
+    
+          Apache Software Foundation
+          
+  
+
+  
+    
+  
+  
+    
+  </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+  </body>
+</html>

Added: webservices/axis2/site/1_4_1/contents.html
URL: http://svn.apache.org/viewvc/webservices/axis2/site/1_4_1/contents.html?rev=688807&view=auto
==============================================================================
--- webservices/axis2/site/1_4_1/contents.html (added)
+++ webservices/axis2/site/1_4_1/contents.html Mon Aug 25 11:10:04 2008
@@ -0,0 +1,543 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+
+
+
+
+
+
+
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>Apache Axis2 - </title>
+    <style type="text/css" media="all">
+      @import url("../css/maven-base.css");
+      @import url("../css/maven-theme.css");
+      @import url("../css/site.css");
+    </style>
+    <link rel="stylesheet" href="../css/print.css" type="text/css" media="print" />
+        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+      </head>
+  <body class="composite">
+    <div id="banner">
+                  <a href="../" id="bannerLeft">
+    
+                                    <img src="http://www.apache.org/images/asf_logo_wide.png" alt="" />
+    
+            </a>
+                          <span id="bannerRight">
+    
+                                            <img src="../../images/axis.jpg" alt="" />
+    
+            </span>
+            <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="breadcrumbs">
+          
+  
+
+  
+    
+  
+  
+    
+            <div class="xleft">
+        Last Published: 2008-08-24
+                      </div>
+            <div class="xright">            <a href="../index.html">Axis2/Java</a>
+            |
+                <a href="../../c">Axis2/C</a>
+            |
+                <a href="../../..">Apache WS</a>
+            |
+                <a href="http://www.apache.org" class="externalLink">Apache</a>
+            
+  
+
+  
+    
+  
+  
+    
+  </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="leftColumn">
+      <div id="navcolumn">
+           
+  
+
+  
+    
+  
+  
+    
+                   <h5>Axis2/Java</h5>
+            <ul>
+              
+    <li class="none">
+                    <a href="../index.html">Home</a>
+          </li>
+          </ul>
+              <h5>Downloads</h5>
+            <ul>
+              
+    <li class="none">
+                    <a href="../download.cgi">Releases</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../modules/index.html">Modules</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../tools/index.html">Tools</a>
+          </li>
+          </ul>
+              <h5>Documentation</h5>
+            <ul>
+              
+          
+              
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+              
+            <li class="expanded">
+              <strong>Version 1.4.1</strong>
+                <ul>
+                  
+    <li class="none">
+                    <a href="../1_4_1/toc.html">Table of Contents</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/installationguide.html">Installation Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/quickstartguide.html">QuickStart Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/userguide.html">User Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/jaxws-guide.html">JAXWS Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/pojoguide.html">POJO Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/spring.html">Spring Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/webadminguide.html">Web Administrator's Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/migration.html">Migration Guide (from Axis1)</a>
+          </li>
+              </ul>
+        </li>
+              
+    <li class="none">
+                    <a href="../1_4/contents.html">Version 1.4</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../1_3/contents.html">Version 1.3</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../1_2/contents.html">Version 1.2</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../1_1_1/contents.html">Version 1.1.1</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../1_1/contents.html">Version 1.1</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../1_0/index.html">Version 1.0</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../0_95/index.html">Version 0.95</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../0_94/index.html">Version 0.94</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../0_93/index.html">Version 0.93</a>
+          </li>
+          </ul>
+              <h5>Resources</h5>
+            <ul>
+              
+    <li class="none">
+                    <a href="../faq.html">FAQ</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../articles.html">Articles</a>
+          </li>
+              
+    <li class="none">
+                    <a href="http://wiki.apache.org/ws/FrontPage/Axis2/" class="externalLink">Wiki</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../refLib.html">Reference Library</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../../1_4_1/api/index.html">Online Java Docs</a>
+          </li>
+          </ul>
+              <h5>Get Involved</h5>
+            <ul>
+              
+    <li class="none">
+                    <a href="../overview.html">Overview</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../svn.html">Checkout the Source</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../mail-lists.html">Mailing Lists</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../release-process.html">Release Process</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../guidelines.html">Developer Guidelines</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../siteHowTo.html">Build the Site</a>
+          </li>
+          </ul>
+              <h5>Project Information</h5>
+            <ul>
+              
+    <li class="none">
+                    <a href="../team-list.html">Project Team</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../issue-tracking.html">Issue Tracking</a>
+          </li>
+              
+    <li class="none">
+                    <a href="http://svn.apache.org/viewcvs.cgi/webservices/axis2/trunk/?root=Apache-SVN" class="externalLink">Source Code</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../thanks.html">Acknowledgements</a>
+          </li>
+              
+    <li class="none">
+                    <a href="http://www.apache.org/licenses/LICENSE-2.0.html" class="externalLink">License</a>
+          </li>
+          </ul>
+                                           <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
+            <img alt="Built by Maven" src="../images/logos/maven-feather.png"></img>
+          </a>
+                       
+  
+
+  
+    
+  
+  
+    
+        </div>
+    </div>
+    <div id="bodyColumn">
+      <div id="contentBox">
+        <html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="generator" content="HTML Tidy for Windows (vers 14 June 2007), see www.w3.org"><meta http-equiv="content-type" content="text/html; charset=us-ascii">Axis2/Java 1.4.1 Documentation Home<link href="../css/axis-docs.css" rel="stylesheet" type="text/css" media="all"></head><h1>Apache Axis2/Java Version 1.4.1 Documentation
+Index</h1><h2>Introduction</h2><p>Apache Axis2, the third generation Web services engine is more
+efficient, more modular and more XML-oriented than its predecessor
+<a class="externalLink" href="http://ws.apache.org/axis/">Apache Axis</a>. It is
+carefully designed to support the easy addition of plug-in modules
+that extend its functionality for features such as security and
+increased reliability.</p>
+<p>Apache Axis2 Version 1.4.1 comes to you with
+performance improvements and bug fixes over the 1.1 release.</p>
+<p>This page will take you through the list of documents that we
+have in store for you.</p>
+<h2>Apache Axis2 User's Guide</h2><p>You can get started with Axis2 with the assistance of the
+following documents. They will guide you through the Axis2
+download, installation (both as a standalone Web services engine
+and as part of a J2EE compliant servlet container), and
+instructions on how to write Web services and Web services client
+using Apache Axis2.</p>
+<ul><li><a href="userguide.html#intro">Introduction</a>- Gives you an
+introduction to what Axis2 is, the life cycle of a Web services
+message, how Axis2 handles SOAP messages and also includes a basic
+description on Axis2 distributions, and how Axis2 behaves as part
+of a Web application or as a standalone client that is not part of
+a J2EE application.</li>
+<li><a href="installationguide.html">Download and Installation</a>-
+Lists the different distribution packages offered by Axis2 and
+gives in-depth instructions on the installation of the standalone
+method and as part of a J2EE servlet container.</li>
+<li><a href="userguide-installingtesting.html">Testing Client
+Code</a> - The best way to make sure that your system is running
+Axis2 is to install and test both a service and a client. This
+document describes this process in easy to understand steps.</li>
+<li><a href="userguide-introtoservices.html">Introduction to
+Services</a> - The term &quot;Web services&quot; can apply to a number of
+different ways of sending information back and forth. However, this
+guide focuses on the sending and receiving of SOAP messages and
+Message Exchange Patterns (MEPs).</li>
+<li><a href="userguide-creatingclients.html">Creating Clients from
+WSDL</a> - When it comes to creating a Web service client, you can
+do it manually as described in the next document. However, in most
+cases, you will have a Web Service Description Language (WSDL)
+definition that describes the messages that clients should send and
+expect to receive. Axis2 provides several ways to use this
+definition to automatically generate a client. This document
+explains how to create a client using WSDL definitions.</li>
+<li><a href="userguide-buildingservices.html">Building Services
+from Scratch</a> - Now that you know how to use Axis2 to generate
+clients from WSDL as described in the document before, this
+document digs a little deeper, showing you how to create services,
+and how to create both services and clients &quot;from scratch&quot;, so to
+speak.</li>
+<li><a href="userguide-samples.html">Samples</a> - The Axis2
+Standard Distribution provides a number of samples you can use as a
+guide for implementing specific features and capabilities. These
+services are listed in this document along with basic introductions
+for each one.</li>
+<li><a href="userguide-forfurtherstudy.html">For Further Study</a>
+- This section lists resource documents for further study.
+<ul><li><a href="pojoguide.html">POJO Web Services using Apache
+Axis2</a>-This guide will show you how to create a Plain Old Java
+Object (POJO) for deploying using Apache Axis2 on Apache Tomcat.
+POJOs are fast to build and easy to maintain, which means you'll
+save a lot of time building and debugging your code</li>
+<li><a href="quickstartguide.html">Axis2 Quick Start Guide</a>-The
+purpose of this guide is to get you started on creating services
+and clients using Axis2 as quickly as possible. It demonstrates how
+to create Web services using a variety of different
+technologies.&lt;/&gt;</li>
+</ul>
+</li>
+</ul>
+
+Also see our <a href="../faq.html">FAQ page</a> to answer those
+common questions in mind.
+<h2>How To</h2><p>This section deals with more advanced topics including Axis2
+support features such as Transports, Attachments, Pluggable Data
+Binding, Security, and REST Web services in detail.</p>
+<ul><li><a href="webadminguide.html">Web Administrator's Guide</a> -
+Detailed instructions on the administration console of Axis2 Web
+application, which provides run-time configuration of Axis2.</li>
+<li><a href="migration.html">Migrating from Axis 1.x to Axis 2</a>
+- Guiding Axis 1.x users in upgrading to Axis2</li>
+<li><a href="app_server.html">Application Server Specific
+Configuration Guide</a> - Provides extra configuration information
+required for application servers to run Axis2 to its fullest
+potential</li>
+<li><a class="externalLink" href="http://ws.apache.org/commons/axiom/OMTutorial.html">AXIOM
+Tutorial</a>-An introduction to Axis2's Object Model</li>
+<li><a href="rest-ws.html">REST Support</a>-Introduction on
+Representational State Transfer</li>
+<li><a href="Axis2-rpc-support.html">Axis2 RPC Support</a> - This
+document talks about the Axis2's Remote Procedure Calls support in
+a set of easy to understand implementation steps</li>
+<li><a href="mtom-guide.html">MTOM Guide -Sending Binary Data with
+SOAP</a> - Explains how to send binary data using the SOAP Message
+Transmission Optimization Mechanism</li>
+<li><a href="axis2config.html">Axis2 Configuration Guide</a> -
+Explains the three configurations in Axis2: global, service, and
+module</li>
+<li><a href="soapmonitor-module.html">SOAP Monitor How-to</a> - A
+guide on the utilities used to monitor the SOAP messages that
+invoke Web services, along with the results of those messages</li>
+<li><a href="WS_policy.html">Web Services Policy Support In
+Axis2</a> - Introduction to the role of Web services policy in
+Axis2</li>
+<li><a href="spring.html">Spring Framework</a> - A guide on how to
+use Axis2 with the Spring Framework</li>
+<li><a href="json_support.html">JSON Support</a> - This document
+explains how to use JSON support implementation in Axis2. Includes
+details on test cases and samples</li>
+<li><a href="ejb-provider.html">Guide to using EJB Provider in
+Axis2</a> - This guide explains how to use an EJB provider in Axis2
+using an example</li>
+<li><a href="clustering-guide.html">Clustering Guide</a> - This guide will show how you can leverage clustering support to improve Scalability, Failover and High Availability of your Web Services</li>
+</ul>
+<p><strong>Data Bindings:</strong></p>
+<ul><li><a href="adb/adb-howto.html">ADB How-to</a> - A guide on the
+Axis2 Databinding Framework (ADB)</li>
+<li><a href="adb/adb-advanced.html">Advanced ADB Framework
+Features</a> - Provides an insight into the newly added advanced
+features of ADB</li>
+<li><a href="adb/adb-tweaking.html">Tweaking the ADB Code
+Generator</a> - Explains the available mechanisms to extend
+ADB</li>
+<li><a href="adb/adb-codegen-integration.html">ADB Integration with
+Axis2</a> - A guide to writing an extension using the integrator in
+order to integrate ADB with Axis2</li>
+<li><a href="jibx/jibx-codegen-integration.html">JiBX Integration
+With Axis2</a> - A guide to using JiBX with Axis2 in order to
+expose existing Java code as a Web service and to implement a
+client for an existing Web service</li>
+</ul>
+<p><strong>Transports:</strong></p>
+<ul><li><a href="tcp-transport.html">TCP Transport</a> - A guide to
+sending and receiving SOAP messages via TCP in Axis2</li>
+<li><a href="mail-transport.html">Mail Transport</a> - Explains how
+to invoke a service using a Mail transport</li>
+<li><a href="mail-configuration.html">Mail Transport
+Configuration</a> - A guide to configuring Axis2 in order to get
+mail transport working</li>
+<li><a>HTTP Transports - A description on HTTP sender and HTTP
+receiver in Axis2</li>
+<li><a href="jms-transport.html">JMS Transport</a> - A description
+on JMS sender and JMS receiver in Axis2</li>
+<li><a href="transport_howto.html">Write Your Own Axis2
+Transport</a> - A quick and easy guide to create your own Axis2
+Transport protocol</li>
+</ul>
+<p><strong>Axis2 Tools:</strong></p>
+<ul><li><a href="../tools/1_4_1/CodegenToolReference.html">Code
+Generator Tool Guide for Command Line and Ant Tasks</a> - Lists
+command line and Ant task references. How to build a file using
+custom Ant tasks and how to invoke a Code Generator from Ant</li>
+<li><a href="../tools/1_4_1/eclipse/wsdl2java-plugin.html">Code
+Generator Wizard Guide for Eclipse Plug-in</a> - Explains the usage
+of the code generator Eclipse plug-in for WSDL2Java and/or
+Java2WSDL operations</li>
+<li><a href="../tools/1_4_1/eclipse/servicearchiver-plugin.html">Service
+Archive Generator Wizard Guide for Eclipse Plug-in</a> - Describes
+the functionality of the Eclipse plugin service archive generator
+tool</li>
+<li><a href="../tools/1_4_1/idea/Idea_plug-in_userguide.html">Code
+Generator Wizard Guide for IntelliJ IDEA Plug-in</a> - A guide on
+the usage of the IDEA code generation plug-in to create service
+archives and generate Java class files from WSDL files</li>
+<li><a href="../tools/1_4_1/maven-plugins/maven-aar-plugin.html">Maven2
+AAR Plug-in Guide</a> - A guide to generate an Axis 2 service file
+(AAR file) using the Maven plug-in.</li>
+<li><a href="../tools/1_4_1/maven-plugins/maven-java2wsdl-plugin.html">
+Maven2 Java2WSDL Plug-in Guide</a> - A guide to using Java2WSDL
+Maven 2 Plug-in that takes a Java class as input and generates a
+WSDL, which describes a Web service for invoking the class
+methods</li>
+<li><a href="../tools/1_4_1/maven-plugins/maven-wsdl2code-plugin.html">
+Maven2 WSDL2Code Plug-in Guide</a> - A guide to using this plugin
+that takes as input a WSDL and generates client and server stubs
+for calling or implementing a Web service matching the WSDL.</li>
+</ul>
+<h2>Apache Axis2 Developers</h2><ul><li><a href="adv-userguide.html">Advanced User's Guide</a> - A
+quick start user's guide for more experienced users and developers
+on how to install, create Web services and Web service clients
+using Axis2.
+<ul><li><a href="adv-userguide.html#introduction">Introduction</a> -
+Outlines the overall direction of the user guide, with a high level
+introduction on Axis2</li>
+<li><a href="installationguide.html">Download and Installation</a>
+- Lists the different distribution packages offered by Axis2, and
+the installations for the standalone and as part of a J2EE servlet
+container methods.</li>
+<li><a href="adv-userguide.html#ws_codegen">Creating a new Web
+Service with Code Generation</a> - Axis2 provides two ways to
+create new Web Services: using code generation and XML based
+primary APIs. This section explains how to start from a WSDL, and
+create a new Service with code generation</li>
+<li><a href="xmlbased-server.html">Writing Web Services Using
+Axis2's Primary APIs</a> - Explains how to create new Web Services
+using XML based primary APIs</li>
+<li><a href="adv-userguide.html#client">Writing a Web Service
+Client with Code Generation</a> - Axis2 also provides a more
+complex, yet powerful XML based client API that is intended for
+advanced users. However, if you are a new user we recommend using
+the code generation approach presented below</li>
+<li><a href="dii.html">Writing Web Service Clients Using Axis2's
+Primary APIs</a> - This section presents complex yet powerful XML
+based client APIs, which is intended for advanced users to write
+Web services clients</li>
+<li><a href="adv-userguide.html#config">Configuring Axis2</a> -
+Axis2 configuration is based on a repository and standard archive
+formats. Here you will find details on how to configure Axis2. You
+will also find reference documents that lead to greater detail in
+this area.</li>
+</ul>
+</li>
+<li><a href="Axis2ArchitectureGuide.html">Axis2 Architecture
+Guide</a> - Introduction to Axis2's modular architecture</li>
+<li><a class="externalLink" href="http://ws.apache.org/axis2/1_4_1/api/index.html">Online
+Java Docs</a> - Java API documentation</li>
+<li><a href="../refLib.html">Reference Library</a> - This document
+provides additional information to developers on WS-*
+specifications, Java language specifications, Subversion (SVN)
+control etc.</li>
+</ul>
+<h2>References</h2><p>Gives you a list of published articles, tutorials and
+Questions-Answers on Apache Axis2. <a href="../articles.html">Check
+them out</a> for that extra knowledge on the next generation Web
+services engine Apache Axis2. Be informed and up-to-date!</p>
+</html>
+      </div>
+    </div>
+    <div class="clear">
+      <hr/>
+    </div>
+    <div id="footer">
+      <div class="xright">&#169;  
+          2004-2008
+    
+          Apache Software Foundation
+          
+  
+
+  
+    
+  
+  
+    
+  </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+  </body>
+</html>

Added: webservices/axis2/site/1_4_1/dii.html
URL: http://svn.apache.org/viewvc/webservices/axis2/site/1_4_1/dii.html?rev=688807&view=auto
==============================================================================
--- webservices/axis2/site/1_4_1/dii.html (added)
+++ webservices/axis2/site/1_4_1/dii.html Mon Aug 25 11:10:04 2008
@@ -0,0 +1,577 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+
+
+
+
+
+
+
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>Apache Axis2 - </title>
+    <style type="text/css" media="all">
+      @import url("../css/maven-base.css");
+      @import url("../css/maven-theme.css");
+      @import url("../css/site.css");
+    </style>
+    <link rel="stylesheet" href="../css/print.css" type="text/css" media="print" />
+        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+      </head>
+  <body class="composite">
+    <div id="banner">
+                  <a href="../" id="bannerLeft">
+    
+                                    <img src="http://www.apache.org/images/asf_logo_wide.png" alt="" />
+    
+            </a>
+                          <span id="bannerRight">
+    
+                                            <img src="../../images/axis.jpg" alt="" />
+    
+            </span>
+            <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="breadcrumbs">
+          
+  
+
+  
+    
+  
+  
+    
+            <div class="xleft">
+        Last Published: 2008-08-24
+                      </div>
+            <div class="xright">            <a href="../index.html">Axis2/Java</a>
+            |
+                <a href="../../c">Axis2/C</a>
+            |
+                <a href="../../..">Apache WS</a>
+            |
+                <a href="http://www.apache.org" class="externalLink">Apache</a>
+            
+  
+
+  
+    
+  
+  
+    
+  </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="leftColumn">
+      <div id="navcolumn">
+           
+  
+
+  
+    
+  
+  
+    
+                   <h5>Axis2/Java</h5>
+            <ul>
+              
+    <li class="none">
+                    <a href="../index.html">Home</a>
+          </li>
+          </ul>
+              <h5>Downloads</h5>
+            <ul>
+              
+    <li class="none">
+                    <a href="../download.cgi">Releases</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../modules/index.html">Modules</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../tools/index.html">Tools</a>
+          </li>
+          </ul>
+              <h5>Documentation</h5>
+            <ul>
+              
+          
+              
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+              
+        <li class="expanded">
+                    <a href="../1_4_1/contents.html">Version 1.4.1</a>
+                  <ul>
+                  
+    <li class="none">
+                    <a href="../1_4_1/toc.html">Table of Contents</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/installationguide.html">Installation Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/quickstartguide.html">QuickStart Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/userguide.html">User Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/jaxws-guide.html">JAXWS Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/pojoguide.html">POJO Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/spring.html">Spring Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/webadminguide.html">Web Administrator's Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/migration.html">Migration Guide (from Axis1)</a>
+          </li>
+              </ul>
+        </li>
+              
+    <li class="none">
+                    <a href="../1_4/contents.html">Version 1.4</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../1_3/contents.html">Version 1.3</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../1_2/contents.html">Version 1.2</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../1_1_1/contents.html">Version 1.1.1</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../1_1/contents.html">Version 1.1</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../1_0/index.html">Version 1.0</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../0_95/index.html">Version 0.95</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../0_94/index.html">Version 0.94</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../0_93/index.html">Version 0.93</a>
+          </li>
+          </ul>
+              <h5>Resources</h5>
+            <ul>
+              
+    <li class="none">
+                    <a href="../faq.html">FAQ</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../articles.html">Articles</a>
+          </li>
+              
+    <li class="none">
+                    <a href="http://wiki.apache.org/ws/FrontPage/Axis2/" class="externalLink">Wiki</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../refLib.html">Reference Library</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../../1_4_1/api/index.html">Online Java Docs</a>
+          </li>
+          </ul>
+              <h5>Get Involved</h5>
+            <ul>
+              
+    <li class="none">
+                    <a href="../overview.html">Overview</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../svn.html">Checkout the Source</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../mail-lists.html">Mailing Lists</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../release-process.html">Release Process</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../guidelines.html">Developer Guidelines</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../siteHowTo.html">Build the Site</a>
+          </li>
+          </ul>
+              <h5>Project Information</h5>
+            <ul>
+              
+    <li class="none">
+                    <a href="../team-list.html">Project Team</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../issue-tracking.html">Issue Tracking</a>
+          </li>
+              
+    <li class="none">
+                    <a href="http://svn.apache.org/viewcvs.cgi/webservices/axis2/trunk/?root=Apache-SVN" class="externalLink">Source Code</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../thanks.html">Acknowledgements</a>
+          </li>
+              
+    <li class="none">
+                    <a href="http://www.apache.org/licenses/LICENSE-2.0.html" class="externalLink">License</a>
+          </li>
+          </ul>
+                                           <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
+            <img alt="Built by Maven" src="../images/logos/maven-feather.png"></img>
+          </a>
+                       
+  
+
+  
+    
+  
+  
+    
+        </div>
+    </div>
+    <div id="bodyColumn">
+      <div id="contentBox">
+        <html><head><meta http-equiv="content-type" content=""><link href="../css/axis-docs.css" rel="stylesheet" type="text/css" media="all"></head><a name="Web_Service_Clients_Using_Axis2"></a><h1>Writing Web Service Clients Using Axis2's Primary APIs</h1><p>This section presents a complex yet powerful <strong>XML based client
+API</strong>, which is intended for advanced users. However, if you are a new
+user, we recommend using code generation given in the <a href="adv-userguide.html">Advanced User's Guide</a>.</p>
+<p>Web services can be used to provide a wide-range of functionality to the
+user from simple, quick operations such as &quot;getStockQuote&quot; to time consuming
+business services. When we utilize (invoke using client applications) these
+Web services, we cannot always use simple generic invocation paradigms that suite
+all the timing complexities involved in the service operations. For example,
+if we use a single transport channel (such as HTTP) to invoke a Web service
+with an IN-OUT operation that takes a long time to complete, then most often
+we may end up with &quot;connection time outs&quot;. Further, if there are
+simultaneous service invocations that we need to perform from a single client
+application, then the use of a &quot;blocking&quot; client API will degrade the
+performance of the client application. Similarly, there are various other
+consequences such as One-Way transports that come into play when we need
+them. Let's try to analyze some common service invocation paradigms.</p>
+<p>Many Web service engines provide users with Blocking and Non-Blocking
+client APIs.</p>
+<ul><li><b>Blocking API</b> - Once the service
+    invocation is called, the client application hangs, regaining control
+    only when the operation completes, after which the client receives a
+    response or a fault. This is the simplest way of invoking Web services,
+    and it also suites many business situations.</li>
+<li><b>Non-Blocking API </b>- This is a callback or polling based API.
+    Here, once a service invocation is called, the client application
+    immediately regains control and the response is retrieved using the
+    callback object provided. This approach allows the
+    client application to invoke several Web services simultaneously without
+    needing to wait for the response of previous operations.</li>
+</ul>
+<p>Both these mechanisms work at the API level. Let's name the asynchronous
+behavior that we can get using the Non-Blocking API as <b>API Level
+Asynchrony.</b></p>
+<p>Both mechanisms use single transport connections to send the request and
+to receive the response. They severely lag the capability of using two
+transport connections for the request and the response (either One-Way or
+Two-Way). So both these mechanisms fail to address the problem of long
+running transactions, as the transport connection may still time-out before the
+operation completes. A possible solution would be to use two separate
+transport connections for request and response. The asynchronous behavior
+that we gain using this solution can be called <b>Transport Level
+Asynchrony</b>.</p>
+<p>By <strong>combining API Level Asynchrony and Transport Level
+Asynchrony</strong>, we can obtain four different invocation patterns for Web
+services as shown in the following table.</p>
+<a name="table1"></a><table class="bodyTable"><tbody><tr class="a"><td width="33%"><p><strong>API
+        (Blocking/Non-Blocking)</strong></p>
+</td>
+<td width="33%"><p><strong>Dual Transports (Yes/No)</strong></p>
+</td>
+<td width="33%"><p><strong>Description</strong></p>
+</td>
+</tr>
+<tr class="b"><td width="33%"><p>Blocking</p>
+</td>
+<td width="33%"><p>No</p>
+</td>
+<td width="33%"><p>The simplest and most familiar invocation pattern</p>
+</td>
+</tr>
+<tr class="a"><td width="33%"><p>Non-Blocking</p>
+</td>
+<td width="33%"><p>No</p>
+</td>
+<td width="33%"><p>Using callbacks or polling</p>
+</td>
+</tr>
+<tr class="b"><td width="33%"><p>Blocking</p>
+</td>
+<td width="33%"><p>Yes</p>
+</td>
+<td width="33%"><p>This is useful when the service operation is Request-Response
+        in nature but the transport used is One-Way (e.g. SMTP)</p>
+</td>
+</tr>
+<tr class="a"><td width="33%"><p>Non-Blocking</p>
+</td>
+<td width="33%"><p>Yes</p>
+</td>
+<td width="33%"><p>This is can be used to gain the maximum asynchronous
+        behavior. Non blocking at the API level and also at the transport
+        level.</p>
+</td>
+</tr>
+</tbody></table>
+<p>Axis2 provides the user with all these possibilities to invoke Web
+services.</p>
+<p>The following section presents clients that use some of the different
+possibilities presented above to invoke a Web Service using
+<code>ServiceClient</code>s. All the samples mentioned in this guide are
+located at the <b><font color="#000000">&quot;samples\userguide\src&quot;</font></b>
+directory of the binary distribution.</p>
+<p>This section presents four types of clients.</p>
+<ol type="1"><li>Request-Response, Blocking Client</li>
+<li>One Way Client, Non-Blocking</li>
+<li>Request-Response, Non-Blocking that uses one transport connection</li>
+<li>Request-Response, Non-Blocking that uses two transport connections</li>
+</ol>
+<a name="EchoBlockingClient"></a><h4>Request-Response, Blocking Client</h4>
+<p>The client code below will invoke the &quot;echo&quot; operation of 
+&quot;MyService&quot; using a pure blocking single-channel invocation.</p>
+<div class="source"><pre><pre>  
+   try {
+      <span style="color: rgb(36, 193, 19);">            
+      OMElement payload = ClientUtil.getEchoOMElement();
+      Options options = new Options();
+      options.setTo(targetEPR); // this sets the location of MyService service
+            
+      ServiceClient serviceClient = new ServiceClient();
+      serviceClient.setOptions(options);
+
+      OMElement result = serviceClient.sendReceive(payload);
+      </span>
+      System.out.println(result);
+   } catch (AxisFault axisFault) {
+      axisFault.printStackTrace();
+   } 
+}</pre></pre>
+</div>
+<p>The lines highlighted in green show the set of operations that you need
+to perform in order to invoke the Web service in this manner.</p>
+<p>To test this client, use the provided Ant build file that can be found in
+the &quot;<strong>Axis2_HOME/samples/userguide</strong>&quot; directory. Run the
+&quot;run.client.blocking&quot; target. If you can see the response OMElement printed
+in your command line, then you have successfully tested the client.</p>
+<a name="PingClient"></a><h4>One Way Client, Non-Blocking</h4>
+<p>In the Web service &quot;MyService&quot;, we had an IN-ONLY operation with the name
+&quot;ping&quot; (see <a href="adv-userguide.html#Web_Services_Using_Axis2">Creating a
+New Web Service</a>). Let's write a client to invoke this operation. The
+client code is as follows:</p>
+<pre> 
+   try {
+      OMElement payload = ClientUtil.getPingOMElement();
+      Options options = new Options();
+      options.setTo(targetEPR);
+      ServiceClient serviceClient = new ServiceClient();
+      serviceClient.setOptions(options);
+      serviceClient.fireAndForget(payload);
+      /**
+       * We need to wait some time for the message to be sent.  Otherwise,
+       * if we immediately exit this function using the main thread, 
+       * the request won't be sent.
+       */
+      Thread.sleep(500);
+   } catch (AxisFault axisFault) {
+      axisFault.printStackTrace();
+   }
+</pre><p>Since we are calling an IN-ONLY web service, we can directly use the
+<code>fireAndForget()</code> in the ServiceClient to invoke this operation.
+This will not block the invocation and will return the control immediately
+back to the client. You can test this client by running the target
+&quot;run.client.ping&quot; of the Ant build file at
+&quot;<strong>Axis2Home/samples/userguide</strong>&quot;.</p>
+<a name="EchoNonBlockingClient"></a><h4>Request-Response, Non-Blocking that uses one transport connection</h4>
+<p>In the &quot;EchoBlockingClient&quot; once the
+<code>serviceClient.sendReceive(payload);</code> is called, the client is
+blocked till the operation is complete. This behavior is not desirable when
+there are many Web service invocations to be done in a single client
+application or within a GUI. A solution would be to use a Non-Blocking API to
+invoke Web services. Axis2 provides a callback based non-blocking API for
+users.</p>
+<p>A sample client for this can be found under
+&quot;<strong>Axis2_HOME/samples/userguide/src/userguide/clients</strong>&quot; with
+the name &quot;EchoNonBlockingClient&quot;. If we consider the changes that the developer may
+have to do with respect to the &quot;EchoBlockingClient&quot; that we have already
+seen, it will be as follows:</p>
+<pre style="margin-bottom: 0.2in">serviceClient.sendReceiveNonblocking(payload, callback);</pre><p>The invocation accepts a Callback object as a parameter. Axis2 client API
+provides an abstract Callback with the following methods:</p>
+<pre>public abstract void onComplete(AsyncResult result);
+public abstract void onError(Exception e);
+public boolean isComplete() {}</pre><p>The developer is expected to override the onComplete() and onError() methods
+of their Callback subclass. The Axis2 engine calls the onComplete()
+method once the Web service response is received by the Axis2 Client API
+(ServiceClient). This eliminates the blocking nature of the web service
+request-response invocation.</p>
+<p>To run the sample client (&quot;EchoNonBlockingClient&quot;) you can simply use the
+<code>run.client.nonblocking</code> target of the Ant file found in the
+&quot;<strong>Axis2_HOME/samples/userguide</strong>&quot; directory.</p>
+<a name="EchoNonBlockingDualClient"></a><h4>Request-Response, Non-Blocking that uses two transport connections</h4>
+<p>The solution provided above by the Non-Blocking API has one limitation when it
+comes to Web service invocations that take a long time to complete. The
+limitation is due to the use of single transport connections to invoke the
+Web service and retrieve the response. In other words, the client API provides a
+non-blocking invocation mechanism for developers, but the request and the response
+still come in a single transport (Two-Way transport) connection like HTTP. Long
+running Web service invocations or Web service invocations using One-Way
+transports such as SMTP cannot be utilized by simply using a non-blocking
+API invocation.</p>
+<p>The simplest solution is to use separate transport connections (either
+One-Way or Two-Way) for the request and response. The next problem that needs
+to be solved, however, is subsequently correlating each request with its response.
+<a class="externalLink" href="http://www.w3.org/2002/ws/addr/">WS-Addressing</a>
+provides a neat solution to this using &lt;wsa:MessageID&gt; and
+&lt;wsa:RelatesTo&gt; headers. Axis2 provides support for an addressing based
+correlation mechanism and a complying Client API to invoke Web services with
+two transport connections. (The core of Axis2 does not depend on
+WS-Addressing, but contains a set of parameters, like in addressing, that can
+be populated by any method. WS-Addressing is one of the uses that may
+populate them. Even the transports can populate them. Hence, Axis2 has the
+flexibility to use different addressing standards.)</p>
+<p>Users can select between Blocking and Non-Blocking APIs for the Web
+service clients with two transport connections. By simply using a boolean
+flag, the same API can be used to invoke Web services (IN-OUT operations)
+using two separate transport connections. Let's see how it's done using an
+example. The following code fragment shows how to invoke the same &quot;echo&quot;
+operation using Non-Blocking API with two transport connections<strong>. The
+ultimate asynchrony!!</strong></p>
+<pre>
+   try {
+      OMElement payload = ClientUtil.getEchoOMElement();
+
+      Options options = new Options();
+      options.setTo(targetEPR);
+      options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+      options.setUseSeparateListener(true);
+      options.setAction(&quot;urn:echo&quot;);  // this is the action mapping we put within the service.xml
+
+      //Callback to handle the response
+      Callback callback = new Callback() {
+         public void onComplete(AsyncResult result) {
+            System.out.println(result.getResponseEnvelope());
+         }
+
+         public void onError(Exception e) {
+            e.printStackTrace();
+         }
+      };
+
+      //Non-Blocking Invocation            
+      sender = new ServiceClient();            
+      sender.engageModule(new QName(Constants.MODULE_ADDRESSING));
+      sender.setOptions(options);            
+      sender.sendReceiveNonBlocking(payload, callback);            
+   
+      //Wait till the callback receives the response.            
+      while (!callback.isComplete()) {                
+         Thread.sleep(1000);            
+      }               
+   } catch (AxisFault axisFault) {            
+     axisFault.printStackTrace();
+   } catch (Exception ex) {
+     ex.printStackTrace();
+   } finally {
+      try {
+         //Close the Client Side Listener.
+         sender.cleanup();
+      } catch (AxisFault axisFault) {
+        //have to ignore this
+      }
+   }
+</pre><p>The boolean flag (value True) in the
+<b><code>options.setUseSeparateListener(...)</code></b> method informs the
+Axis2 engine to use separate transport connections for the request and
+response. Finally <b><code>sender.cleanup()</code></b> informs the Axis2
+engine to stop the client side listener, which started to retrieve the
+response.</p>
+<p>To run the sample client (&quot;EchoNonBlockingDualClient&quot;) you can simply use
+the &quot;run.client.nonblockingdual&quot; target of the Ant file found in the
+&quot;<strong>Axis2_HOME/samples/userguide/</strong>&quot; directory.</p>
+</html>
+      </div>
+    </div>
+    <div class="clear">
+      <hr/>
+    </div>
+    <div id="footer">
+      <div class="xright">&#169;  
+          2004-2008
+    
+          Apache Software Foundation
+          
+  
+
+  
+    
+  
+  
+    
+  </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+  </body>
+</html>

Added: webservices/axis2/site/1_4_1/ejb-provider.html
URL: http://svn.apache.org/viewvc/webservices/axis2/site/1_4_1/ejb-provider.html?rev=688807&view=auto
==============================================================================
--- webservices/axis2/site/1_4_1/ejb-provider.html (added)
+++ webservices/axis2/site/1_4_1/ejb-provider.html Mon Aug 25 11:10:04 2008
@@ -0,0 +1,554 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+
+
+
+
+
+
+
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>Apache Axis2 - </title>
+    <style type="text/css" media="all">
+      @import url("../css/maven-base.css");
+      @import url("../css/maven-theme.css");
+      @import url("../css/site.css");
+    </style>
+    <link rel="stylesheet" href="../css/print.css" type="text/css" media="print" />
+        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+      </head>
+  <body class="composite">
+    <div id="banner">
+                  <a href="../" id="bannerLeft">
+    
+                                    <img src="http://www.apache.org/images/asf_logo_wide.png" alt="" />
+    
+            </a>
+                          <span id="bannerRight">
+    
+                                            <img src="../../images/axis.jpg" alt="" />
+    
+            </span>
+            <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="breadcrumbs">
+          
+  
+
+  
+    
+  
+  
+    
+            <div class="xleft">
+        Last Published: 2008-08-24
+                      </div>
+            <div class="xright">            <a href="../index.html">Axis2/Java</a>
+            |
+                <a href="../../c">Axis2/C</a>
+            |
+                <a href="../../..">Apache WS</a>
+            |
+                <a href="http://www.apache.org" class="externalLink">Apache</a>
+            
+  
+
+  
+    
+  
+  
+    
+  </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="leftColumn">
+      <div id="navcolumn">
+           
+  
+
+  
+    
+  
+  
+    
+                   <h5>Axis2/Java</h5>
+            <ul>
+              
+    <li class="none">
+                    <a href="../index.html">Home</a>
+          </li>
+          </ul>
+              <h5>Downloads</h5>
+            <ul>
+              
+    <li class="none">
+                    <a href="../download.cgi">Releases</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../modules/index.html">Modules</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../tools/index.html">Tools</a>
+          </li>
+          </ul>
+              <h5>Documentation</h5>
+            <ul>
+              
+          
+              
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+              
+        <li class="expanded">
+                    <a href="../1_4_1/contents.html">Version 1.4.1</a>
+                  <ul>
+                  
+    <li class="none">
+                    <a href="../1_4_1/toc.html">Table of Contents</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/installationguide.html">Installation Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/quickstartguide.html">QuickStart Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/userguide.html">User Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/jaxws-guide.html">JAXWS Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/pojoguide.html">POJO Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/spring.html">Spring Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/webadminguide.html">Web Administrator's Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4_1/migration.html">Migration Guide (from Axis1)</a>
+          </li>
+              </ul>
+        </li>
+              
+    <li class="none">
+                    <a href="../1_4/contents.html">Version 1.4</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../1_3/contents.html">Version 1.3</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../1_2/contents.html">Version 1.2</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../1_1_1/contents.html">Version 1.1.1</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../1_1/contents.html">Version 1.1</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../1_0/index.html">Version 1.0</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../0_95/index.html">Version 0.95</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../0_94/index.html">Version 0.94</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../0_93/index.html">Version 0.93</a>
+          </li>
+          </ul>
+              <h5>Resources</h5>
+            <ul>
+              
+    <li class="none">
+                    <a href="../faq.html">FAQ</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../articles.html">Articles</a>
+          </li>
+              
+    <li class="none">
+                    <a href="http://wiki.apache.org/ws/FrontPage/Axis2/" class="externalLink">Wiki</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../refLib.html">Reference Library</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../../1_4_1/api/index.html">Online Java Docs</a>
+          </li>
+          </ul>
+              <h5>Get Involved</h5>
+            <ul>
+              
+    <li class="none">
+                    <a href="../overview.html">Overview</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../svn.html">Checkout the Source</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../mail-lists.html">Mailing Lists</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../release-process.html">Release Process</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../guidelines.html">Developer Guidelines</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../siteHowTo.html">Build the Site</a>
+          </li>
+          </ul>
+              <h5>Project Information</h5>
+            <ul>
+              
+    <li class="none">
+                    <a href="../team-list.html">Project Team</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../issue-tracking.html">Issue Tracking</a>
+          </li>
+              
+    <li class="none">
+                    <a href="http://svn.apache.org/viewcvs.cgi/webservices/axis2/trunk/?root=Apache-SVN" class="externalLink">Source Code</a>
+          </li>
+              
+    <li class="none">
+                    <a href="../thanks.html">Acknowledgements</a>
+          </li>
+              
+    <li class="none">
+                    <a href="http://www.apache.org/licenses/LICENSE-2.0.html" class="externalLink">License</a>
+          </li>
+          </ul>
+                                           <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
+            <img alt="Built by Maven" src="../images/logos/maven-feather.png"></img>
+          </a>
+                       
+  
+
+  
+    
+  
+  
+    
+        </div>
+    </div>
+    <div id="bodyColumn">
+      <div id="contentBox">
+        <html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="generator" content="HTML Tidy for Windows (vers 14 June 2007), see www.w3.org"><meta http-equiv="content-type" content="text/html; charset=us-ascii">Guide to using EJB Provider for Axis2<meta name="generator" content="amaya 9.2.1, see http://www.w3.org/Amaya/"></head><h1>Guide to using EJB Provider for Axis2</h1><p>The EJB message receiver allows one to access stateless session
+EJBs (Enterprise JavaBeans) through Web services. The example used
+in this guide illustrates how to use the EJB provider that ships
+with Axis2 to access EJBs deployed on a J2EE server such as
+Geronimo or JBoss.</p>
+<p>This example explains how to use Geronimo 1.1 and JBoss 4.0.4.GA
+as application server.</p>
+<p>The following steps will take you through the example through
+which we will explain how to use an EJB provider in Axis2</p>
+<h2>1. Creating a Simple Stateless Session EJB</h2><p>First we need to create a stateless session EJB. Use the
+following files to make an EJB for testing:</p>
+<pre>
+Remote interface (Hello.java)
+package my.ejb;
+import javax.ejb.EJBObject;
+
+public interface Hello extends EJBObject, HelloBusiness {
+}
+</pre><p>The following interface defines the business methods available
+in</p>
+<p><code>1.</code>HelloBusiness.java</p>
+<pre>
+package my.ejb;
+import java.rmi.RemoteException;
+
+public interface HelloBusiness {
+   public String sayHello(String name) throws RemoteException;
+}
+</pre><p>2, Remote home interface - HelloHome.java</p>
+<pre>
+package my.ejb;
+import javax.ejb.EJBHome;
+import javax.ejb.CreateException;
+import java.rmi.RemoteException;
+
+public interface HelloHome extends EJBHome {
+   public Hello create() throws CreateException, RemoteException;
+}
+</pre><p>3. Bean class - HelloBean.java</p>
+<pre>
+package my.ejb;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.ejb.EJBException;
+import javax.ejb.CreateException;
+
+public class HelloBean implements SessionBean {
+   public void setSessionContext(SessionContext sessionContext) throws
+      EJBException {}
+
+   public void ejbRemove() throws EJBException {}
+   public void ejbActivate() throws EJBException {}
+   public void ejbPassivate() throws EJBException {}
+   public void ejbCreate() throws CreateException {}
+
+   public String sayHello(String name) {
+      return &quot;Hello &quot; + name + &quot;, Have a nice day!&quot;;
+   }
+
+}
+</pre><p>4. Deployment descriptor - ejb-jar.xml</p>
+<pre>
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;ejb-jar xmlns=&quot;http://java.sun.com/xml/ns/j2ee&quot;
+        xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
+        xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/j2ee
+        http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd&quot;
+        version=&quot;2.1&quot;&gt;
+
+  &lt;enterprise-beans&gt;
+     &lt;session&gt;
+       &lt;ejb-name&gt;Hello&lt;/ejb-name&gt;
+       &lt;home&gt;my.ejb.HelloHome&lt;/home&gt;
+       &lt;remote&gt;my.ejb.Hello&lt;/remote&gt;
+       &lt;ejb-class&gt;my.ejb.HelloBean&lt;/ejb-class&gt;
+       &lt;session-type&gt;Stateless&lt;/session-type&gt;
+       &lt;transaction-type&gt;Bean&lt;/transaction-type&gt;
+     &lt;/session&gt;
+  &lt;/enterprise-beans&gt;
+  &lt;assembly-descriptor&gt;
+     &lt;container-transaction&gt;
+       &lt;method&gt;
+          &lt;ejb-name&gt;Hello&lt;/ejb-name&gt;
+          &lt;method-name&gt;*&lt;/method-name&gt;
+       &lt;/method&gt;
+       &lt;trans-attribute&gt;Required&lt;/trans-attribute&gt;
+     &lt;/container-transaction&gt;
+  &lt;/assembly-descriptor&gt;
+&lt;/ejb-jar&gt;
+</pre><p>Now we have to write application server specific deployment
+descriptor(s) for the Hello EJB. The following listing shows an
+example Geronimo/OpenEJB deployment descriptor
+(openejb-jar.xml)</p>
+<pre>
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;openejb-jar 
+    xmlns=&quot;http://www.openejb.org/xml/ns/openejb-jar-2.1&quot;
+    xmlns:naming=&quot;http://geronimo.apache.org/xml/ns/naming-1.1&quot;
+    xmlns:security=&quot;http://geronimo.apache.org/xml/ns/security-1.1&quot;
+    xmlns:sys=&quot;http://geronimo.apache.org/xml/ns/deployment-1.1&quot;
+    xmlns:pkgen=&quot;http://www.openejb.org/xml/ns/pkgen-2.0&quot;&gt;
+    &lt;enterprise-beans&gt;
+        &lt;session&gt;
+            &lt;ejb-name&gt;Hello&lt;/ejb-name&gt;
+            &lt;jndi-name&gt;my/ejb/HelloBean&lt;/jndi-name&gt;
+        &lt;/session&gt;
+    &lt;/enterprise-beans&gt;
+&lt;/openejb-jar&gt;
+</pre><p>If you want to test on JBoss, use the following JBoss deployment
+descriptor (jboss.xml)</p>
+<pre>
+&lt;?xml version=&quot;1.0&quot;?&gt;
+&lt;!DOCTYPE jboss PUBLIC &quot;-//JBoss//DTD JBOSS 4.0//EN&quot;
+      &quot;http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd&quot;&gt;
+&lt;jboss&gt;
+    &lt;enterprise-beans&gt;
+      &lt;session&gt;
+         &lt;ejb-name&gt;Hello&lt;/ejb-name&gt;
+         &lt;jndi-name&gt;my/ejb/HelloBean&lt;/jndi-name&gt;
+      &lt;/session&gt;
+    &lt;/enterprise-beans&gt;
+&lt;/jboss&gt;
+</pre><p>Compile the above java classes and bundle the compiled classes
+and the XML files into a jar file (HelloEJB.jar) as shown
+below.</p>
+<pre>
+ 
+HelloEJB.jar
+  |
+  +--META-INF
+  |    +--ejb-jar.xml
+  |    +--jboss.xml [If you want to deploy on Jboss]
+  |    +--openejb-jar.xml  [If you want to deploy on Geronimo/Openejb]
+  |
+  +--my
+       +--ejb
+             |
+             +--Hello.class
+             +--HelloBean.class
+             +--HelloBusiness.class
+             +--HelloHome.class
+ 
+</pre><p>Next, deploy the HelloEJB.jar file onto the appropriate J2EE
+application server.</p>
+<h2>Creating the Axis2 Service Archive</h2><p>Now we need to make the services.xml file.</p>
+<pre>
+&lt;serviceGroup&gt;
+    &lt;service name=&quot;HelloBeanService&quot;&gt;
+        &lt;description&gt;Hello! web service&lt;/description&gt;
+        &lt;messageReceivers&gt;
+            &lt;messageReceiver mep=&quot;http://www.w3.org/2004/08/wsdl/in-only&quot;
+                class=&quot;org.apache.axis2.rpc.receivers.ejb.EJBInOnlyMessageReceiver&quot;/&gt;
+        &lt;messageReceiver mep=&quot;http://www.w3.org/2004/08/wsdl/in-out&quot;
+                class=&quot;org.apache.axis2.rpc.receivers.ejb.EJBMessageReceiver&quot;/&gt;
+        &lt;/messageReceivers&gt;
+        &lt;parameter name=&quot;ServiceClass&quot;&gt;my.ejb.HelloBusiness&lt;/parameter&gt;
+        &lt;parameter name=&quot;remoteInterfaceName&quot;&gt;my.ejb.Hello&lt;/parameter&gt;
+        &lt;parameter name=&quot;homeInterfaceName&quot;&gt;my.ejb.HelloHome&lt;/parameter&gt;
+        &lt;parameter name=&quot;beanJndiName&quot;&gt;my/ejb/HelloBean&lt;/parameter&gt;
+        &lt;parameter name=&quot;providerUrl&quot;&gt;[URL]&lt;/parameter&gt;
+        &lt;parameter name=&quot;jndiContextClass&quot;&gt;[Context Factory Class
+             Name]&lt;/parameter&gt;
+     &lt;/service&gt;
+&lt;/serviceGroup&gt;
+</pre><p>In the above services.xml file, replace the [URL] and [Context
+Factory Class Name] with valid values as follows:</p>
+<p><strong>i.e. If the EJB is deployed on Geronimo:</strong></p>
+<p>Replace [URL] by 127.0.0.1:4201</p>
+<p>Replace [Context Factory Class Name] by
+org.openejb.client.JNDIContext</p>
+<p><strong>For Jboss:</strong></p>
+<p>Replace [URL] by jnp://localhost:1099</p>
+<p>Replace [Context Factory Class Name] by
+org.jnp.interfaces.NamingContextFactory</p>
+<p>Bundle the HelloBeanService.wsdl, services.xml, remote interface
+class and home interface class as illustrated below:</p>
+<pre>
+ 
+HelloBeanService.aar
+  |
+  +--META-INF
+  |    +--services.xml
+  |
+  +--lib
+  |    +--[jars used by the ejb client eg.initial context factory classes]
+  |
+  +--my
+       +--ejb
+             +--Hello.class
+             +--HelloBusiness.class
+             +--HelloHome.class
+ 
+</pre><p>The lib directory of HelloBeanService.aar must contain all the
+libraries needed to access the EJB. If the EJB is deployed on
+<strong>Geronimo</strong>, add the following jar files to the lib
+directory.</p>
+<ul><li>cglib-nodep-2.1_3.jar</li>
+<li>geronimo-ejb_2.1_spec-1.0.1.jar</li>
+<li>geronimo-j2ee-jacc_1.0_spec-1.0.1.jar</li>
+<li>geronimo-kernel-1.1.jar</li>
+<li>geronimo-security-1.1.jar</li>
+<li>openejb-core-2.1.jar</li>
+</ul>
+<p>For <strong>JBoss</strong> add the following jar files.</p>
+<ul><li>jnp-client.jar</li>
+<li>jboss-client.jar</li>
+<li>jboss-common-client.jar</li>
+<li>jboss-remoting.jar</li>
+<li>jboss-serialization.jar</li>
+<li>jboss-transaction-client.jar</li>
+<li>concurrent.jar</li>
+<li>jbosssx-client.jar</li>
+<li>jboss-j2ee.jar</li>
+</ul>
+<p>Deploy HelloBeanService.aar on an Axis2 server.</p>
+<p>Now you can access the Hello EJB through Web services. Since our
+EJB message receivers extend RPC message receivers,
+org.apache.axis2.rpc.client.RPCServiceClient can be used to invoke
+the service as illustrated in the following code fragment.</p>
+<pre>
+...
+
+RPCServiceClient serviceClient = new RPCServiceClient();
+Options options = serviceClient.getOptions();
+
+EndpointReference targetEPR = new
+   EndpointReference(&quot;http://localhost:8080/axis2/services/HelloBeanService&quot;);
+
+options.setTo(targetEPR);
+QName hello = new QName(&quot;http://ejb.my/xsd&quot;, &quot;sayHello&quot;);
+Object[] helloArgs = new Object[] {&quot;John&quot;};
+
+System.out.println(serviceClient.invokeBlocking(hello,
+   helloArgs).getFirstElement().getText());
+
+...
+</pre></html>
+      </div>
+    </div>
+    <div class="clear">
+      <hr/>
+    </div>
+    <div id="footer">
+      <div class="xright">&#169;  
+          2004-2008
+    
+          Apache Software Foundation
+          
+  
+
+  
+    
+  
+  
+    
+  </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+  </body>
+</html>



Mime
View raw message