You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2008/05/01 23:20:38 UTC

svn commit: r652665 [13/45] - in /webservices/axis2/site: ./ 1_4/ 1_4/adb/ 1_4/adb/images/ 1_4/images/ 1_4/images/archi-guide/ 1_4/images/userguide/ 1_4/jibx/ 1_4/src/ css/ download/0_9/ download/0_91/ download/0_92/ download/0_93/ download/0_94/ downl...

Added: webservices/axis2/site/1_4/soapmonitor-module.html
URL: http://svn.apache.org/viewvc/webservices/axis2/site/1_4/soapmonitor-module.html?rev=652665&view=auto
==============================================================================
--- webservices/axis2/site/1_4/soapmonitor-module.html (added)
+++ webservices/axis2/site/1_4/soapmonitor-module.html Thu May  1 14:20:27 2008
@@ -0,0 +1,435 @@
+<!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>Maven - </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-05-01
+                      </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/contents.html">Version 1.4</a>
+                  <ul>
+                  
+    <li class="none">
+                    <a href="../1_4/toc.html">Table of Contents</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4/installationguide.html">Installation Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4/quickstartguide.html">QuickStart Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4/userguide.html">User Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4/jaxws-guide.html">JAXWS Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4/pojoguide.html">POJO Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4/spring.html">Spring Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4/webadminguide.html">Web Administrator's Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4/migration.html">Migration Guide (from Axis1)</a>
+          </li>
+              </ul>
+        </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/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="">The SOAP Monitor Module<link href="../css/axis-docs.css" rel="stylesheet" type="text/css" media="all"></head><h1>Using the SOAP Monitor</h1><p>Web service developers often want to see the SOAP messages that are being
+used to invoke the Web services, along with the results of those messages.
+The goal of the SOAP Monitor utility is to provide a way for the developers
+to monitor these SOAP messages without requiring any special configuration or
+restarting the server.</p>
+<p>In this utility, a handler has been written and added to the global
+handler chain. As SOAP requests and responses are received, the SOAP message
+information is forwarded to a SOAP monitor service where it can be displayed
+using a Web browser interface. The SOAP message information is accessed by a
+Web browser by going to http://localhost:8080/axis2/SOAPMonitor (where 8080
+is the port number where the application server is running). The SOAP message
+information is displayed through a Web browser by using an applet that opens
+a socket connection to the SOAP monitor service. This applet requires a Java
+plug-in 1.3 or higher to be installed in your browser. If you do not have a
+correct plug-in, the browser will prompt you to install one. The port used by
+the SOAP monitor service to communicate with applets is configurable. Edit
+the web.xml file to change the port used by the Axis2 Web application.</p>
+<p>The SOAP Monitor module (soapmonitor.mar) is available in the axis2.war
+but it is not engaged by default. The SOAP Monitor is NOT enabled by default
+for security reasons.</p>
+<p>The SOAP Monitor can be engaged by inserting the following in the
+axis2.xml file.</p>
+<div class="source"><pre><pre>   &lt;module ref=&quot;soapmonitor&quot;/&gt;</pre></pre>
+</div>
+<p>In the axis2.xml file, define your phase orders for the 'soapmonitorPhase'
+referenced in the module.xml of soapmonitor.mars. Below is an example which
+should NOT be copied exactly, since the default phases change occasionally.
+The important point here is that 'soapmonitorPhase' should be placed under
+the 'user can add his own phases to this area' comment in the 'inflow',
+'outflow', 'INfaultflow', and 'Outfaultflow' sections.</p>
+<pre>    &lt;phaseOrder type=&quot;inflow&quot;&gt;
+        &lt;!--System pre defined phases--&gt;
+        &lt;phase name=&quot;TransportIn&quot;/&gt;
+        &lt;phase name=&quot;PreDispatch&quot;/&gt;
+        &lt;phase name=&quot;Dispatch&quot; class=&quot;org.apache.axis2.engine.DispatchPhase&quot;&gt;
+            &lt;handler name=&quot;AddressingBasedDispatcher&quot;
+                     class=&quot;org.apache.axis2.dispatchers.AddressingBasedDispatcher&quot;&gt;
+                &lt;order phase=&quot;Dispatch&quot;/&gt;
+            &lt;/handler&gt;
+            &lt;handler name=&quot;RequestURIBasedDispatcher&quot;
+                     class=&quot;org.apache.axis2.dispatchers.RequestURIBasedDispatcher&quot;&gt;
+                &lt;order phase=&quot;Dispatch&quot;/&gt;
+            &lt;/handler&gt;
+            &lt;handler name=&quot;SOAPActionBasedDispatcher&quot;
+                     class=&quot;org.apache.axis2.dispatchers.SOAPActionBasedDispatcher&quot;&gt;
+                &lt;order phase=&quot;Dispatch&quot;/&gt;
+            &lt;/handler&gt;
+            &lt;handler name=&quot;SOAPMessageBodyBasedDispatcher&quot;
+                     class=&quot;org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher&quot;&gt;
+                &lt;order phase=&quot;Dispatch&quot;/&gt;
+            &lt;/handler&gt;
+            &lt;handler name=&quot;InstanceDispatcher&quot;
+                     class=&quot;org.apache.axis2.engine.InstanceDispatcher&quot;&gt;
+                &lt;order phase=&quot;PostDispatch&quot;/&gt;
+            &lt;/handler&gt;
+        &lt;/phase&gt;
+        &lt;!--System pre defined phases--&gt;
+        &lt;!--After Postdispatch phase module author or or service author can add any phase he want--&gt;
+        &lt;phase name=&quot;userphase1&quot;/&gt;
+        &lt;phase name=&quot;soapmonitorPhase&quot;/&gt;
+    &lt;/phaseOrder&gt;
+    &lt;phaseOrder type=&quot;outflow&quot;&gt;
+        &lt;!--user can add his own phases to this area--&gt;
+        &lt;phase name=&quot;userphase1&quot;/&gt;
+        &lt;phase name=&quot;soapmonitorPhase&quot;/&gt;
+        &lt;!--system predefined phase--&gt;
+        &lt;!--these phase will run irrespective of the service--&gt;
+        &lt;phase name=&quot;PolicyDetermination&quot;/&gt;
+        &lt;phase name=&quot;MessageOut&quot;/&gt;
+    &lt;/phaseOrder&gt;
+    &lt;phaseOrder type=&quot;INfaultflow&quot;&gt;
+        &lt;!--user can add his own phases to this area--&gt;
+        &lt;phase name=&quot;userphase1&quot;/&gt;
+        &lt;phase name=&quot;soapmonitorPhase&quot;/&gt;
+    &lt;/phaseOrder&gt;
+    &lt;phaseOrder type=&quot;Outfaultflow&quot;&gt;
+        &lt;!--user can add his own phases to this area--&gt;
+        &lt;phase name=&quot;userphase1&quot;/&gt;
+        &lt;phase name=&quot;soapmonitorPhase&quot;/&gt;
+        &lt;phase name=&quot;PolicyDetermination&quot;/&gt;
+        &lt;phase name=&quot;MessageOut&quot;/&gt;
+    &lt;/phaseOrder&gt;</pre><p>To configure the servlet to communicate with the applet, add the following
+code to the web.xml (The SOAPMonitorPort is configurable.):</p>
+<pre>    &lt;servlet&gt;
+       &lt;servlet-name&gt;SOAPMonitorService&lt;/servlet-name&gt;
+       &lt;display-name&gt;SOAPMonitorService&lt;/display-name&gt;
+       &lt;servlet-class&gt;
+         org.apache.axis2.soapmonitor.servlet.SOAPMonitorService
+       &lt;/servlet-class&gt;
+       &lt;init-param&gt;
+          &lt;param-name&gt;SOAPMonitorPort&lt;/param-name&gt;
+          &lt;param-value&gt;5001&lt;/param-value&gt;
+       &lt;/init-param&gt;
+       &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
+    &lt;/servlet&gt;
+
+    &lt;servlet-mapping&gt;
+        &lt;servlet-name&gt;SOAPMonitorService&lt;/servlet-name&gt;
+        &lt;url-pattern&gt;/SOAPMonitor&lt;/url-pattern&gt;
+    &lt;/servlet-mapping&gt;</pre><p>Finally, compile the applet classes and place them at the root (eg:
+&lt;CATALINA_HOME&gt;/webapps/axis2/) of the extracted WAR file. You can find
+the SOAPMonitorApplet.java in the source distribution. To compile, use the
+following command:</p>
+<pre>javac -classpath axis2-soapmonitor.jar org/apache/axis2/soapmonitor/applet/SOAPMonitorApplet.java</pre><p>Alternatively, you can directly get the <strong>compiled applet
+classes</strong> from the WEB-INF/lib/soapmonitor-1.4.jar which is inside
+the extracted axis2.war. To extract the soapmonitor-1.4.jar file, simply
+execute the command, <code>jar -xf soapmonitor-1.4.jar</code> and place
+the compiled applet classes in the root directory of the extracted WAR, for
+example, in &lt;CATALINA_HOME&gt;/webapps/axis2/. NOTE: Starting with axis2 1.4, 
+the applets code is in the org.apache.axis2.soapmonitor.applet package. Therefore 
+the 'org' directory created by the unpacking of soapmonitor-1.4.jar should be placed
+in &lt;CATALINA_HOME&gt;/webapps/axis2/ as shown in the above example.</p>
+<p>Using a Web browser, go to http[s]://host[:port][/webapp]/SOAPMonitor
+(e.g.http://localhost:8080/axis2/SOAPMonitor) substituting the correct values
+for your Web application. This will show the SOAP Monitor applet used to view
+the service requests and responses. Any requests to services that have been
+configured and deployed correctly should show up in the applet.</p>
+<p>The SOAPMonitor with attachments currently serializes themselves as base64
+characters. It is therefore recommended to use the TCPMon tool to correctly
+capture MTOM and SWA messages as an multipart mime where the binary data is
+an attachment.</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/spring.html
URL: http://svn.apache.org/viewvc/webservices/axis2/site/1_4/spring.html?rev=652665&view=auto
==============================================================================
--- webservices/axis2/site/1_4/spring.html (added)
+++ webservices/axis2/site/1_4/spring.html Thu May  1 14:20:27 2008
@@ -0,0 +1,739 @@
+<!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>Maven - </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-05-01
+                      </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/contents.html">Version 1.4</a>
+                  <ul>
+                  
+    <li class="none">
+                    <a href="../1_4/toc.html">Table of Contents</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4/installationguide.html">Installation Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4/quickstartguide.html">QuickStart Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4/userguide.html">User Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4/jaxws-guide.html">JAXWS Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4/pojoguide.html">POJO Guide</a>
+          </li>
+                  
+    <li class="none">
+              <strong>Spring Guide</strong>
+        </li>
+                  
+    <li class="none">
+                    <a href="../1_4/webadminguide.html">Web Administrator's Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4/migration.html">Migration Guide (from Axis1)</a>
+          </li>
+              </ul>
+        </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/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="">Axis2 integration with the Spring Framework<link href="../css/axis-docs.css" rel="stylesheet" type="text/css" media="all"></head><h1>Axis2 Integration with the Spring Framework</h1><p>This document is a guide on how to use Axis2 with the Spring Framework</p>
+<h2>Content</h2><ul><li><a href="#1">Introduction</a>
+</li>
+<li><a href="#2">Configuring Axis2 to be Spring Aware</a>
+<ul><li><a href="#21">Programming Model</a>
+</li>
+<li><a href="#22">Simple Spring Config Example</a>
+</li>
+<li><a href="#23">With a ServletContext</a>
+</li>
+<li><a href="#24">Without a ServletContext</a>
+</li>
+<li><a href="#25">Putting it All Together</a>
+</li>
+<li><a href="#26">Spring Inside an AAR </a>
+<ul><li><a href="#261">The Spring Inside an AAR Layout</a>
+</li>
+<li><a href="#262">The Spring Inside an AAR init Class</a>
+</li>
+<li><a href="#263">Known Issues Running Spring Inside the
+          AAR</a>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+<a name="a1"></a>
+<h2>Introduction</h2><p>Axis2 and Spring integration takes place when Spring supplies one of its
+pre-loaded beans to the Axis2 Message Receiver defined in the AAR
+services.xml. Axis2 typically uses reflection to instantiate the ServiceClass
+defined in the services.xml used by the Message Receiver. Alternatively, you
+can define a ServiceObjectSupplier that will supply the Object.</p>
+<p>This guide describes how to use two separate ServiceObjectSupplier classes
+that are a part of the Axis2 standard distribution - one for use with a
+ServletContext, and one without. Configuring Axis2 with a ServletContext is 
+simpler than without, and is recommended for most use cases. Without a 
+ServletContext, ie, Spring inside the AAR, requires an extra Spring bean 
+and is considered an advanced use case. Once configured, the Web service itself 
+acts like any other Spring wired bean. These Spring beans can be loaded any way
+desired as Axis2 has no configuration file dependencies from Spring. Spring
+versions 1.2.6, 1.2.8 and 2.0 have been tested, but probably any version
+would work as only the core functionality is required.</p>
+<p>This guide assumes some basic knowledge of Axis2. See the <a href="userguide.html">User's Guide</a>
+ for more information.</p>
+<a name="a2"></a>
+<h3>Programming Model</h3><p>From an Axis2 standpoint, two hooks are needed to be placed into the AAR
+services.xml - the ServiceObjectSupplier that hooks Axis2 and Spring
+together, and the name of the Spring bean that Axis2 will use as the service.
+All Message Receivers are currently supported, as would be any Message
+Receiver that extends org.apache.axis2.receivers.AbstractMessageReceiver .</p>
+<a name="a22"></a>
+<h3>Simple Spring Config Example</h3><p>For the purpose of this example, we'll configure Spring via a WAR file's
+web.xml. Let's add a context-param and a listener:</p>
+<pre>&lt;listener&gt;
+        &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
+&lt;/listener&gt;
+&lt;context-param&gt;
+      &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
+      &lt;param-value&gt;/WEB-INF/applicationContext.xml&lt;/param-value&gt;
+&lt;/context-param&gt;</pre><p>Next we will show two examples of Spring's /WEB-INF/applicationContext.xml
+referenced in the web.xml listener -  one using a ServletContext, and one
+without.</p>
+<a name="a23"></a>
+<h3>With a ServletContext</h3><p>This example (with a ServletContext) applicationContext.xml should be
+familiar to any Spring user:</p>
+<pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;!DOCTYPE beans PUBLIC &quot;-//SPRING//DTD BEAN//EN&quot; &quot;http://www.springframework.org/dtd/spring-beans.dtd&quot;&gt;
+
+&lt;beans&gt;
+  &lt;!-- Axis2 Web Service, but to Spring, its just another bean that has dependencies --&gt;
+  &lt;bean id=&quot;springAwareService&quot; class=&quot;spring.SpringAwareService&quot;&gt;
+    &lt;property name=&quot;myBean&quot; ref=&quot;myBean&quot;/&gt;
+  &lt;/bean&gt;
+
+  &lt;!-- just another bean / interface with a wired implementation, that's injected by Spring
+          into the Web Service --&gt;
+   &lt;bean id=&quot;myBean&quot; class=&quot;spring.MyBeanImpl&quot;&gt;
+     &lt;property name=&quot;val&quot; value=&quot;Spring, emerge thyself&quot; /&gt;
+  &lt;/bean&gt;
+&lt;/beans&gt;</pre><p>If the service is running in a Servlet Container, i.e., Axis2 will be able
+to get a hold of the ServletContext, the services.xml for the example would
+be using SpringServletContextObjectSupplier such as:</p>
+<pre> &lt;service name=&quot;SpringAwareService&quot;&gt;
+    &lt;description&gt;
+        simple spring example
+    &lt;/description&gt;
+    &lt;parameter name=&quot;ServiceObjectSupplier&quot;&gt;org.apache.axis2.extensions.spring.receivers.SpringServletContextObjectSupplier&lt;/parameter&gt;
+    &lt;parameter name=&quot;SpringBeanName&quot;&gt;springAwareService&lt;/parameter&gt;
+    &lt;operation name=&quot;getValue&quot;&gt;
+        &lt;messageReceiver class=&quot;org.apache.axis2.receivers.RawXMLINOutMessageReceiver&quot;/&gt;
+    &lt;/operation&gt;
+&lt;/service&gt; </pre><p>While the above example uses RawXMLINOutMessageReceiver as its
+messageReceiver class, all Message Receivers are currently supported, as
+would be any Message Receiver that extends
+org.apache.axis2.receivers.AbstractMessageReceiver .</p>
+<a name="a24"></a>
+<h3>Without a ServletContext</h3><p>In case Axis2 can't get a ServletContext, (i.e., uses a different
+transport or is running Axis2 inside the AAR etc,) you have the option of
+defining a bean that takes advantage of Spring's internal abilities
+(ApplicationContextAware interface, specifically) to provide an Application
+Context to Axis2, with a bean ref 'applicationContext' :</p>
+<pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;!DOCTYPE beans PUBLIC &quot;-//SPRING//DTD BEAN//EN&quot; &quot;http://www.springframework.org/dtd/spring-beans.dtd&quot;&gt;
+
+&lt;beans&gt;
+  &lt;!-- Configure spring to give a hook to axis2 without a ServletContext --&gt;
+  &lt;bean id=&quot;applicationContext&quot; 
+    class=&quot;org.apache.axis2.extensions.spring.receivers.ApplicationContextHolder&quot; /&gt;
+
+  &lt;!-- Axis2 Web Service, but to Spring, its just another bean that has dependencies --&gt;
+  &lt;bean id=&quot;springAwareService&quot;
+        class=&quot;spring.SpringAwareService&quot;&gt;
+    &lt;property name=&quot;myBean&quot; ref=&quot;myBean&quot; /&gt;
+  &lt;/bean&gt;
+
+  &lt;!-- just another bean with a wired implementation, that's injected by Spring 
+          into the Web Service --&gt;
+   &lt;bean id=&quot;myBean&quot;
+        class=&quot;spring.MyBeanImpl&quot;&gt;
+     &lt;property name=&quot;val&quot; value=&quot;Spring, emerge thyself&quot; /&gt;
+  &lt;/bean&gt;
+&lt;/beans&gt;</pre><p>If the service is <strong>not</strong> running in a Servlet Container,
+i.e., Axis2 will not be able to get a hold of ServletContext or you prefer
+not to, the services.xml for the example will be using
+SpringAppContextAwareObjectSupplier such as:</p>
+<pre> &lt;service name=&quot;SpringAwareService&quot;&gt;
+    &lt;description&gt;
+        simple spring example
+    &lt;/description&gt;
+    &lt;parameter name=&quot;ServiceObjectSupplier&quot;&gt;org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier&lt;/parameter&gt;
+    &lt;parameter name=&quot;SpringBeanName&quot;&gt;springAwareService&lt;/parameter&gt;
+    &lt;operation name=&quot;getValue&quot;&gt;
+        &lt;messageReceiver class=&quot;org.apache.axis2.receivers.RawXMLINOutMessageReceiver&quot;/&gt;
+    &lt;/operation&gt;
+&lt;/service&gt; </pre><p>While the above example uses RawXMLINOutMessageReceiver as its
+messageReceiver class, all Message Receivers are currently supported, as
+would be any Message Receiver that extends
+org.apache.axis2.receivers.AbstractMessageReceiver .</p>
+<p>In an environment <strong>without a ServletContext</strong>, one way you
+could load the applicationContext.xml file is in a place that will be run
+once. Upon start-up, execute the following:</p>
+<pre>import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+ public void createSpringAppCtx(ClassLoader cl)
+            throws Exception {
+
+    ClassPathXmlApplicationContext ctx = new
+      ClassPathXmlApplicationContext(new String[] {Constants.MY_PATH +
+      &quot;spring/applicationContext.xml&quot;}, false);
+           ctx.setClassLoader(cl);
+           ctx.refresh();</pre>
+} <a name="a25"></a>
+<h3>Putting It All Together</h3><p>From here, it's just standard Axis2 coding. Only now the service has
+Spring wiring capabilities. The implementation is the same whether using
+either SpringServletContextObjectSupplier or
+SpringAppContextAwareObjectSupplier. The service is as follows:</p>
+<pre>package spring;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.om.OMText;
+
+public class SpringAwareService {
+
+    private MyBean myBean = null;
+
+    //spring 'injects' this implementation
+    public void setMyBean(MyBean myBean) {
+            this.myBean = myBean;
+    }
+
+    // The web service
+    public OMElement getValue(OMElement ignore) {
+            OMFactory factory=
+                OMAbstractFactory.getOMFactory();
+            OMNamespace payloadNs= factory.createOMNamespace(
+                &quot;http://springExample.org/example1&quot;, &quot;example1&quot;);
+            OMElement payload =
+                factory.createOMElement(&quot;string&quot;, payloadNs);
+            OMText response = factory.createOMText(this.myBean.emerge());
+            payload.addChild(response);
+            return payload;
+    }
+} </pre><p>For those who are new to Spring, one of the ideas is that you program an
+Interface, as the implementation is pluggable. This idea is referenced in the
+Spring config file above. Below is the interface:</p>
+<pre>package spring;
+
+/** Interface for Spring aware Bean */
+public interface MyBean {
+         String emerge();
+}</pre><p>Here's the implementation:</p>
+<pre>/** Spring wired implementation */
+public class MyBeanImpl implements MyBean {
+
+    String str = null;
+    // spring 'injects' this value
+    public void setVal(String s) {
+        str = s;
+    }
+    // web service gets this value
+    public String emerge() {
+        return str;
+    }
+}</pre><p>Lastly here's the client - not really necessary for the example, other
+than for completeness:</p>
+<pre>package client;
+
+import java.io.StringWriter;
+
+import javax.xml.stream.XMLOutputFactory;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+
+public class TestClient {
+    private static EndpointReference targetEPR =
+        new EndpointReference(
+               &quot;http://localhost:8080/axis2/services/SpringAwareService&quot;);
+
+    /**
+     * Simple axis2 client.
+     *
+     * @param args Main
+     */
+    public static void main(String[] args) {
+        try {
+            OMFactory factory = OMAbstractFactory.getOMFactory();
+            OMNamespace omNs = factory.createOMNamespace(
+                        &quot;http://springExample.org/example1&quot;, &quot;example1&quot;);
+
+            OMElement method = factory.createOMElement(&quot;getValue&quot;, omNs);
+            OMElement value = factory.createOMElement(&quot;Text&quot;, omNs);
+            value.addChild(factory.createOMText(value, &quot;Some String &quot;));
+            method.addChild(value);
+
+            ServiceClient serviceClient = new ServiceClient();
+
+            Options options = new Options();
+            serviceClient.setOptions(options);
+            options.setTo(targetEPR);
+
+            //Blocking invocation
+            OMElement result = serviceClient.sendReceive(method);
+
+            StringWriter writer = new StringWriter();
+            result.serialize(XMLOutputFactory.newInstance()
+                    .createXMLStreamWriter(writer));
+            writer.flush();
+
+            System.out.println(&quot;Response: &quot; + writer.toString());
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        }
+    }
+} </pre><p>The examples above assume that both the spring framework .jar and the
+axis2-spring-*.jar are under WEB-INF/lib. In such a case, the classes shown
+in this tutorial need to be placed in a JAR under WEB-INF/lib. In this
+example the JAR layout is:</p>
+<div class="source"><pre><pre>./mySpring.jar
+./META-INF
+./META-INF/MANIFEST.MF
+./spring
+./spring/MyBean.class
+./spring/MyBeanImpl.class
+./spring/SpringAwareService.class</pre></pre>
+</div>
+<p>Since all the user classes are in mySpring.jar in this example, the AAR
+merely contains the services.xml file:</p>
+<div class="source"><pre><pre>./springExample.aar
+./META-INF
+./META-INF/MANIFEST.MF
+./META-INF/services.xml</pre></pre>
+</div>
+<p>To run this example, make sure you have the axis2-spring*.jar that comes
+from the axis2-std-*-bin distro in the server side WEB-INF/lib, as well as
+the appropriate Spring jar - most will use the full spring.jar, but the
+minimum requirements are spring-core, spring-beans, spring-context, and
+spring-web. When running the client, you should see this output:</p>
+<pre>Response: &lt;example1:string xmlns:example1=&quot;http://springExample.org/example1&quot; 
+  xmlns:tns=&quot;http://ws.apache.org/axis2&quot;&gt;Spring, emerge thyself&lt;/example1:string&gt;</pre><a name="a26"></a>
+<h3>Spring Inside an AAR</h3><p>Axis2 users frequently want to run Spring inside the AAR. Here we show you
+how it is done. There are four points to be aware of:</p>
+<p>(A) You need to configure Spring to use the Axis2 Service Classloader. See
+the <a href="#263">Known issues running Spring inside the AAR</a>
+ area.</p>
+<p>(B) It's up to you to load Spring, though we give an example below.</p>
+<p>(C) For reasons such as classloader isolation, the
+SpringAppContextAwareObjectSupplier is the best choice.</p>
+<p>(D) The springframework .jar and axis2-spring-*.jar will be placed inside
+the AAR under the lib directory. Please <strong>move</strong> the
+axis2-spring-*.jar from WEB-INF/lib to inside the AAR, as shown below - it
+will <strong>not</strong> work otherwise.</p>
+<ul><li><strong><a name="a261"></a>
+The Spring inside an AAR layout</strong></li>
+</ul>
+<div class="source"><pre><pre>./springExample.aar
+./META-INF
+./META-INF/MANIFEST.MF
+./META-INF/services.xml
+./applicationContext.xml
+./lib
+./lib/axis2-spring-1.4.jar
+./lib/spring.jar
+./spring
+./spring/MyBean.class
+./spring/MyBeanImpl.class
+./spring/SpringAwareService.class
+./spring/SpringInit.class </pre></pre>
+</div>
+<p>As explained in the <a href="#24">Without a ServletContext</a>
+ section,
+the 'Spring inside an AAR' config needs to hook Axis2 and Spring together via
+a Spring bean. Place the following in your Spring config file:</p>
+<pre>  &lt;!-- Configure spring to give a hook to axis2 without a ServletContext --&gt;
+  &lt;bean id=&quot;applicationContext&quot; 
+    class=&quot;org.apache.axis2.extensions.spring.receivers.ApplicationContextHolder&quot; /&gt;</pre><ul><li><strong><a name="a262"></a>
+The Spring inside an AAR init
+  class</strong></li>
+</ul>
+<p>One way to initialize Spring inside the AAR is to use the
+org.apache.axis2.engine.ServiceLifeCycle interface. Here we give an
+example:</p>
+<div class="source"><pre><pre>package spring;
+
+import org.apache.axis2.engine.ServiceLifeCycle;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.description.AxisService;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+public class SpringInit implements ServiceLifeCycle {
+        
+    /**
+     * This will be called during the deployement time of the service. 
+     * irrespective
+     * of the service scope this method will be called
+     */
+    public void startUp(ConfigurationContext ignore, AxisService service) {
+ 
+        try {
+            System.out.println(&quot;Starting spring init&quot;);
+            ClassLoader classLoader = service.getClassLoader();
+            ClassPathXmlApplicationContext appCtx = new
+            ClassPathXmlApplicationContext(new String[] {&quot;applicationContext.xml&quot;}, false);
+                appCtx.setClassLoader(classLoader);
+                appCtx.refresh();
+            System.out.println(&quot;spring loaded&quot;);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        }
+    }
+
+    /**
+     * This will be called during the system shut down time. 
+     * irrespective
+     * of the service scope this method will be called
+     */
+    public void shutDown(ConfigurationContext ctxIgnore, AxisService ignore) {
+    }
+}</pre></pre>
+</div>
+<p>Here's the services.xml that now includes SpringInit and the
+SpringAwareService shown above. There is also the composite parameter which
+is needed when loading Spring in the AAR - see the <a href="#263">Known
+issues running Spring inside the AAR</a>
+ area.</p>
+<div class="source"><pre><pre>&lt;serviceGroup&gt;
+  &lt;!-- Invoke SpringInit on server startup and shutdown --&gt;
+  &lt;service name=&quot;SpringAwareService&quot; class=&quot;spring.SpringInit&quot;&gt;
+    &lt;description&gt;
+         simple spring example - inside the AAR
+    &lt;/description&gt;
+    &lt;!-- need the TCCL param when using spring inside the AAR --&gt;
+    &lt;parameter name=&quot;ServiceTCCL&quot;&gt;composite&lt;/parameter&gt;
+    &lt;parameter name=&quot;ServiceObjectSupplier&quot;&gt;org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier&lt;/parameter&gt;
+    &lt;parameter name=&quot;SpringBeanName&quot;&gt;springAwareService&lt;/parameter&gt;
+    &lt;operation name=&quot;getValue&quot;&gt;
+        &lt;messageReceiver class=&quot;org.apache.axis2.receivers.RawXMLINOutMessageReceiver&quot;/&gt;
+    &lt;/operation&gt;
+  &lt;/service&gt;
+&lt;/serviceGroup&gt;</pre></pre>
+</div>
+<ul><li><strong><a name="a263"></a>
+Known issues running Spring inside the
+    AAR</strong></li>
+</ul>
+<p>By default, the Axis2 classloader strategy does not permit Spring to run
+inside the AAR. To allow Spring to run inside the AAR, the 'composite'
+parameter is used in the services.xml as shown in the example above. There
+was default behavior of 'composite' in the development cycle in between 1.0
+and 1.1, but it resulted in the JIRA issue AXIS2-1214 -problems with getting
+an initContext.lookup() handle inside the AAR. Spring users typically have
+little desire to use initContext.lookup(), as they get their Datasources via
+org.springframework.jdbc.datasource.DriverManagerDataSource in an XML file or
+with annotations. For EJB home references and the like, Spring provides
+JndiObjectFactoryBean. </p>
+<p>A common requirement is to run Hibernate along with Spring with Axis2 web services.
+It is easier to run Hibernate as well as Spring outside the AAR as shown in the 
+ServletContext example, ie, place the Spring and Hibernate jars in WEB-INF/lib and 
+the hibernate config files under WEB-INF/classes. With that advisement, Spring provides
+an API that allows Spring to load Hibernate under the contraints of an AAR. </p>
+<p>Hibernate by default looks for its config files in the classpath. By running Hibernate
+inside the AAR, Hibernate won't be able to find its config files. The way to get 
+around this limitation is either to expand the AAR or place the hibernate config
+files in a specific directory under WEB-INF/classes - and then use 
+<a class="externalLink" href="http://www.springframework.org/docs/api/org/springframework/orm/hibernate/LocalSessionFactoryBean.html#setMappingDirectoryLocations(org.springframework.core.io.Resource[])">Spring's setMappingDirectoryLocations</a>
+ for several options.  </p>
+<p>By placing Spring into DEBUG mode you can look at the logs to see where Spring will look
+for your jar / class locations. Use the wildcards in the following example to list your mapping 
+locations as shown:  </p>
+<div class="source"><pre><pre>&lt;bean id=&quot;mySessionFactory&quot; class=&quot;org.springframework.orm.hibernate3.LocalSessionFactoryBean&quot;&gt;
+                &lt;property name=&quot;mappingLocations&quot;&gt;
+                   &lt;value&gt;classpath*:**/MyEntity.hbm.xml&lt;/value&gt;
+                &lt;/property&gt;
+                ...
+&lt;/bean&gt; </pre></pre>
+</div>
+</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/src/Axis2SampleDocLitServiceCode.html
URL: http://svn.apache.org/viewvc/webservices/axis2/site/1_4/src/Axis2SampleDocLitServiceCode.html?rev=652665&view=auto
==============================================================================
--- webservices/axis2/site/1_4/src/Axis2SampleDocLitServiceCode.html (added)
+++ webservices/axis2/site/1_4/src/Axis2SampleDocLitServiceCode.html Thu May  1 14:20:27 2008
@@ -0,0 +1,453 @@
+<!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>Maven - </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-05-01
+                      </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/contents.html">Version 1.4</a>
+                  <ul>
+                  
+    <li class="none">
+                    <a href="../../1_4/toc.html">Table of Contents</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../../1_4/installationguide.html">Installation Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../../1_4/quickstartguide.html">QuickStart Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../../1_4/userguide.html">User Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../../1_4/jaxws-guide.html">JAXWS Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../../1_4/pojoguide.html">POJO Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../../1_4/spring.html">Spring Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../../1_4/webadminguide.html">Web Administrator's Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../../1_4/migration.html">Migration Guide (from Axis1)</a>
+          </li>
+              </ul>
+        </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/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><h1>Code Listing For Axis2SampleDocLitService Service</h1><h2>Server:</h2><h3>echoString</h3><p>Locate the following code segment in &quot;Axis2SampleDocLitServiceSkeleton.java&quot;.<br />
+</p>
+<div class="source"><pre><pre>public org.apache.axis2.userguide.xsd.EchoStringReturnDocument 
+        echoString(org.apache.axis2.userguide.xsd.EchoStringParamDocument param4 ){
+        //Todo: fill this with the necessary business logic
+        throw new  java.lang.UnsupportedOperationException();
+   }
+</pre></pre>
+</div>
+<p>Then complete the code by adding the business logic as shown below:</p>
+<div class="source"><pre><pre>public org.apache.axis2.userguide.xsd.EchoStringReturnDocument 
+       echoString(org.apache.axis2.userguide.xsd.EchoStringParamDocument param4) throws Exception {
+       //Use the factory to create the output document
+       org.apache.axis2.userguide.xsd.EchoStringReturnDocument retDoc = 
+           org.apache.axis2.userguide.xsd.EchoStringReturnDocument.Factory.newInstance();
+      //send the string back.
+      retDoc.setEchoStringReturn(param4.getEchoStringParam());
+      return retDoc;
+  }</pre></pre>
+</div>
+<h3>echoStringArray</h3><p>The code segment for echoStringArray is shown below:</p>
+<div class="source"><pre><pre>public org.apache.axis2.userguide.xsd.EchoStringArrayReturnDocument 
+      echoStringArray(org.apache.axis2.userguide.xsd.EchoStringArrayParamDocument param0) throws Exception {
+      //Use the factory to create the output document.
+     org.apache.axis2.userguide.xsd.EchoStringArrayReturnDocument retDoc = 
+     org.apache.axis2.userguide.xsd.EchoStringArrayReturnDocument.Factory.newInstance();
+     //Get the String array from the input parameters.
+     String[] inParams = param0.getEchoStringArrayParam().getStringArray();
+     org.apache.axis2.userguide.xsd.ArrayOfstringLiteral retParams =
+            org.apache.axis2.userguide.xsd.ArrayOfstringLiteral.Factory.newInstance();
+     //Set the input parameters to the output parameters for echoing.
+     for (int i = 0; i &lt; inParams.length; i++) {
+         retParams.addString(inParams[i]);<br />
+     }
+     //return the output document.
+    retDoc.setEchoStringArrayReturn(retParams);
+    return retDoc;
+   }</pre></pre>
+</div>
+<h3>echoStruct</h3><p>The code segment for echoStruct is shown below:</p>
+<div class="source"><pre><pre>
+  public org.apache.axis2.userguide.xsd.EchoStructReturnDocument 
+        echoStruct(org.apache.axis2.userguide.xsd.EchoStructParamDocument param2) throws Exception {
+        //Use the factory to create the output document.
+        org.apache.axis2.userguide.xsd.EchoStructReturnDocument retDoc =
+        org.apache.axis2.userguide.xsd.EchoStructReturnDocument.Factory.newInstance();
+        //Get the SOAPStrcut from the incoming parameters
+        org.apache.axis2.userguide.xsd.SOAPStruct inStruct = param2.getEchoStructParam();
+        //Struct for the sending back
+        org.apache.axis2.userguide.xsd.SOAPStruct outStruct =
+                org.apache.axis2.userguide.xsd.SOAPStruct.Factory.newInstance();
+        //Fill the outgoing struct
+        outStruct.setVarFloat(inStruct.getVarFloat());
+        outStruct.setVarInt(inStruct.getVarInt());
+        outStruct.setVarString(inStruct.getVarString());
+        //Set the outgoing document.
+        retDoc.setEchoStructReturn(outStruct);
+        return retDoc;
+    }
+</pre></pre>
+</div>
+<h2>Client:</h2><h3>Client for echoString Operation</h3><p>The following code fragment shows the necessary code for utilizing the
+echoString operation of the Axis2SampleDocLitService that we have already
+deployed. The code is very simple to understand and the explanations are in
+the form of comments.</p>
+<div class="source"><pre><pre>     try {
+                      org.apache.axis2.userguide.Axis2SampleDocLitServiceStub stub 
+                        = new org.apache.axis2.userguide.Axis2SampleDocLitServiceStub(null,
+                           &quot;http://localhost:8080/axis2/services/Axis2SampleDocLitService&quot;);
+                      //Create the request document to be sent.
+                      org.apache.axis2.userguide.xsd.EchoStringParamDocument reqDoc =
+                          org.apache.axis2.userguide.xsd.EchoStringParamDocument.Factory.newInstance();
+                      reqDoc.setEchoStringParam(&quot;Axis2 Echo&quot;);
+                      //invokes the Web service.
+                      org.apache.axis2.userguide.xsd.EchoStringReturnDocument resDoc = 
+                                        stub.echoString(reqDoc);
+                      System.out.println(resDoc.getEchoStringReturn());
+                      } catch (java.rmi.RemoteException e) {
+                       e.printStackTrace();
+                      }
+</pre></pre>
+</div>
+<p>Similarly the following code fragments show client side code for
+echoStringArray operation and echoStruct operation respectively.</p>
+<h3>Client for echoStringArray Operation</h3><div class="source"><pre><pre>      try {
+                       //Create the stub by passing the AXIS_HOME and target EPR.
+                       //We pass null to the AXIS_HOME and hence the stub will use the current directory as the AXIS_HOME
+                       org.apache.axis2.userguide.Axis2SampleDocLitServiceStub stub = 
+                                    new org.apache.axis2.userguide.Axis2SampleDocLitServiceStub(null,
+                                    &quot;http://localhost:8080/axis2/services/Axis2SampleDocLitService&quot;);
+                       //Create the request document to be sent.
+                       org.apache.axis2.userguide.xsd.EchoStringArrayParamDocument reqDoc = 
+                          org.apache.axis2.userguide.xsd.EchoStringArrayParamDocument.Factory.newInstance();
+                      org.apache.axis2.userguide.xsd.ArrayOfstringLiteral paramArray = 
+                           org.apache.axis2.userguide.xsd.ArrayOfstringLiteral.Factory.newInstance();
+                      paramArray.addString(&quot;Axis2&quot;);
+                      paramArray.addString(&quot;Echo&quot;);
+                      reqDoc.setEchoStringArrayParam(paramArray);
+                      org.apache.axis2.userguide.xsd.EchoStringArrayReturnDocument resDoc = 
+                      stub.echoStringArray(reqDoc); 
+                      //Get the response params
+                      String[] resParams = resDoc.getEchoStringArrayReturn().getStringArray();
+                      for (int i = 0; i &lt; resParams.length; i++) {
+                          System.out.println(resParams[i]);
+                      }
+                    } catch (java.rmi.RemoteException e) {
+                       e.printStackTrace(); 
+                    }
+               </pre></pre>
+</div>
+<h3>Client for echoStruct Operation</h3><div class="source"><pre><pre>try {
+                //Create the stub by passing the AXIS_HOME and target EPR.
+                //We pass null to the AXIS_HOME and hence the stub will use the current directory as the AXIS_HOME
+                org.apache.axis2.userguide.Axis2SampleDocLitServiceStub stub =
+                        new org.apache.axis2.userguide.Axis2SampleDocLitServiceStub(null,
+                        &quot;http://localhost:8080/axis2/services/Axis2SampleDocLitService&quot;);
+                          //Create the request Document
+                        org.apache.axis2.userguide.xsd.EchoStructParamDocument reqDoc =
+                          org.apache.axis2.userguide.xsd.EchoStructParamDocument.Factory.newInstance();
+                         //Create the complex type
+                        org.apache.axis2.userguide.xsd.SOAPStruct reqStruct =
+                        org.apache.axis2.userguide.xsd.SOAPStruct.Factory.newInstance();
+                        reqStruct.setVarFloat(100.50F);
+                        reqStruct.setVarInt(10);
+                        reqStruct.setVarString(&quot;High&quot;);
+                        reqDoc.setEchoStructParam(reqStruct);
+                        //Service invocation
+                        org.apache.axis2.userguide.xsd.EchoStructReturnDocument resDoc = 
+                         stub.echoStruct(reqDoc);
+                       org.apache.axis2.userguide.xsd.SOAPStruct resStruct = 
+                          resDoc.getEchoStructReturn();
+                       System.out.println(&quot;floot Value :&quot; + resStruct.getVarFloat());
+                       System.out.println(&quot;int Value :&quot; + resStruct.getVarInt());
+                       System.out.println(&quot;String Value :&quot; + resStruct.getVarString());
+                     } catch (java.rmi.RemoteException e) {
+                        e.printStackTrace();
+                    }
+</pre></pre>
+</div>
+</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/tcp-transport.html
URL: http://svn.apache.org/viewvc/webservices/axis2/site/1_4/tcp-transport.html?rev=652665&view=auto
==============================================================================
--- webservices/axis2/site/1_4/tcp-transport.html (added)
+++ webservices/axis2/site/1_4/tcp-transport.html Thu May  1 14:20:27 2008
@@ -0,0 +1,409 @@
+<!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>Maven - </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-05-01
+                      </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/contents.html">Version 1.4</a>
+                  <ul>
+                  
+    <li class="none">
+                    <a href="../1_4/toc.html">Table of Contents</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4/installationguide.html">Installation Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4/quickstartguide.html">QuickStart Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4/userguide.html">User Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4/jaxws-guide.html">JAXWS Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4/pojoguide.html">POJO Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4/spring.html">Spring Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4/webadminguide.html">Web Administrator's Guide</a>
+          </li>
+                  
+    <li class="none">
+                    <a href="../1_4/migration.html">Migration Guide (from Axis1)</a>
+          </li>
+              </ul>
+        </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/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="">TCP transport<link href="../css/axis-docs.css" rel="stylesheet" type="text/css" media="all"></head><h1>TCP Transport</h1>
+This document explains how to send and receive SOAP messages via TCP in Axis2.
+
+<p><i>Send your feedback or questions to: <a class="externalLink" href="mailto:axis-dev@ws.apache.org?subject=[Axis2]">axis-dev@ws.apache.org</a>
+</i>
+.
+Prefix subject with [Axis2]. Subscription details are available on the <a class="externalLink" href="http://ws.apache.org/axis2/mail-lists.html">Axis2 site</a>
+.
+</p>
+<h2>Content</h2><ul><li><a href="#intro">Introduction</a>
+</li>
+<li><a href="#start">How to Start the TCPServer</a>
+</li>
+<li><a href="#send">How to Send SOAP Messages Using TCP Transport</a>
+</li>
+<li><a href="#samples">Samples</a>
+</li>
+<li><a href="#components">Transport Components</a>
+</li>
+</ul>
+<a name="intro"></a>
+<h2>Introduction</h2><p>Axis2 supports TCP as a transport. It supports both sending and receiving SOAP
+messages via TCP. A TCP transport does not have any application level headers
+and the SOAP message that is sent should be self-contained. This makes the
+interaction fast and simple. However, since there are no application headers,
+it does not have the privilege of having a request URI, and Service
+dispatching should be done by an alternative method. Thus,
+RequestURIBasedDispatcher cannot be used. The following are the two main
+alternatives available for dispatching in the Axis2 environment:</p>
+<ol type="1"><li>Use the name space URI of the first child element of SOAPBody.
+    (SOAPMessageBodyBasedDispatcher).</li>
+<li>Enable WS-Addressing. In the case of version 1.1 and 1.1.1 releases
+    Addressing is default (SOAPActionBasedDispatcher).</li>
+</ol>
+<p>When the TCP request is sent, it is the user's responsibility to use
+either Addressing or the SOAP body base mechanism.</p>
+<a name="start"></a>
+<h2>How to Start the TCPServer</h2><p>The TCP server can be started by running the class
+org.apache.axis2.transport.tcp.TCPServer with two parameters - <a href="../faq.html#c5">repository</a>
+ and port number, as arguments. This
+class needs all the Axis dependency JARs in the classpath. New services can
+be added in the usual way by dropping the archives to the repository (See <a href="adv-userguide.html">Advanced User's Guide</a>
+ for more information)</p>
+<a name="send"></a>
+<h2>How to Send SOAP Messages Using TCP Transport</h2><p>TCP transport can be enabled easily from the call API. The following code
+segment demonstrates how this can be done.</p>
+<div class="source"><pre><pre>OMElement payload = ...
+ServiceClient serviceClient = new ServiceClient();
+Options options = new Options();
+options.setTo(targetEPR);
+
+
+
+
+serviceClient.setOptions(options);
+
+OMElement response = serviceClient.sendReceive(payload);</pre></pre>
+</div>
+<p>The transport that should be invoked is inferred from the targetEPR
+(tcp://...). In this case it is TCP and the listener is also TCP. The SOAP
+message has to be self contained in order to use Addressing. The other option
+is to use the URI of the first child of the SOAP Body to dispatch the
+service. The parameter is of the type <a href="../faq.html#a2">OMElement</a>
+,
+the XML representation of Axis2.</p>
+<a name="samples"></a>
+<h2>Samples</h2><p>A sample for a TCP Client can be found from the
+samples/userguide/src/userguide/clients/TCPClient.java in the binary
+distribution. This accesses the same Web service explained in the <a href="adv-userguide.html">Axis2 Advanced User's Guide</a>
+. The client first
+starts the TCPServer with the same repository used for the <a href="adv-userguide.html">Axis2 Advanced User's Guide</a>
+ samples. Since the
+sample is already deployed in the repository, as per the userguide, it will
+be automatically available.</p>
+<p>In order to run the TCPClient.java, addressing should be engaged both in
+the client and server sides. On the client side, you can engage addressing by
+copying the addressing-1.4.mar (AXIS2_HOME/repository/module) to
+AXIS2_HOME/lib directory.</p>
+<a name="components"></a>
+<h2>Transport Components</h2><p>The Axis2 TCP transport has two components, a transport Listener for
+receiving the messages and a transport Sender to send the SOAP Messages. The
+Axis2 installation has both the components built into itself by default. In
+the axis2.xml configuration file, the two TCP transport components can be 
+configured as shown below.</p>
+<p>The following XML lines initialize the TCPTransport Receiver:</p>
+<div class="source"><pre><pre>&lt;transportReceiver name=&quot;tcp&quot; class=&quot;org.apache.axis2.transport.tcp.TCPServer&quot;&gt;
+    &lt;parameter name=&quot;port&quot;&gt;6060&lt;/parameter&gt;
+&lt;/transportReceiver&gt;</pre></pre>
+</div>
+<p>The following XML lines add the TCPTransport Sender:</p>
+<div class="source"><pre><pre>&lt;transportSender name=&quot;tcp&quot; class=&quot;org.apache.axis2.transport.tcp.TCPTransportSender&quot;/&gt;</pre></pre>
+</div>
+<p>Note: If the TCP server is started manually, this configuration does not take
+effect. In return, this affects the transport Listener's start by Axis2.
+(e.g. Listener started by the Complete Async interaction)</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>



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org