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 de...@apache.org on 2007/08/13 12:13:23 UTC

svn commit: r565295 [10/14] - in /webservices/axis2/site/1_3: ./ adb/ jibx/ src/

Added: webservices/axis2/site/1_3/reference.html
URL: http://svn.apache.org/viewvc/webservices/axis2/site/1_3/reference.html?view=auto&rev=565295
==============================================================================
--- webservices/axis2/site/1_3/reference.html (added)
+++ webservices/axis2/site/1_3/reference.html Mon Aug 13 03:13:18 2007
@@ -0,0 +1,383 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+
+
+
+
+
+
+
+
+<html>
+  <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="http://ws.apache.org/axis2/images/axis.jpg" alt="" />
+    
+            </span>
+            <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="breadcrumbs">
+          
+  
+
+  
+    
+  
+  
+            <div class="xleft">
+        Last Published: 08/13/2007
+                      </div>
+            <div class="xright">      <a href="../index.html">Axis2/Java</a>
+          |
+          <a href="http://ws.apache.org/axis2/c">Axis2/C</a>
+          |
+          <a href="../../../">Apache WS</a>
+          |
+          <a href="http://www.apache.org">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_3/contents.html">Version 1.3</a>
+                <ul>
+                  
+    <li class="none">
+              <a href="../1_3/toc.html">Table of Contents</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../1_3/installationguide.html">Installation Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../1_3/quickstartguide.html">QuickStart Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../1_3/userguide.html">User Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../1_3/pojoguide.html">POJO Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../1_3/spring.html">Spring Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../1_3/webadminguide.html">Web Administrator's Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../1_3/migration.html">Migration Guide (from Axis1)</a>
+        </li>
+              </ul>
+        </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/">Wiki</a>
+        </li>
+              
+    <li class="none">
+              <a href="../refLib.html">Reference Library</a>
+        </li>
+              
+    <li class="none">
+              <a href="http://ws.apache.org/axis2/1_3/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">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">License</a>
+        </li>
+          </ul>
+                                       <a href="http://maven.apache.org/" title="Built by Maven" id="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>
+<meta http-equiv="content-type" content=""></meta>
+Axis2 Reference Guide
+<link href="../css/axis-docs.css" rel="stylesheet" type="text/css" media="all"></link>
+</head>
+
+<a name="_Toc96697849"></a>
+<h1 align="center">Axis2 Reference Guide</h1>
+<a name="wsdl2code"></a>
+<h2>WSDL2Java Reference</h2>
+<pre>
+NAME
+       wsdl2java.sh or wsdl2java.bat - Generates java code according to a given WSDL file to handle Web service invocation.
+       These scripts can be found under the bin directory of the Axis2 distribution.
+
+SYNOPSIS
+       wsdl2java.sh [OPTION]... -uri &lt;Location of WSDL&gt;
+
+DESCRIPTION
+       Given a WSDL file, this generates java code to handle Web service invocations.
+
+        -o &lt;output Location&gt; : output file location
+        -a : Generate async style code only. Default is off
+        -s : Generate sync style code only. Default is off. takes precedence over -a
+        -p &lt;package name&gt; : set custom package name
+        -l &lt;language&gt; : valid languages are java and c. Default is java
+        -t : Generate TestCase to test the generated code
+        -ss : Generate server side code (i.e. skeletons). Default is off
+        -sd : Generate service descriptor (i.e. services.xml). Default is off. Valid with -ss
+        -d &lt;databinding&gt; : valid databinding(s) are adb, xmlbeans and jaxme. Default is adb
+        -g : Generates all the classes. valid only with the -ss (This will generate client and server codes)
+        -pn &lt;port_name&gt; : name of port in the presence of multiple ports
+        -sn &lt;service_name&gt; : name of service in the presence of multiple services
+        -u : unpacks the databinding classes
+        -r &lt;repository_path&gt; : path of the repository against which code is generated
+        -ns2p ns1=pkg1,ns2=pkg2 : Specify a custom package name for each namespace specified in the wsdl's schema
+        -ssi : Generate an interface for the service implementation (Default: off)
+        -em : Specify an external mapping file
+        -wv : WSDL Version. Valid Options : 2, 2.0, 1.1
+        -f : Generate the source output folder without the src directory
+        -uw : Switch on un-wrapping.
+        -S &lt;folder name&gt; : Generated source folder name. (Default: src)
+        -R &lt;folder name&gt; : Generated resources folder name. (Default: resources)
+        
+EXAMPLES
+       wsdl2java.sh -uri ../samples/wsdl/Axis2SampleDocLit.wsdl
+       wsdl2java.sh -uri ../samples/wsdl/Axis2SampleDocLit.wsdl -ss -sd 
+       wsdl2java.sh -uri ../samples/wsdl/Axis2SampleDocLit.wsdl -ss -sd -d xmlbeans -o ../samples -p org.apache.axis2.userguide
+</pre>
+<a name="wsdl2java"></a>
+<h2>Java2WSDL Reference</h2>
+<pre>
+NAME
+       Java2WSDL.sh or Java2WSDL.bat - Generates the appropriate WSDL file for a given java class.
+       These scripts can be found under the bin directory of the Axis2 distribution.
+
+SYNOPSIS
+       Java2WSDL.sh [OPTION]... -cn &lt;fully qualified class name&gt;
+
+DESCRIPTION
+       Given a java class generates a WSDL file for the given java class. 
+
+       -o &lt;output Location&gt; : output file location
+       -cp &lt;class path uri&gt; : list of classpath entries - (urls)
+       -tn &lt;target namespace&gt; : target namespace
+       -tp &lt;target namespace prefix&gt; : target namespace prefix
+       -stn &lt;schema target namespace&gt; : target namespace for schema
+       -stp &lt;schema target namespace prefix&gt; : target namespace prefix for schema
+       -sn &lt;service name&gt; : service name
+       -of &lt;output file name&gt; : output file name for the WSDL
+       -st &lt;binding style&gt; : style for the WSDL
+       -u &lt;binding use&gt; : use for the WSDL
+       -l &lt;soap address&gt; : address of the port for the WSDL
+       -efd &lt;qualified/unqualified&gt; : Setting for elementFormDefault (defaults to qualified)
+       -afd &lt;qualified/unqualified&gt; : Setting for attributeFormDefault (defaults to qualified)
+       -xc &lt;extra class&gt; : Extra class for which schematype must be generated.  Use as : -xc class1 -xc class2 ...
+EXAMPLES
+       Java2WSDL.sh -cn ../samples/test/searchTool.Search
+       Java2WSDL.sh -cn ../samples/test/searchTool.Search -sn search
+       Java2WSDL.sh -cn ../samples/test/searchTool.Search -u -sn search
+       Java2WSDL.sh -cn ../samples/test/searchTool.Search -sn search -o ../samples/test/wsdl  
+</pre>
+
+</html>
+      </div>
+    </div>
+    <div class="clear">
+      <hr/>
+    </div>
+    <div id="footer">
+      <div class="xright">&#169;  
+          2004-2007
+    
+          Apache Software Foundation
+          
+  
+
+  
+    
+  
+  
+  </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+  </body>
+</html>

Added: webservices/axis2/site/1_3/rest-ws.html
URL: http://svn.apache.org/viewvc/webservices/axis2/site/1_3/rest-ws.html?view=auto&rev=565295
==============================================================================
--- webservices/axis2/site/1_3/rest-ws.html (added)
+++ webservices/axis2/site/1_3/rest-ws.html Mon Aug 13 03:13:18 2007
@@ -0,0 +1,448 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+
+
+
+
+
+
+
+
+<html>
+  <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="http://ws.apache.org/axis2/images/axis.jpg" alt="" />
+    
+            </span>
+            <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="breadcrumbs">
+          
+  
+
+  
+    
+  
+  
+            <div class="xleft">
+        Last Published: 08/13/2007
+                      </div>
+            <div class="xright">      <a href="../index.html">Axis2/Java</a>
+          |
+          <a href="http://ws.apache.org/axis2/c">Axis2/C</a>
+          |
+          <a href="../../../">Apache WS</a>
+          |
+          <a href="http://www.apache.org">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_3/contents.html">Version 1.3</a>
+                <ul>
+                  
+    <li class="none">
+              <a href="../1_3/toc.html">Table of Contents</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../1_3/installationguide.html">Installation Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../1_3/quickstartguide.html">QuickStart Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../1_3/userguide.html">User Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../1_3/pojoguide.html">POJO Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../1_3/spring.html">Spring Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../1_3/webadminguide.html">Web Administrator's Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../1_3/migration.html">Migration Guide (from Axis1)</a>
+        </li>
+              </ul>
+        </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/">Wiki</a>
+        </li>
+              
+    <li class="none">
+              <a href="../refLib.html">Reference Library</a>
+        </li>
+              
+    <li class="none">
+              <a href="http://ws.apache.org/axis2/1_3/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">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">License</a>
+        </li>
+          </ul>
+                                       <a href="http://maven.apache.org/" title="Built by Maven" id="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=""></meta>
+  RESTful Web Services Support
+  <link href="../css/axis-docs.css" rel="stylesheet" type="text/css" media="all"></link>
+</head>
+
+
+<h1>RESTful Web Services Support</h1>
+
+<p>This document presents an introduction on REST and REST with HTTP POST and
+GET.</p>
+
+<h2>Content</h2>
+<ul>
+  <li><a href="#intro">Introduction</a></li>
+  <li><a href="#rest_with_post">Doing REST Web Services with HTTP POST</a>
+    <ul>
+      <li><a href="#sample">Sample REST - HTTP POST Client</a></li>
+    </ul>
+  </li>
+  <li><a href="#rest_with_get">Access a REST Web Service via HTTP GET</a></li>
+</ul>
+<a name="intro"></a>
+
+<h2>Introduction</h2>
+
+WSDL 2.0 HTTP Binding defines a way to implement REST (Representational
+State Transfer) with Web services. Axis2 implements the most defined HTTP
+binding specification. REST Web services are a reduced subset of the usual
+Web service stack.
+
+The Axis2 REST implementation assumes the following properties:
+<ol type="1">
+  <li>REST Web services are Synchronous and Request Response in nature.</li>
+  <li>When REST Web services are accessed via GET, the service and the
+    operations are identified based on the URL. The parameters are assumed as
+    parameters of the Web service. In this case, the GET based REST Web
+    services support only simple types as arguments and it should adhere to
+    the <a href="http://www.w3.org/TR/2006/CR-wsdl20-adjuncts-20060327/#_operation_iri_style">IRI
+    style</a>.</li>
+  <li>POST based Web services do not need a SOAP Envelope or a SOAP Body.
+    REST Web Services do not have Headers and the payload is sent
+  directly.</li>
+</ol>
+
+Axis2 can be configured as a REST Container and can be used to send and
+receive RESTful Web service requests and responses. REST Web services can be
+accessed using HTTP GET and POST.
+<a name="rest_with_post"></a>
+
+<h2>REST Web Services with HTTP POST</h2>
+
+If REST is enabled, the Axis2 server will act as both a REST endpoint and
+a SOAP endpoint. When a message is received, if the content type is text/xml
+and if the SOAPAction Header is missing, then the message is treated as a
+RESTful Message, if not it is treated as a usual SOAP Message.
+
+On sending a message, whether the message is RESTful or not, can be
+decided from the client API.<br></br>
+Set a property in the client API.<br></br>
+
+<pre>...
+Options options = new Options();
+options.setProperty(Constants.Configuration.ENABLE_REST, Constants.VALUE_TRUE);
+...</pre>
+<a name="sample"></a>
+
+<h3>Sample REST - HTTP POST Client</h3>
+
+There is an example named, userguide.clients.RESTClient.java found in
+AXIS2_HOME/samples/userguide/src/userguide/clients which demonstrates the
+usage of the above. It uses the &quot;echo&quot; operation of the
+<code>userguide.example1.MyService </code>of the
+AXIS2_HOME/samples/userguide/src/userguide/example1.
+
+The class source will be as follows:<div class="source"><pre>
+<pre>public class RESTClient {
+
+    private static String toEpr = &quot;http://localhost:8080/axis2/services/MyService&quot;;
+    
+    public static void main(String[] args) throws AxisFault {
+
+        Options options = new Options();
+        options.setTo(new EndpointReference(toEpr));
+        
+        options.setProperty(Constants.Configuration.ENABLE_REST, Constants.VALUE_TRUE);
+
+        ServiceClient sender = new ServiceClient();
+        sender.engageModule(new QName(Constants.MODULE_ADDRESSING));
+        sender.setOptions(options);
+        OMElement result = sender.sendReceive(getPayload());
+
+        try {
+            XMLStreamWriter writer = XMLOutputFactory.newInstance()
+                    .createXMLStreamWriter(System.out);
+            result.serialize(writer);
+            writer.flush();
+        } catch (XMLStreamException e) {
+            e.printStackTrace();
+        } catch (FactoryConfigurationError e) {
+            e.printStackTrace();
+        }
+    }
+    private static OMElement getPayload() {
+        OMFactory fac = OMAbstractFactory.getOMFactory();
+        OMNamespace omNs = fac.createOMNamespace(
+                &quot;http://example1.org/example1&quot;, &quot;example1&quot;);
+        OMElement method = fac.createOMElement(&quot;echo&quot;, omNs);
+        OMElement value = fac.createOMElement(&quot;Text&quot;, omNs);
+        value.addChild(fac.createOMText(value, &quot;Axis2 Echo String &quot;));
+        method.addChild(value);
+
+        return method;
+    }
+}</pre>
+</pre></div><a name="rest_with_get"></a>
+
+<h2>Access a REST Web Service via HTTP GET</h2>
+
+<p>Axis2 allows users to access Web services that have simple type parameters
+via HTTP GET. For example, the following URL requests the Version Service via
+HTTP GET. However, the Web service arriving via GET assumes REST. Other
+parameters are converted into XML and put into the SOAP body.</p>
+<div class="source"><pre><pre>http://127.0.0.1:8080/axis2/services/Version/getVersion</pre>
+</pre></div>
+<p>The result can be shown in the browser as follows:</p>
+<img src="./images/userguide/http-get-ws.jpg"></img>
+
+<p>For example, the following request,</p>
+<div class="source"><pre><pre>http://127.0.0.1:8080/axis2/services/Version/getVersion</pre>
+</pre></div>will be converted into the following SOAP message for processing by
+Axis2.<div class="source"><pre>
+<pre> 
+   &lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
+      &lt;soapenv:Body&gt;   
+          &lt;axis2:getVersion xmlns:axis2=&quot;http://ws.apache.org/goGetWithREST&quot; /&gt;
+      &lt;/soapenv:Body&gt;
+   &lt;/soapenv:Envelope&gt;
+    </pre>
+</pre></div>
+<h2>Resources</h2>
+
+<p>How I Explained REST to My Wife, By Ryan Tomayko- <a href="http://naeblis.cx/articles/2004/12/12/rest-to-my-wife">http://naeblis.cx/articles/2004/12/12/rest-to-my-wife</a></p>
+
+<p>Building Web Services the REST Way, By Roger L. Costello- <a href="http://www.xfront.com/REST-Web-Services.html">
+http://www.xfront.com/REST-Web-Services.html</a></p>
+
+<p>Resource-oriented vs. activity-oriented Web services, By James Snell- <a href="http://www-128.ibm.com/developerworks/webservices/library/ws-restvsoap/">http://www-128.ibm.com/developerworks/webservices/library/ws-restvsoap/</a></p>
+
+</html>
+      </div>
+    </div>
+    <div class="clear">
+      <hr/>
+    </div>
+    <div id="footer">
+      <div class="xright">&#169;  
+          2004-2007
+    
+          Apache Software Foundation
+          
+  
+
+  
+    
+  
+  
+  </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+  </body>
+</html>

Added: webservices/axis2/site/1_3/soapmonitor-module.html
URL: http://svn.apache.org/viewvc/webservices/axis2/site/1_3/soapmonitor-module.html?view=auto&rev=565295
==============================================================================
--- webservices/axis2/site/1_3/soapmonitor-module.html (added)
+++ webservices/axis2/site/1_3/soapmonitor-module.html Mon Aug 13 03:13:18 2007
@@ -0,0 +1,438 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+
+
+
+
+
+
+
+
+<html>
+  <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="http://ws.apache.org/axis2/images/axis.jpg" alt="" />
+    
+            </span>
+            <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="breadcrumbs">
+          
+  
+
+  
+    
+  
+  
+            <div class="xleft">
+        Last Published: 08/13/2007
+                      </div>
+            <div class="xright">      <a href="../index.html">Axis2/Java</a>
+          |
+          <a href="http://ws.apache.org/axis2/c">Axis2/C</a>
+          |
+          <a href="../../../">Apache WS</a>
+          |
+          <a href="http://www.apache.org">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_3/contents.html">Version 1.3</a>
+                <ul>
+                  
+    <li class="none">
+              <a href="../1_3/toc.html">Table of Contents</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../1_3/installationguide.html">Installation Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../1_3/quickstartguide.html">QuickStart Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../1_3/userguide.html">User Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../1_3/pojoguide.html">POJO Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../1_3/spring.html">Spring Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../1_3/webadminguide.html">Web Administrator's Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../1_3/migration.html">Migration Guide (from Axis1)</a>
+        </li>
+              </ul>
+        </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/">Wiki</a>
+        </li>
+              
+    <li class="none">
+              <a href="../refLib.html">Reference Library</a>
+        </li>
+              
+    <li class="none">
+              <a href="http://ws.apache.org/axis2/1_3/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">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">License</a>
+        </li>
+          </ul>
+                                       <a href="http://maven.apache.org/" title="Built by Maven" id="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=""></meta>
+  The SOAP Monitor Module
+  <link href="../css/axis-docs.css" rel="stylesheet" type="text/css" media="all"></link>
+</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 SOAPMonitorApplet.java</pre>
+
+<p>Alternatively, you can directly get the <strong>compiled applet
+classes</strong> from the WEB-INF/lib/soapmonitor-1.3.jar which is inside
+the extracted axis2.war. To extract the soapmonitor-1.3.jar file, simply
+execute the command, <code>jar -xf soapmonitor-1.3.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/.</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-2007
+    
+          Apache Software Foundation
+          
+  
+
+  
+    
+  
+  
+  </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+  </body>
+</html>

Added: webservices/axis2/site/1_3/spring.html
URL: http://svn.apache.org/viewvc/webservices/axis2/site/1_3/spring.html?view=auto&rev=565295
==============================================================================
--- webservices/axis2/site/1_3/spring.html (added)
+++ webservices/axis2/site/1_3/spring.html Mon Aug 13 03:13:18 2007
@@ -0,0 +1,777 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+
+
+
+
+
+
+
+
+<html>
+  <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="http://ws.apache.org/axis2/images/axis.jpg" alt="" />
+    
+            </span>
+            <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="breadcrumbs">
+          
+  
+
+  
+    
+  
+  
+            <div class="xleft">
+        Last Published: 08/13/2007
+                      </div>
+            <div class="xright">      <a href="../index.html">Axis2/Java</a>
+          |
+          <a href="http://ws.apache.org/axis2/c">Axis2/C</a>
+          |
+          <a href="../../../">Apache WS</a>
+          |
+          <a href="http://www.apache.org">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_3/contents.html">Version 1.3</a>
+                <ul>
+                  
+    <li class="none">
+              <a href="../1_3/toc.html">Table of Contents</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../1_3/installationguide.html">Installation Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../1_3/quickstartguide.html">QuickStart Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../1_3/userguide.html">User Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../1_3/pojoguide.html">POJO Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../1_3/spring.html">Spring Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../1_3/webadminguide.html">Web Administrator's Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../1_3/migration.html">Migration Guide (from Axis1)</a>
+        </li>
+              </ul>
+        </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/">Wiki</a>
+        </li>
+              
+    <li class="none">
+              <a href="../refLib.html">Reference Library</a>
+        </li>
+              
+    <li class="none">
+              <a href="http://ws.apache.org/axis2/1_3/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">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">License</a>
+        </li>
+          </ul>
+                                       <a href="http://maven.apache.org/" title="Built by Maven" id="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=""></meta>
+  Axis2 integration with the Spring Framework
+  <link href="../css/axis-docs.css" rel="stylesheet" type="text/css" media="all"></link>
+</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="1"></a>
+
+<h2>Introduction</h2>
+
+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.
+
+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.
+
+This guide assumes some basic knowledge of Axis2. See the <a href="userguide.html">User's Guide</a> for more information.
+<a name="2"></a>
+
+<h3>Programming Model</h3>
+
+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 .
+<a name="22"></a>
+
+<h3>Simple Spring Config Example</h3>
+
+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:
+<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>
+
+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.
+<a name="23"></a>
+
+<h3>With a ServletContext</h3>
+
+This example (with a ServletContext) applicationContext.xml should be
+familiar to any Spring user:
+<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>
+
+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:
+<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>
+
+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 .
+<a name="24"></a>
+
+<h3>Without a ServletContext</h3>
+
+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' :
+<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>
+
+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:
+<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="25"></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="26"></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="261"></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.3.jar
+./lib/spring.jar
+./spring
+./spring/MyBean.class
+./spring/MyBeanImpl.class
+./spring/SpringAwareService.class
+./spring/SpringInit.class </pre>
+</pre></div>
+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:
+<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="262"></a>The Spring inside an AAR init
+  class</strong></li>
+</ul>
+
+One way to initialize Spring inside the AAR is to use the
+org.apache.axis2.engine.ServiceLifeCycle interface. Here we give an
+example:
+<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="263"></a>Known issues running Spring inside the
+    AAR</strong></li>
+</ul>
+
+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>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 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-2007
+    
+          Apache Software Foundation
+          
+  
+
+  
+    
+  
+  
+  </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+  </body>
+</html>

Added: webservices/axis2/site/1_3/src/Axis2SampleDocLitServiceCode.html
URL: http://svn.apache.org/viewvc/webservices/axis2/site/1_3/src/Axis2SampleDocLitServiceCode.html?view=auto&rev=565295
==============================================================================
--- webservices/axis2/site/1_3/src/Axis2SampleDocLitServiceCode.html (added)
+++ webservices/axis2/site/1_3/src/Axis2SampleDocLitServiceCode.html Mon Aug 13 03:13:18 2007
@@ -0,0 +1,467 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+
+
+
+
+
+
+
+
+<html>
+  <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="http://ws.apache.org/axis2/images/axis.jpg" alt="" />
+    
+            </span>
+            <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="breadcrumbs">
+          
+  
+
+  
+    
+  
+  
+            <div class="xleft">
+        Last Published: 08/13/2007
+                      </div>
+            <div class="xright">      <a href="../../index.html">Axis2/Java</a>
+          |
+          <a href="http://ws.apache.org/axis2/c">Axis2/C</a>
+          |
+          <a href="../../../../">Apache WS</a>
+          |
+          <a href="http://www.apache.org">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_3/contents.html">Version 1.3</a>
+                <ul>
+                  
+    <li class="none">
+              <a href="../../1_3/toc.html">Table of Contents</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../../1_3/installationguide.html">Installation Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../../1_3/quickstartguide.html">QuickStart Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../../1_3/userguide.html">User Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../../1_3/pojoguide.html">POJO Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../../1_3/spring.html">Spring Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../../1_3/webadminguide.html">Web Administrator's Guide</a>
+        </li>
+                  
+    <li class="none">
+              <a href="../../1_3/migration.html">Migration Guide (from Axis1)</a>
+        </li>
+              </ul>
+        </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/">Wiki</a>
+        </li>
+              
+    <li class="none">
+              <a href="../../refLib.html">Reference Library</a>
+        </li>
+              
+    <li class="none">
+              <a href="http://ws.apache.org/axis2/1_3/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">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">License</a>
+        </li>
+          </ul>
+                                       <a href="http://maven.apache.org/" title="Built by Maven" id="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=""></meta>
+  
+  <link href="../../css/axis-docs.css" rel="stylesheet" type="text/css" media="all"></link>
+</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></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></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-2007
+    
+          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