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 ch...@apache.org on 2007/03/08 10:32:01 UTC

svn commit: r515983 - in /webservices/axis2/trunk/java/xdocs/1_1: spring.html tcp-transport.html toc.html transport_howto.html

Author: chatra
Date: Thu Mar  8 01:32:00 2007
New Revision: 515983

URL: http://svn.apache.org/viewvc?view=rev&rev=515983
Log:
committing changes in patch after (JIRA AXIS2-2300) review

Modified:
    webservices/axis2/trunk/java/xdocs/1_1/spring.html
    webservices/axis2/trunk/java/xdocs/1_1/tcp-transport.html
    webservices/axis2/trunk/java/xdocs/1_1/toc.html
    webservices/axis2/trunk/java/xdocs/1_1/transport_howto.html

Modified: webservices/axis2/trunk/java/xdocs/1_1/spring.html
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/xdocs/1_1/spring.html?view=diff&rev=515983&r1=515982&r2=515983
==============================================================================
--- webservices/axis2/trunk/java/xdocs/1_1/spring.html (original)
+++ webservices/axis2/trunk/java/xdocs/1_1/spring.html Thu Mar  8 01:32:00 2007
@@ -3,29 +3,31 @@
 <head>
   <meta http-equiv="content-type" content="">
   <title>Axis2 integration with the Spring Framework</title>
-  <link href="../css/axis-docs.css" rel="stylesheet" type="text/css" media="all" />
+  <link href="../css/axis-docs.css" rel="stylesheet" type="text/css"
+  media="all">
 </head>
 
 <body lang="en">
-<h1>Axis2 Integration With The Spring Framework</h1>
+<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>
+  <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="#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>
+      <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>
+          <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>
@@ -35,20 +37,19 @@
 
 <h2>Introduction</h2>
 
-<p>The idea behind Axis2 and Spring integration is that Axis2 simply needs to
-have Spring supply one of its pre-loaded beans to the Axis2 Message
-Receiver defined in the AAR services.xml . While Axis2 typically uses
-reflection to instantiate the ServiceClass defined in the services.xml that
-the Message Receiver will use, alternatively one can define a
-ServiceObjectSupplier that will supply the Object.</p>
-
-<p>This guide will show how to use two separate ServiceObjectSupplier classes
-that are part of the Axis2 standard distribution: One for use with a ServletContext, 
-and one without. 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 core functionality is required.</p>
+<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. 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>
@@ -60,17 +61,16 @@
 <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 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>
+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="22"></a>
 
 <h3>Simple Spring Config Example</h3>
 
-<p>For the purpose of this example, and for no other reason besides
-simplicity, we'll configure Spring via a WAR file's web.xml. Lets add a
-context-param and a listener:</p>
+<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;
@@ -86,7 +86,7 @@
 
 <h3>With a ServletContext</h3>
 
-<p>This 'with a ServletContext' example applicationContext.xml should be
+<p>This example (with a ServletContext) applicationContext.xml should be
 familiar to any Spring user:</p>
 <pre> &lt;?xml version="1.0" encoding="UTF-8"?&gt;
 &lt;!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"&gt;
@@ -105,8 +105,8 @@
 &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 ServletContext, the services.xml for the example would be
-using SpringServletContextObjectSupplier such as:</p>
+to get a hold of the ServletContext, the services.xml for the example would
+be using SpringServletContextObjectSupplier such as:</p>
 <pre> &lt;service name="SpringAwareService"&gt;
     &lt;description&gt;
         simple spring example
@@ -126,8 +126,9 @@
 
 <h3>Without a ServletContext</h3>
 
-<p>In the case Axis2 can't get a ServletContext, ie another transport or running inside the AAR etc, 
-you have the option of defining a bean that takes advantage of Spring's internal abilities
+<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="1.0" encoding="UTF-8"?&gt;
@@ -152,9 +153,10 @@
   &lt;/bean&gt;
 &lt;/beans&gt;</pre>
 
-<p>If the service is _NOT_ 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 would be using SpringAppContextAwareObjectSupplier such as:</p>
+<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="SpringAwareService"&gt;
     &lt;description&gt;
         simple spring example
@@ -171,9 +173,9 @@
 would be any Message Receiver that extends
 org.apache.axis2.receivers.AbstractMessageReceiver .</p>
 
-<p>In a 'without a ServletContext' environment, one way you could load the
-applicationContext.xml file is in a place that will be run once, upon
-start-up, execute:</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)
@@ -188,10 +190,10 @@
 
 <h3>Putting It All Together</h3>
 
-<p>From here, its 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 below:</p>
+<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;
@@ -223,9 +225,9 @@
     }
 } </pre>
 
-<p>For those new to Spring, one of the ideas is that you program to an
-Interface, and the implementation is pluggable. This idea is referenced in
-the Spring config file above. Below is the interface:</p>
+<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 */
@@ -306,58 +308,55 @@
     }
 } </pre>
 
-<p>The examples above assumes 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>
-    <source><pre>./mySpring.jar
+<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>
+<source><pre>./mySpring.jar
 ./META-INF
 ./META-INF/MANIFEST.MF
 ./spring
 ./spring/MyBean.class
 ./spring/MyBeanImpl.class
-./spring/SpringAwareService.class
-</pre> </source>
-
-<p>Since all the user classes are in mySpring.jar in this example, the AAR merely contains the 
-services.xml file:</p>
-
-    <source>
-    <pre>./springExample.aar
+./spring/SpringAwareService.class</pre>
+</source>
+<p>Since all the user classes are in mySpring.jar in this example, the AAR
+merely contains the services.xml file:</p>
+<source><pre>./springExample.aar
 ./META-INF
 ./META-INF/MANIFEST.MF
-./META-INF/services.xml
-</pre> </source>
-
+./META-INF/services.xml</pre>
+</source>
 <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. Running the client, you should see this output:</p>
+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="http://springExample.org/example1" 
   xmlns:tns="http://ws.apache.org/axis2"&gt;Spring, emerge thyself&lt;/example1:string&gt;</pre>
 <a name="26"></a>
 
 <h3>Spring Inside an AAR</h3>
 
-<p>Frequently Axis2 users wish to run Spring inside the AAR. Here we show you
-how. There are four points to be aware of:</p>
+<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>(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) Its up to you to load Spring, though we give an example below.</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
+<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 MOVE the axis2-spring-*.jar from WEB-INF/lib to inside 
-the AAR, as shown below - it will NOT work otherwise. </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><strong><a name="261"></a>The Spring inside an AAR layout</strong></li>
 </ul>
-    <source>
-    <pre>./springExample.aar
+<source><pre>./springExample.aar
 ./META-INF
 ./META-INF/MANIFEST.MF
 ./META-INF/services.xml
@@ -369,22 +368,23 @@
 ./spring/MyBean.class
 ./spring/MyBeanImpl.class
 ./spring/SpringAwareService.class
-./spring/SpringInit.class </pre> </source>
-
-<p>As explained in the <a href="#24">Without a ServletContext</a> section, likewise 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;
+./spring/SpringInit.class </pre>
+</source>
+<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="applicationContext" 
-    class="org.apache.axis2.extensions.spring.receivers.ApplicationContextHolder" /&gt;
-</pre>
+    class="org.apache.axis2.extensions.spring.receivers.ApplicationContextHolder" /&gt;</pre>
 <ul>
-  <li><strong><a name="262"></a>The Spring inside an AAR init class</strong></li>
+  <li><strong><a name="262"></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>
-    <source><pre>package spring;
+
+<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>
+<source><pre>package spring;
 
 import org.apache.axis2.engine.ServiceLifeCycle;
 import org.apache.axis2.context.ConfigurationContext;
@@ -392,7 +392,7 @@
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 public class SpringInit implements ServiceLifeCycle {
-	
+        
     /**
      * This will be called during the deployement time of the service. 
      * irrespective
@@ -421,12 +421,12 @@
     public void shutDown(ConfigurationContext ctxIgnore, AxisService ignore) {
     }
 }</pre>
-    </source>
-    <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>
-    <source><pre>&lt;serviceGroup&gt;
+</source>
+<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>
+<source><pre>&lt;serviceGroup&gt;
   &lt;!-- Invoke SpringInit on server startup and shutdown --&gt;
   &lt;service name="SpringAwareService" class="spring.SpringInit"&gt;
     &lt;description&gt;
@@ -441,32 +441,32 @@
     &lt;/operation&gt;
   &lt;/service&gt;
 &lt;/serviceGroup&gt;</pre>
-</source>
-<ul>
-  <li>
-    <strong><a name="263"></a>Known issues running Spring inside the AAR</strong>
-  </li>
+</source><ul>
+  <li><strong><a name="263"></a>Known issues running Spring inside the
+    AAR</strong></li>
 </ul>
-    <p>The Axis2 classloader strategy by default 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. The behavior of 'composite' was the default in the development 
-    cycle in between 1.0 and 1.1, but it resulted in the JIRA issue AXIS2-1214 - essentially 
-    problems with getting an initContext.lookup() handle inside the AAR. Spring users typically 
-    have little desire to use initContext.lookup() however, 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. While fully testing 
-    JndiObjectFactoryBean with ejb has not been done yet - if you do, please send a message 
-    to the axis users list - Datasources via Spring inside the AAR have been tested. Basically 
-    it works as typically done with Spring, though if you are passing Hibernate XML files you need 
-    to put them in a place where Spring will find them. The most flexible way is as follows, using 
-    logging in DEBUG mode to see where Spring will look in your jar / class locations: </p>
-    <source><pre>
-    &lt;bean id="mySessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"&gt;
+
+<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. While fully testing JndiObjectFactoryBean with EJB has
+not been done yet (if you do, please send a message to the axis users list)
+Datasources via Spring inside the AAR have been tested. Basically it works as
+typically done with Spring, though if you are passing Hibernate XML files you
+need to put them in a place where Spring will find them. The most flexible
+way is as follows, using logging in DEBUG mode to see where Spring will look
+in your jar / class locations:</p>
+<source><pre>    &lt;bean id="mySessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"&gt;
                 &lt;property name="mappingLocations"&gt;
                    &lt;value&gt;classpath*:**/MyEntity.hbm.xml&lt;/value&gt;
                 &lt;/property&gt;
                 ...
-    &lt;/bean&gt; 
-</pre> </source>
-</body>
+    &lt;/bean&gt; </pre>
+</source></body>
 </html>

Modified: webservices/axis2/trunk/java/xdocs/1_1/tcp-transport.html
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/xdocs/1_1/tcp-transport.html?view=diff&rev=515983&r1=515982&r2=515983
==============================================================================
--- webservices/axis2/trunk/java/xdocs/1_1/tcp-transport.html (original)
+++ webservices/axis2/trunk/java/xdocs/1_1/tcp-transport.html Thu Mar  8 01:32:00 2007
@@ -1,20 +1,20 @@
 <html>
-
 <head>
+  <meta http-equiv="content-type" content="">
   <title>TCP transport</title>
-  <link href="../css/axis-docs.css" rel="stylesheet" type="text/css" media="all" />
+  <link href="../css/axis-docs.css" rel="stylesheet" type="text/css"
+  media="all">
 </head>
 
 <body lang="en">
 <h1>TCP Transport</h1>
-
-This document will explain how to send and receive SOAP Messages via TCP in
-Axis2. 
+This document explains how to send and receive SOAP messages via TCP in Axis2.
 
 <p><i>Send your feedback or questions to: <a
-href="mailto:axis-dev@ws.apache.org">axis-dev@ws.apache.org</a></i>. Prefix
-subject with [Axis2]. To subscribe to mailing list see <a
-href="http://ws.apache.org/axis2/mail-lists.html">here.</a></p>
+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
+href="http://ws.apache.org/axis2/mail-lists.html">Axis2 site</a>. <a
+href="http://ws.apache.org/axis2/mail-lists.html"></a></p>
 
 <h2>Content</h2>
 <ul>
@@ -24,102 +24,100 @@
   <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 has support for both send and receive SOAP 
-Messages via TCP. 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 request URI,
-and Service dispatching should be done by an alternative method. Thus,
-RequestURIBasedDispatcher can not be used. The following are the two main
+<p>Axis2 supports TCP as a transport. It supports both send and receive 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>
   <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>
+  <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 SOAP body base mechanism.</p>
-
+<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
+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">Advance User's Guide</a> for more information)</p>
-
 <!--<p>Alternatively the TCP Server can run with tcp-server.bat/ tcp-server.sh
 file in the bin directory of the Binary distribution of TCP Server.</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 it can be done.</p>
-<source><pre>
-OMElement payload = ...
+<source><pre>OMElement payload = ...
 ServiceClient serviceClient = new ServiceClient();
 Options options = new Options();
 options.setTo(targetEPR);
-<!--options.useSeperateListener(false);--><!--commented off as their is an error: "The method useSeperateListener(boolean)is undefined for the type Options"-->
+<!--options.useSeperateListener(false);-->
+
+<!--commented off as their is an error: "The method useSeperateListener(boolean)is undefined for the type Options"-->
+
 serviceClient.setOptions(options);
 
-OMElement response = serviceClient.sendReceive(payload);
-</pre>
+OMElement response = serviceClient.sendReceive(payload);</pre>
 </source>
 <p>The transport that should be invoked is inferred from the targetEPR
-(tcp://...). In this case it is TCP and the listener, also TCP . 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>
-
+(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>Sample for a TCP Client can be found from the
+<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 Advacnce User's Guide</a>. The client first starts the
-TCPServer with the same repository used for the <a
-href="adv-userguide.html">Axis2 Advance User's Guide</a> samples. Since sample is already
-deployed in the repository while trying 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. In client side, you can engage addressing by copying 
-the addressing-1.1.1.mar (AXIS2_HOME/repository/module) to AXIS2_HOME/lib directory.</p>
-
+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.1.1.mar (AXIS2_HOME/repository/module) to
+AXIS2_HOME/lib directory.</p>
 <a name="components"></a>
+
 <h2>Transport Components</h2>
 
-<p>Axis2 TCP transport has two components, a transport Listener for receiving
-the Messages and transport Sender to send the SOAP Messages. Axis2
-installation has both the components built in to itself by default. In the
-axis2.xml configuration file the two TCP transport components would look as
-follows.</p>
-
-<p>If the TCP server is started manually this configuration does not take
-effect. In return this effects the transport Listener's start by Axis2. (e.g.
-Listener started by the Complete Async interaction)</p>
-
-<p>The following xml lines initializes the TCPTransport Receiver:</p>
-<source><pre>
-&lt;transportReceiver name="tcp" class="org.apache.axis2.transport.tcp.TCPServer"&gt;
+<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 would look
+as follows.</p>
+
+<p>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>
+
+<p>The following XML lines initialize the TCPTransport Receiver:</p>
+<source><pre>&lt;transportReceiver name="tcp" class="org.apache.axis2.transport.tcp.TCPServer"&gt;
     &lt;parameter name="port" locked="false"&gt;6060&lt;/parameter&gt;
 &lt;/transportReceiver&gt;</pre>
 </source>
-<p>The following xml lines adds the TCPTransport Sender:</p>
+<p>The following XML lines add the TCPTransport Sender:</p>
 <source><pre>&lt;transportSender name="tcp" class="org.apache.axis2.transport.tcp.TCPTransportSender"/&gt;</pre>
-</source>
-
-</body>
-
+</source></body>
 </html>

Modified: webservices/axis2/trunk/java/xdocs/1_1/toc.html
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/xdocs/1_1/toc.html?view=diff&rev=515983&r1=515982&r2=515983
==============================================================================
--- webservices/axis2/trunk/java/xdocs/1_1/toc.html (original)
+++ webservices/axis2/trunk/java/xdocs/1_1/toc.html Thu Mar  8 01:32:00 2007
@@ -1,74 +1,124 @@
 <html>
 <head>
-<link href="../css/axis-docs.css" rel="stylesheet" type="text/css" media="all" />
-<style type="text/css" media="screen"><!--
+  <meta http-equiv="content-type" content="">
+  <title></title>
+  <link href="../css/axis-docs.css" rel="stylesheet" type="text/css"
+  media="all">
+  <style type="text/css" media="screen">
+<!--
 ul { list-style-type: none; margin: 0 0 0 5px; padding: 0; border-width: 0; list-style-position: outside; }
---></style>
+-->
+  </style>
 </head>
 
 <body lang="en-US" dir="ltr">
 <h1>Table of Contents</h1>
 <ol>
-           <li><a href="contents.html" target="mainFrame">Introduction</a>
-           <li><a href="installationguide.html" target="mainFrame">Installation Guide</a>
-           <li><a href="../modules/index.html" target="mainFrame">Addon Modules</a>
-           <li><a href="app_server.html" target="mainFrame">Application Server Specific Configuration Guide</a>
-           <li><a href="quickstartguide.html" target="mainFrame">QuickStart Guide</a>
-           <li><a href="userguide.html" target="mainFrame">User's Guide</a>
- 	     <li><a href="adv-userguide.html" target="mainFrame">Advance User's Guide</a>
-           <li><a href="axis2config.html" target="mainFrame">Configuration Guide</a>
-           <li><a href="Axis2ArchitectureGuide.html" target="mainFrame">Architecture Guide</a>
-           <li><a href="pojoguide.html" target="mainFrame">POJO Guide</a>
-           <li><a href="spring.html" target="mainFrame">Spring Guide</a>
-           <li><a href="modules.html" target="mainFrame">Modules Guide</a>
-           <li>ADB Data Binding
-               <ul>
-                   <li>13.1 <a href="adb/adb-howto.html" target="mainFrame">Architecture</a>
-                   <li>13.2 <a href="adb/adb-advanced.html" target="mainFrame">Advanced Features</a>
-                   <li>13.3 <a href="adb/adb-codegen-integration.html" target="mainFrame">Code generation integration</a>
-                   <li>13.4 <a href="adb/adb-tweaking.html" target="mainFrame">Tweaking</a>
-               </ul>
-                     <li>JiBX Data binding
-               <ul>
-                   <li>14.1 <a href="jibx/jibx-codegen-integration.html" target="mainFrame">Code generation integration</a>
-                   <li>14.2 <a href="jibx/jibx-doclit-example.html" target="mainFrame">doc/lit example</a>
-                   <li>14.3 <a href="jibx/jibx-unwrapped-example.html" target="mainFrame">unwrapped example</a>
-               </ul>
-           <li>Advanced
-               <ul>
-                   <li>15.1 <a href="xmlbased-server.html" target="mainFrame">AXIOM based Service</a>
-                   <li>15.2 <a href="dii.html" target="mainFrame">AXIOM based Client</a>
-               </ul>
-           <li><a href="mtom-guide.html" target="mainFrame">Attachments/MTOM Guide</a>
-           <li>Transports
-               <ul>
-                   <li>17.1 <a href="http-transport.html" target="mainFrame">HTTP Transport</a>
-                   <li>17.2 <a href="jms-transport.html" target="mainFrame">JMS Transport</a>
-                   <li>17.3 <a href="tcp-transport.html" target="mainFrame">TCP Transport</a>
-                   <li>17.4 <a href="mail-transport.html" target="mainFrame">Mail Transport</a> / <a href="mail-configuration.html" target="mainFrame">(Configuration)</a>
-                   <li>17.5 <a href="transport_howto.html" target="mainFrame">Custom Transport</a>
-               </ul>
-           <li><a href="WS_policy.html" target="mainFrame">WS-Policy Support</a>
-           <li><a href="rest-ws.html" target="mainFrame">REST Support</a>
-           <li><a href="webadminguide.html" target="mainFrame">Web Administrator's Guide</a>
-           <li><a href="soapmonitor-module.html" target="mainFrame">SOAP Monitor</a>
-           <li><a href="reference.html" target="mainFrame">Command line tools</a>
-           <li><a href="../tools/index.html" target="mainFrame">Tools/Plugins</a>
-               <ul>
-                   <li>23.1 <a href="../tools/1_1/CodegenToolReference.html" target="mainFrame">Code Generator Tool - Command Line and Ant Task</a>
-                   <li>23.2 <a href="../tools/1_1/idea/Idea_plug-in_userguide.html" target="mainFrame">Axis2 plugin for IntelliJ IDEA</a>
-                   <li>23.3 <a href="../tools/1_1/eclipse/servicearchiver-plugin.html" target="mainFrame">Service Archive Generator Wizard - Eclipse Plug-in</a>
-                   <li>23.4 <a href="../tools/1_1/eclipse/wsdl2java-plugin.html" target="mainFrame">Code Generator Wizard - Eclipse Plug-in</a>
-                   <li>23.5 <a href="../tools/1_1/maven-plugins/maven-aar-plugin.html" target="mainFrame">AAR Maven2 Plug-in</a>
-                   <li>23.6 <a href="../tools/1_1/maven-plugins/maven-java2wsdl-plugin.html" target="mainFrame">Java2WSDL Maven2 Plug-in</a>
-                   <li>23.7 <a href="../tools/1_1/maven-plugins/maven-wsdl2code-plugin.html" target="mainFrame">WSDL2Code Maven2 Plug-in</a>
-                   <li>23.8 <a href="../tools/previous.html" target="mainFrame">Tools Archive</a>
-               </ul>
-           <li><a href="migration.html" target="mainFrame">Migration Guide (from Axis1)</a>
-           <li>Design Notes
-               <ul>
-                   <li>25.1 <a href="Axis2-rpc-support.html" target="mainFrame">RPC Support</a>
-               </ul>
-                 </ol>
+  <li><a href="contents.html" target="mainFrame">Introduction</a></li>
+  <li><a href="installationguide.html" target="mainFrame">Installation
+    Guide</a></li>
+  <li><a href="../modules/index.html" target="mainFrame">Add-on
+  Modules</a></li>
+  <li><a href="app_server.html" target="mainFrame">Application Server
+    Specific Configuration Guide</a></li>
+  <li><a href="quickstartguide.html" target="mainFrame">QuickStart
+  Guide</a></li>
+  <li><a href="userguide.html" target="mainFrame">User's Guide</a></li>
+  <li><a href="adv-userguide.html" target="mainFrame">Advance User's
+  Guide</a></li>
+  <li><a href="axis2config.html" target="mainFrame">Configuration
+  Guide</a></li>
+  <li><a href="Axis2ArchitectureGuide.html" target="mainFrame">Architecture
+    Guide</a></li>
+  <li><a href="pojoguide.html" target="mainFrame">POJO Guide</a></li>
+  <li><a href="spring.html" target="mainFrame">Spring Guide</a></li>
+  <li><a href="modules.html" target="mainFrame">Modules Guide</a></li>
+  <li>ADB Data Binding
+    <ul>
+      <li>13.1 <a href="adb/adb-howto.html"
+        target="mainFrame">Architecture</a></li>
+      <li>13.2 <a href="adb/adb-advanced.html" target="mainFrame">Advanced
+        Features</a></li>
+      <li>13.3 <a href="adb/adb-codegen-integration.html"
+        target="mainFrame">Code generation integration</a></li>
+      <li>13.4 <a href="adb/adb-tweaking.html"
+      target="mainFrame">Tweaking</a></li>
+    </ul>
+  </li>
+  <li>JiBX Data binding
+    <ul>
+      <li>14.1 <a href="jibx/jibx-codegen-integration.html"
+        target="mainFrame">Code generation integration</a></li>
+      <li>14.2 <a href="jibx/jibx-doclit-example.html"
+        target="mainFrame">doc/lit example</a></li>
+      <li>14.3 <a href="jibx/jibx-unwrapped-example.html"
+        target="mainFrame">unwrapped example</a></li>
+    </ul>
+  </li>
+  <li>Advanced
+    <ul>
+      <li>15.1 <a href="xmlbased-server.html" target="mainFrame">AXIOM based
+        Service</a></li>
+      <li>15.2 <a href="dii.html" target="mainFrame">AXIOM based
+      Client</a></li>
+    </ul>
+  </li>
+  <li><a href="mtom-guide.html" target="mainFrame">Attachments/MTOM
+  Guide</a></li>
+  <li>Transports
+    <ul>
+      <li>17.1 <a href="http-transport.html" target="mainFrame">HTTP
+        Transport</a></li>
+      <li>17.2 <a href="jms-transport.html" target="mainFrame">JMS
+        Transport</a></li>
+      <li>17.3 <a href="tcp-transport.html" target="mainFrame">TCP
+        Transport</a></li>
+      <li>17.4 <a href="mail-transport.html" target="mainFrame">Mail
+        Transport</a> / <a href="mail-configuration.html"
+        target="mainFrame">(Configuration)</a></li>
+      <li>17.5 <a href="transport_howto.html" target="mainFrame">Custom
+        Transport</a></li>
+    </ul>
+  </li>
+  <li><a href="WS_policy.html" target="mainFrame">WS-Policy Support</a></li>
+  <li><a href="rest-ws.html" target="mainFrame">REST Support</a></li>
+  <li><a href="webadminguide.html" target="mainFrame">Web Administrator's
+    Guide</a></li>
+  <li><a href="soapmonitor-module.html" target="mainFrame">SOAP
+  Monitor</a></li>
+  <li><a href="reference.html" target="mainFrame">Command line tools</a></li>
+  <li><a href="../tools/index.html" target="mainFrame">Tools/Plugins</a>
+    <ul>
+      <li>23.1 <a href="../tools/1_1/CodegenToolReference.html"
+        target="mainFrame">Code Generator Tool - Command Line and Ant
+      Task</a></li>
+      <li>23.2 <a href="../tools/1_1/idea/Idea_plug-in_userguide.html"
+        target="mainFrame">Axis2 plugin for IntelliJ IDEA</a></li>
+      <li>23.3 <a href="../tools/1_1/eclipse/servicearchiver-plugin.html"
+        target="mainFrame">Service Archive Generator Wizard - Eclipse
+        Plug-in</a></li>
+      <li>23.4 <a href="../tools/1_1/eclipse/wsdl2java-plugin.html"
+        target="mainFrame">Code Generator Wizard - Eclipse Plug-in</a></li>
+      <li>23.5 <a href="../tools/1_1/maven-plugins/maven-aar-plugin.html"
+        target="mainFrame">AAR Maven2 Plug-in</a></li>
+      <li>23.6 <a
+        href="../tools/1_1/maven-plugins/maven-java2wsdl-plugin.html"
+        target="mainFrame">Java2WSDL Maven2 Plug-in</a></li>
+      <li>23.7 <a
+        href="../tools/1_1/maven-plugins/maven-wsdl2code-plugin.html"
+        target="mainFrame">WSDL2Code Maven2 Plug-in</a></li>
+      <li>23.8 <a href="../tools/previous.html" target="mainFrame">Tools
+        Archive</a></li>
+    </ul>
+  </li>
+  <li><a href="migration.html" target="mainFrame">Migration Guide (from
+    Axis1)</a></li>
+  <li>Design Notes
+    <ul>
+      <li>25.1 <a href="Axis2-rpc-support.html" target="mainFrame">RPC
+        Support</a></li>
+    </ul>
+  </li>
+</ol>
 </body>
 </html>

Modified: webservices/axis2/trunk/java/xdocs/1_1/transport_howto.html
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/xdocs/1_1/transport_howto.html?view=diff&rev=515983&r1=515982&r2=515983
==============================================================================
--- webservices/axis2/trunk/java/xdocs/1_1/transport_howto.html (original)
+++ webservices/axis2/trunk/java/xdocs/1_1/transport_howto.html Thu Mar  8 01:32:00 2007
@@ -1,33 +1,32 @@
-
 <html>
-
 <head>
+  <meta http-equiv="content-type" content="">
   <title></title>
-  <link href="../css/axis-docs.css" rel="stylesheet" type="text/css" media="all" />
+  <link href="../css/axis-docs.css" rel="stylesheet" type="text/css"
+  media="all">
 </head>
 
 <body>
-
-<h1>How To Write Your Own Axis2 Transport</h1>
+<h1>How to Write Your Own Axis2 Transport</h1>
 
 <h2>Prologue</h2>
 
-<p>To stop you from reinventing the wheel, before we get started, I will
+<p>To stop you from re-inventing the wheel, before we get started, I will
 quickly list the transports that are already supported in Axis2 with a small
-description. </p>
+description.</p>
 
 <p></p>
 <ul>
   <li><b>HTTP</b> - In the HTTP transport, the transport Listener is a
     Servlet or a Simple HTTP server provided by Axis2. The transport Sender
-    uses sockets to connect and send the SOAP Message. Currently we have the
+    uses sockets to connect and send the SOAP message. Currently we have the
     commons-httpclient based HTTP Transport sender as the default
   transport.</li>
   <li><b>TCP</b> - This is the most simple transport, but needs Addressing
     support to be functional.</li>
-  <li><b>SMTP</b> - This can work off a single email account or a mail server.
-    The Mail Transport Receiver is a thread that checks for emails in fixed
-    time intervals.</li>
+  <li><b>SMTP</b> - This can work off a single email account or a mail
+    server. The Mail Transport Receiver is a thread that checks for emails in
+    fixed time intervals.</li>
 </ul>
 
 <p>To understand the rest of this document you will need some understanding
@@ -41,35 +40,35 @@
 <p>Broadly speaking, a transport inside Axis2 can be classified as a way of
 getting messages that arrive though some channel into the Axis2 engine. The
 core of Axis2 is transport independent. All data that is transport specific
-is striped out of the incoming message and inserted into the MessageContext.
-On the outgoing message, all transport specific information like headers are
-added and sent.</p>
+is stripped out of the incoming message and inserted into the MessageContext.
+In the outgoing message, all transport specific information, like headers,
+are added and sent.</p>
 
-<p>To write your own transport you will need to primarily write two classes,
+<p>To write your own transport, you will need to primarily write two classes:
 one is the TransportSender and the other is the TransportReceiver. To
 register a transport with Axis2 you will need to put two entries in the
 axis2.xml file. One for the transport receiver and the other for the
 transport sender. I will take you through the process of adding the entries
-in relevent sections.</p>
+in the relevent sections.</p>
 
 <h2>Transport Receiver</h2>
 
 <p>Any message that is coming into Axis2 needs to go through a transport
 receiver. All information about how the message is received at the Axis2
-server from the wire [or by snail mail for that matter :)] is isolated inside
-the transport receiver. It extracts the data that is coming on the wire and
-transforms it into a state that the Axis2 server understands.</p>
+server from the wire (or via an e-mail ) is isolated inside the transport
+receiver. It extracts the data that is coming on the wire and transforms it
+into a state that the Axis2 server understands.</p>
 
 <p>So now that we have some background information about how transports work
-inside Axis2, without further delay lets dive into some coding and start
-building out own transport.</p>
+inside Axis2, without further delay, lets dive into some coding and start
+building our own transport.</p>
 
 <p></p>
 
-<p>To get things stared you will first need to extend from the
+<p>To get things stared, you will first need to extend from the
 org.apache.Axis2.transport.TransportListener class and write you own
-transport listener. To create an engine to process the MessageContext we need
-a configuration context. The following code fragment will do this. This
+transport listener. To create an engine to process the MessageContext, we
+need a configuration context. The following code fragment will do this. This
 should ideally be only done once for the lifetime of the Transport
 receiver.</p>
 
@@ -84,13 +83,12 @@
         log.info(e.getMessage());
 }</pre>
 </source>
-
 <p>Now we need some kind of a Listener to listen to the requests that come
-in. This you will need to implement according to the transport that you are
-trying to build. After a message is received at the Receiver you can use the
+in. You need to implement this according to the transport that you are trying
+to build. After a message is received at the Receiver, you can use the
 following code to process the request and then forward the message context to
-the engine using the engine.receive(msgContext) method.{Following code
-snippet is extracted from MailListener as an example}</p>
+the engine using the engine.receive(msgContext) method. (The following code
+is extracted from the MailListener as an example)</p>
 <source><pre>AxisEngine engine = new AxisEngine(configurationContext);
 MessageContext msgContext = null;
 
@@ -163,11 +161,12 @@
   &lt;/transportReceiver&gt;
   </pre>
 </source>
-<p>Using a code fragment like
+<p>By using a code fragment like
 <code>Utils.getParameterValue(transportOut.getParameter(MailSrvConstants.SMTP_USER))</code>
 we can extract the parameters that we insert into the axis2.xml file.</p>
 
-<p>As you can see getting a new transport receiver up and running is a task that requires very little effort.</p>
+<p>As you can see, getting a new transport receiver up and running is a task
+that requires very little effort.</p>
 
 <h2>Transport Sender</h2>
 
@@ -196,33 +195,28 @@
                 throw new AxisFault(
                         "Both the TO and Property MessageContext.TRANSPORT_WRITER is Null, No way to send response.");
         }
-}
-</pre>
+}</pre>
 </source>
-<p>Therefore, depending on if your transport is using the same channel to send
-the response or using a different channel, you will need to implement a
-sub-set of the methods from the abstract class.</p>
-
-<p>After implementing the necessary methods you can let Axis2 know about your
-new transport sender by adding an entry to the axis2.xml file like you did
-for the Transport Receiver.</p>
-
+<p>Therefore, depending on whether your transport is using the same channel
+to send the response or using a different channel, you will need to implement
+a sub-set of the methods from the abstract class.</p>
+
+<p>After implementing the necessary methods, you can let Axis2 know about
+your new transport sender by adding an entry to the axis2.xml file, like you
+did for the Transport Receiver.</p>
 <source><pre>  &lt;transportSender name="TRANSPORT_NAME" class="org.apache.Axis2.transport.TRANSPORT_NAME.TRANSPORT_SENDER_CLASS"&gt;
         &lt;parameter name="PROPERTY_NAME" locked="false"&gt;PROPERTY_VALUE&lt;/parameter&gt;
         &lt;parameter name="PROPERTY_NAME_2" locked="false"&gt;PROPERTY_VALUE_2&lt;/parameter&gt;
   &lt;/transportSender&gt;
   </pre>
 </source>
-
 <p>Have a look at org.apache.Axis2.transport.mail.MailTransportSender for a
 very simple Transport Sender. Also have a look at
 org.apache.Axis2.transport.http.CommonsHTTPTransportSender which is used to
 send HTTP responses.</p>
 
 <p>Once we have written our transport receiver and our transport sender, and
-inserted the needed entries into the axis2.xml file, we are done. It is as
-simple as that! </p>
-
+inserted the required entries into the axis2.xml file, we are done. It is as
+simple as that!</p>
 </body>
-
 </html>



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