You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sm...@apache.org on 2011/07/11 23:10:56 UTC

svn commit: r1145356 [22/28] - in /incubator/airavata/trunk/ws-messaging: ./ distribution/ distribution/axis2_releases/ distribution/axis2_releases/axis2-1.6.0/ distribution/axis2_releases/axis2-1.6.0/bin/ distribution/axis2_releases/axis2-1.6.0/conf/ ...

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/build.xml
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/build.xml?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/build.xml (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/build.xml Mon Jul 11 21:10:36 2011
@@ -0,0 +1,153 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied. See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project name="userguide" default="generate.service">
+    <property name="mainDir" value="../.."/>
+    <property name="classes.dir" value="build/classes"/>
+    <path id="axis.classpath">
+        <fileset dir="../../lib">
+            <include name="*.jar"/>
+        </fileset>
+        <pathelement location="build/userguide.jar"/>
+    </path>
+<mkdir dir="${basedir}/build/classes"/>
+
+
+    <target name="run.client.all"
+            depends="run.client.ping,run.client.blocking,run.client.blockingdual,run.client.nonblocking,run.client.nonblockingdual,run.client.servicewithmodule">
+    </target>
+    
+    <target name="compile">
+    		<mkdir dir="${classes.dir}" />
+		<javac srcdir="src" destdir="${classes.dir}">
+			<classpath refid="axis.classpath" />
+		</javac>
+		<jar destfile="build/userguide.jar">
+            		<fileset dir="${classes.dir}">
+                		<include name="userguide/**"/>
+            		</fileset>
+       		</jar>
+    </target>
+    
+    <target name="generate.service" depends="compile">
+            <jar destfile="build/MyService.aar">
+            <fileset dir="src/userguide/example1/">
+                <include name="META-INF/**"/>
+            </fileset>
+            <fileset dir="${classes.dir}">
+                <include name="userguide/example1/**/*.class"/>
+            </fileset>
+        </jar>
+        <copy file="build/MyService.aar" tofile="../../repository/services/sample-MyService.aar" overwrite="true"/>
+        <jar destfile="build/MyServiceWithModule.aar" >
+            <fileset dir="src/userguide/example2/">
+                <include name="META-INF/**"/>
+            </fileset>
+            <fileset dir="${classes.dir}">
+                <include name="userguide/example2/**/*.class"/>
+            </fileset>
+        </jar>
+        <copy file="build/MyServiceWithModule.aar" tofile="../../repository/services/sample-MyServiceWithModule.aar" overwrite="true"/>
+        <jar destfile="build/WsaMappingService.aar">
+            <fileset dir="src/userguide/example3/">
+                <include name="META-INF/**"/>
+            </fileset>
+            <fileset dir="${classes.dir}">
+                <include name="userguide/example3/**/*.class"/>
+            </fileset>
+        </jar>
+        <copy file="build/WsaMappingService.aar" tofile="../../repository/services/sample-WsaMappingService.aar" overwrite="true"/>
+    </target>
+    
+    <target name="generate.module" depends="compile">
+       <jar destfile="build/logging.mar">
+            <fileset dir="src/userguide/loggingmodule/">
+                <include name="META-INF/**"/>
+            </fileset>
+            <fileset dir="${classes.dir}">
+                <include name="userguide/loggingmodule/**/*.class"/>
+            </fileset>
+       </jar>
+       <copy file="build/logging.mar" tofile="../../repository/modules/sample-logging.mar" overwrite="true"/>
+       <echo message="*** Please add the logging phase to the ../../conf/axis2.xml. For more details please refer to the http://ws.apache.org/axis2/1_2/modules.html ***"/>
+    </target>
+
+    <target name="run.client.blocking" depends="compile">
+        <java classname="userguide.clients.EchoBlockingClient"
+              classpathref="axis.classpath" fork="true">
+            <jvmarg value="-Daxis2.repo=${mainDir}/repository"/>
+	    <jvmarg value="-Daxis2.xml=conf/axis2.xml"/>
+        </java>
+    </target>
+    <target name="run.client.blockingdual" depends="compile">
+        <java classname="userguide.clients.EchoBlockingDualClient"
+              classpathref="axis.classpath" fork="true">
+            <jvmarg value="-Daxis2.repo=${mainDir}/repository"/>
+	    <jvmarg value="-Daxis2.xml=conf/axis2.xml"/>
+        </java>
+    </target>
+    
+    <target name="run.client.nonblocking" depends="compile">
+        <java classname="userguide.clients.EchoNonBlockingClient"
+              classpathref="axis.classpath" fork="true">
+            <jvmarg value="-Daxis2.repo=${mainDir}/repository"/>
+	    <jvmarg value="-Daxis2.xml=conf/axis2.xml"/>
+        </java>
+    </target>
+    
+    <target name="run.client.nonblockingdual" depends="compile">
+        <java classname="userguide.clients.EchoNonBlockingDualClient"
+              classpathref="axis.classpath" fork="true">
+            <jvmarg value="-Daxis2.repo=${mainDir}/repository"/>
+	    <jvmarg value="-Daxis2.xml=conf/axis2.xml"/>
+        </java>
+    </target>
+    
+    <target name="run.client.ping" depends="compile">
+        <java classname="userguide.clients.PingClient"
+              classpathref="axis.classpath" fork="true">
+            <jvmarg value="-Daxis2.repo=${mainDir}/repository"/>
+	    <jvmarg value="-Daxis2.xml=conf/axis2.xml"/>
+        </java>
+    </target>
+    
+    <target name="run.client.servicewithmodule" depends="compile">
+    	<echo message="${mainDir}" />
+	<echo message="${mainDir}/repository/conf/axis2.xml" />
+        <java classname="userguide.clients.ClientForWebServiceWithModule"
+              classpathref="axis.classpath" fork="true">
+           <jvmarg value="-Daxis2.repo=${mainDir}/repository"/>	   
+	   <jvmarg value="-Daxis2.xml=conf/axis2.xml"/>
+        </java>
+    </target>
+    
+    <target name="run.client">
+	<echo message="Please use the following ant targets to run the clients" />
+	<echo message="run.client.ping" />
+	<echo message="run.client.blocking" />
+	<echo message="run.client.blockingdual" />
+	<echo message="run.client.nonblocking" />
+	<echo message="run.client.nonblockingdual" />
+	<echo message="run.client.servicewithmodule" />
+	<echo message="run.client.all  -  run all clients" />
+    </target>
+    <target name="clean">
+	<delete dir="build" />
+    </target>
+</project>

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/conf/axis2.xml
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/conf/axis2.xml?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/conf/axis2.xml (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/conf/axis2.xml Mon Jul 11 21:10:36 2011
@@ -0,0 +1,289 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied. See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+ 
+<axisconfig name="AxisJava2.0">
+    <!-- ================================================= -->
+    <!-- Parameters -->
+    <!-- ================================================= -->
+    <parameter name="hotdeployment">true</parameter>
+    <parameter name="hotupdate">false</parameter>
+    <parameter name="enableMTOM">false</parameter>
+    <parameter name="enableSwA">false</parameter>
+
+    <!--Uncomment if you want to enable file caching for attachments -->
+    <!--parameter name="cacheAttachments">true</parameter>
+    <parameter name="attachmentDIR"></parameter>
+    <parameter name="sizeThreshold">4000</parameter-->
+
+    <!--This will give out the timout of the configuration contexts, in seconds-->
+    <parameter name="ConfigContextTimeoutInterval">30</parameter>
+
+    <!--During a fault, stacktrace can be sent with the fault message. The following flag will control -->
+    <!--that behaviour.-->
+    <parameter name="sendStacktraceDetailsWithFaults">false</parameter>
+
+    <!--If there aren't any information available to find out the fault reason, we set the message of the expcetion-->
+    <!--as the faultreason/Reason. But when a fault is thrown from a service or some where, it will be -->
+    <!--wrapped by different levels. Due to this the initial exception message can be lost. If this flag-->
+    <!--is set then, Axis2 tries to get the first exception and set its message as the faultreason/Reason.-->
+    <parameter name="DrillDownToRootCauseForFaultReason">false</parameter>
+
+    <parameter name="userName">admin</parameter>
+    <parameter name="password">axis2</parameter>
+
+    <!--To override repository/services you need to uncomment following parameter and value SHOULD be absolute file path.-->
+    <!--<parameter name="ServicesDirectory">service</parameter>-->
+    <!--To override repository/modules you need to uncomment following parameter and value SHOULD be absolute file path-->
+    <!--<parameter name="ModulesDirectory">modules</parameter>-->
+
+
+
+    <!--Following params will set the proper context paths for invocations. All the endpoints will have a commons context-->
+    <!--root which can configured using the following contextRoot parameter-->
+    <!--<parameter name="contextRoot">axis2</parameter>-->
+
+    <!--Our HTTP endpoints can handle both REST and SOAP. Following parameters can be used to distingiush those endpoints-->
+    <!--In case of a servlet, if you change this you have to manually change the settings of your servlet container to map this -->
+    <!--context path to proper Axis2 servlets-->
+    <!--<parameter name="servicePath">services</parameter>-->
+    <!--<parameter name="restPath">rest</parameter>-->
+
+
+    <!--Set the flag to true if you want to enable transport level session mangment-->
+    <parameter name="manageTransportSession">false</parameter>
+
+    <!-- Following parameter will completely disable REST handling in Axis2-->
+    <parameter name="disableREST" locked="true">false</parameter>
+
+    <!-- If you have a frontend host which exposes this webservice using a different public URL  -->
+    <!-- use this parameter to override autodetected url -->
+    <!--<parameter name="httpFrontendHostUrl">https://someotherhost/context</parameter>-->
+
+
+    <!--    The way of adding listener to the system-->
+    <!--    <listener class="org.apache.axis2.ObserverIMPL">-->
+    <!--        <parameter name="RSS_URL">http://127.0.0.1/rss</parameter>-->
+    <!--    </listener>-->
+
+    <!-- ================================================= -->
+    <!-- Message Receivers -->
+    <!-- ================================================= -->
+    <!--This is the Deafult Message Receiver for the system , if you want to have MessageReceivers for -->
+    <!--all the other MEP implement it and add the correct entry to here , so that you can refer from-->
+    <!--any operation -->
+    <!--Note : You can ovride this for particular service by adding the same element with your requirement-->
+    <messageReceivers>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+    </messageReceivers>
+
+    <!-- ================================================= -->
+    <!-- Message Formatter -->
+    <!-- ================================================= -->
+    <!--Following content type to message formatter mapping can be used to implement support for different message -->
+    <!--format  serialization in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageFormatters>
+        <messageFormatter contentType="application/x-www-form-urlencoded"
+                          class="org.apache.axis2.transport.http.XFormURLEncodedFormatter"/>
+        <messageFormatter contentType="application/xml"
+                          class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
+        <messageFormatter contentType="text/xml"
+                          class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
+        <messageFormatter contentType="application/echo+xml"
+                          class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
+    </messageFormatters>
+
+    <!-- ================================================= -->
+    <!-- Transport Ins -->
+    <!-- ================================================= -->
+    <transportReceiver name="http"
+                       class="org.apache.axis2.transport.http.SimpleHTTPServer">
+        <parameter name="port">6060</parameter>
+        <!-- Here is the complete list of supported parameters (see example settings further below):
+            port: the port to listen on (default 6060)
+            hostname:  if non-null, url prefix used in reply-to endpoint references                                 (default null)
+            originServer:  value of http Server header in outgoing messages                                         (default "Simple-Server/1.1")
+            requestTimeout:  value in millis of time that requests can wait for data                                (default 20000)
+            requestTcpNoDelay:  true to maximize performance and minimize latency                                   (default true)
+                                false to minimize bandwidth consumption by combining segments
+            requestCoreThreadPoolSize:  number of threads available for request processing (unless queue fills up)  (default 25)
+            requestMaxThreadPoolSize:  number of threads available for request processing if queue fills us         (default 150)
+                                       note that default queue never fills up:  see HttpFactory
+            threadKeepAliveTime:  time to keep threads in excess of core size alive while inactive                  (default 180)
+                                  note that no such threads can exist with default unbounded request queue
+            threadKeepAliveTimeUnit:  TimeUnit of value in threadKeepAliveTime (default SECONDS)                    (default SECONDS)
+        -->
+        <!-- <parameter name="hostname"                 >http://www.myApp.com/ws</parameter> -->
+        <!-- <parameter name="originServer"             >My-Server/1.1</parameter>           -->
+        <!-- <parameter name="requestTimeout"           >10000</parameter>                   -->
+        <!-- <parameter name="requestTcpNoDelay"        >false</parameter>                   -->
+        <!-- <parameter name="requestCoreThreadPoolSize">50</parameter>                      -->
+        <!-- <parameter name="requestMaxThreadPoolSize" >100</parameter>                     -->
+        <!-- <parameter name="threadKeepAliveTime"      >240000</parameter>                  -->
+        <!-- <parameter name="threadKeepAliveTimeUnit"  >MILLISECONDS</parameter>            -->
+    </transportReceiver>
+    
+    <!--Uncomment if you want to have TCP transport support-->
+    <!--transportReceiver name="tcp"
+                       class="org.apache.axis2.transport.tcp.TCPServer">
+        <parameter name="port">6060</parameter-->>
+        <!--If you want to give your own host address for EPR generation-->
+        <!--uncommet following paramter , and set as you required.-->
+        <!--<parameter name="hostname">tcp://myApp.com/ws</parameter>-->
+    <!-- /transportReceiver -->
+
+    <!-- ================================================= -->
+    <!-- Transport Outs -->
+    <!-- ================================================= -->
+
+    <!--Uncomment if you want to have TCP transport support-->
+    <!--
+    <transportSender name="tcp"
+                     class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
+    -->
+    <transportSender name="local"
+                     class="org.apache.axis2.transport.local.LocalTransportSender"/>
+    <transportSender name="http"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding">chunked</parameter>
+        
+        <!-- If following is set to 'true', optional action part of the Content-Type will not be added to the SOAP 1.2 messages -->
+        <!--  <parameter name="OmitSOAP12Action">true</parameter>  -->
+    </transportSender>
+    
+    <transportSender name="https"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding">chunked</parameter>
+    </transportSender>
+
+    <!-- ================================================= -->
+    <!-- Global Modules  -->
+    <!-- ================================================= -->
+    <!-- Comment this to disable Addressing -->
+    <module ref="addressing"/>
+
+    <!--Configuring module , providing parameters for modules whether they refer or not-->
+    <!--<moduleConfig name="addressing">-->
+    <!--<parameter name="addressingPara">N/A</parameter>-->
+    <!--</moduleConfig>-->
+
+    <!-- ================================================= -->
+    <!-- Clustering  -->
+    <!-- ================================================= -->
+    <!-- Configure and uncomment following for preparing Axis2 to a clustered environment -->
+    <!-- 
+    <cluster class="org.apache.axis2.cluster.tribes.TribesClusterManager">
+    	<parameter name="param1">value1</parameter>
+    </cluster>
+     -->
+     
+    <!-- ================================================= -->
+    <!-- Phases  -->
+    <!-- ================================================= -->
+    <phaseOrder type="InFlow">
+        <!--  System predefined phases       -->
+        <phase name="Transport">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+        </phase>
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+        </phase>
+        <phase name="RMPhase"/>
+        <!--  System predefined phases       -->
+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->
+        <phase name="OperationInPhase"/>
+        <phase name="soapmonitorPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="soapmonitorPhase"/>
+        <phase name="OperationOutPhase"/>
+        <!--system predefined phase-->
+        <!--these phase will run irrespective of the service-->
+        <phase name="RMPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+        <phase name="Security"/>
+    </phaseOrder>
+    <phaseOrder type="InFaultFlow">
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+        </phase>
+        <phase name="RMPhase"/>
+        <!--      user can add his own phases to this area  -->
+        <phase name="OperationInFaultPhase"/>
+        <phase name="soapmonitorPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFaultFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="soapmonitorPhase"/>
+        <phase name="OperationOutFaultPhase"/>
+        <phase name="RMPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+    </phaseOrder>
+</axisconfig>
+

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/ClientForWebServiceWithModule.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/ClientForWebServiceWithModule.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/ClientForWebServiceWithModule.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/ClientForWebServiceWithModule.java Mon Jul 11 21:10:36 2011
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package userguide.clients;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamException;
+import java.io.StringWriter;
+
+public class ClientForWebServiceWithModule {
+    private static EndpointReference targetEPR = new EndpointReference("http://127.0.0.1:8080/axis2/services/MyServiceWithModule");
+
+    public static void main(String[] args) {
+        try {
+            OMElement payload = ClientUtil.getEchoOMElement();
+            Options options = new Options();
+            options.setTo(targetEPR);
+            options.setAction("urn:echo");
+            options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+            ServiceClient sender = new ServiceClient();
+            sender.setOptions(options);
+            OMElement result = sender.sendReceive(payload);
+
+
+            StringWriter writer = new StringWriter();
+            result.serialize(XMLOutputFactory.newInstance()
+                    .createXMLStreamWriter(writer));
+            writer.flush();
+            System.out.println(writer.toString());
+
+
+        } catch (AxisFault axisFault) {
+            axisFault.printStackTrace();
+        } catch (XMLStreamException e) {
+            e.printStackTrace();
+        }
+    }
+}

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/ClientSideModuleEngagement.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/ClientSideModuleEngagement.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/ClientSideModuleEngagement.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/ClientSideModuleEngagement.java Mon Jul 11 21:10:36 2011
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package userguide.clients;
+
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+
+import javax.xml.namespace.QName;
+import java.io.File;
+import java.io.FileNotFoundException;
+
+/**
+ * Sample for engaged modules in Client side.
+ * Logging module has been used.
+ */
+public class ClientSideModuleEngagement {
+    public static void main(String[] args) throws Exception {
+        String home = System.getProperty("user.home");
+        // create this folder at your home. This folder could be anything
+        //then create the "modules" folder
+
+        File repository = new File(home + File.separator + "client-repository");
+        if (!repository.exists()) {
+            throw new FileNotFoundException("Repository Doesnot Exist");
+        }
+        //copy the LoggingModule.mar to "modules" folder.
+        //then modify the axis2.xml that is generating there according to
+        //phases that being included in the "module.xml"
+        ConfigurationContext configContext = ConfigurationContextFactory.
+                createConfigurationContextFromFileSystem(repository.getAbsolutePath(),
+                        repository.getName() + "/axis2.xml");
+        ServiceClient serviceClient = new ServiceClient(configContext, null);
+        serviceClient.engageModule("LoggingModule");
+    }
+}
+
+

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/ClientUtil.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/ClientUtil.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/ClientUtil.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/ClientUtil.java Mon Jul 11 21:10:36 2011
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package userguide.clients;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
+
+public class ClientUtil {
+
+    public static OMElement getEchoOMElement() {
+        OMFactory fac = OMAbstractFactory.getOMFactory();
+        OMNamespace omNs = fac.createOMNamespace(
+                "http://example1.org/example1", "example1");
+        OMElement method = fac.createOMElement("echo", omNs);
+        OMElement value = fac.createOMElement("Text", omNs);
+        value.addChild(fac.createOMText(value, "Axis2 Echo String "));
+        method.addChild(value);
+
+        return method;
+    }
+
+    public static OMElement getPingOMElement() {
+        OMFactory fac = OMAbstractFactory.getOMFactory();
+        OMNamespace omNs = fac.createOMNamespace(
+                "http://example1.org/example1", "example1");
+        OMElement method = fac.createOMElement("ping", omNs);
+        OMElement value = fac.createOMElement("Text", omNs);
+        value.addChild(fac.createOMText(value, "Axis2 Ping String "));
+        method.addChild(value);
+
+        return method;
+    }
+
+
+}

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/EchoBlockingClient.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/EchoBlockingClient.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/EchoBlockingClient.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/EchoBlockingClient.java Mon Jul 11 21:10:36 2011
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package userguide.clients;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+
+/**
+ * Sample for synchronous single channel blocking service invocation.
+ * Message Exchage Pattern IN-OUT
+ */
+public class EchoBlockingClient {
+    private static EndpointReference targetEPR = new EndpointReference("http://localhost:8080/axis2/services/MyService");
+
+    public static void main(String[] args) {
+        try {
+            OMElement payload = ClientUtil.getEchoOMElement();
+            Options options = new Options();
+            options.setTo(targetEPR);
+            options.setAction("urn:echo");
+
+            //Blocking invocation
+            ServiceClient sender = new ServiceClient();
+            sender.setOptions(options);
+            OMElement result = sender.sendReceive(payload);
+
+            System.out.println(result);
+
+        } catch (AxisFault axisFault) {
+            axisFault.printStackTrace();
+        }
+    }
+}

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/EchoBlockingDualClient.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/EchoBlockingDualClient.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/EchoBlockingDualClient.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/EchoBlockingDualClient.java Mon Jul 11 21:10:36 2011
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package userguide.clients;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLOutputFactory;
+import java.io.StringWriter;
+
+/**
+ * Sample for synchronous dual channel blocking service invocation.
+ * Message Exchage Pattern IN-OUT
+ */
+public class EchoBlockingDualClient {
+    private static EndpointReference targetEPR = new EndpointReference("http://127.0.0.1:8080/axis2/services/MyService");
+
+    public static void main(String[] args) {
+        ServiceClient sender = null;
+        try {
+            OMElement payload = ClientUtil.getEchoOMElement();
+            Options options = new Options();
+            options.setTo(targetEPR);
+            options.setAction("urn:echo");
+            //The boolean flag informs the axis2 engine to use two separate transport connection
+            //to retrieve the response.
+            options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+            options.setUseSeparateListener(true);
+
+            //Blocking Invocation
+            sender = new ServiceClient();
+            sender.engageModule(Constants.MODULE_ADDRESSING);
+            sender.setOptions(options);
+            OMElement result = sender.sendReceive(payload);
+
+            StringWriter writer = new StringWriter();
+            result.serialize(XMLOutputFactory.newInstance()
+                    .createXMLStreamWriter(writer));
+            writer.flush();
+            System.out.println(writer.toString());
+
+            //Need to close the Client Side Listener.
+
+        } catch (AxisFault axisFault) {
+            axisFault.printStackTrace();
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        } finally{
+            try {
+                sender.cleanup();
+            } catch (AxisFault axisFault) {
+                //
+            }
+        }
+
+    }
+}

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/EchoBlockingWsaBasedClient.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/EchoBlockingWsaBasedClient.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/EchoBlockingWsaBasedClient.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/EchoBlockingWsaBasedClient.java Mon Jul 11 21:10:36 2011
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package userguide.clients;
+
+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.Constants;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+
+import java.io.StringWriter;
+
+/**
+ * To run this sample you have to deploy WsaMappingService.aar to the
+ * service folder.
+ */
+public class EchoBlockingWsaBasedClient {
+
+    private static EndpointReference targetEPR = new EndpointReference("http://localhost:8080/axis2/services/WsaMappingTest");
+
+    private static OMElement getBody() {
+        OMFactory fac = OMAbstractFactory.getOMFactory();
+        OMNamespace omNs = fac
+                .createOMNamespace("http://example1.org/example1", "example1");
+        OMElement id = fac.createOMElement("id", omNs);
+        id.addChild(fac.createOMText(id, "Axis2"));
+        return id;
+    }
+
+    public static void main(String[] args) throws Exception {
+        Options options = new Options();
+        options.setTo(targetEPR);
+        options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+        //Blocking invocation via wsa mapping
+        options.setAction("urn:echo");
+
+        ServiceClient sender = new ServiceClient();
+        sender.setOptions(options);
+        OMElement result = sender.sendReceive(getBody());
+
+        StringWriter writer = new StringWriter();
+        result.serialize(writer);
+        writer.flush();
+
+        System.out.println(writer.toString());
+
+    }
+}

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/EchoNonBlockingClient.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/EchoNonBlockingClient.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/EchoNonBlockingClient.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/EchoNonBlockingClient.java Mon Jul 11 21:10:36 2011
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package userguide.clients;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.client.async.AsyncResult;
+import org.apache.axis2.client.async.Callback;
+
+/**
+ * Sample for asynchronous single channel non-blocking service invocation.
+ * Message Exchage Pattern IN-OUT
+ */
+public class EchoNonBlockingClient {
+    private static EndpointReference targetEPR = new EndpointReference("http://127.0.0.1:8080/axis2/services/MyService");
+
+    public static void main(String[] args) {
+        ServiceClient sender = null;
+        try {
+            OMElement payload = ClientUtil.getEchoOMElement();
+            Options options = new Options();
+            options.setTo(targetEPR);
+            options.setAction("urn:echo");
+
+            //Callback to handle the response
+            Callback callback = new Callback() {
+                public void onComplete(AsyncResult result) {
+                    System.out.println(result.getResponseEnvelope());
+                }
+
+                public void onError(Exception e) {
+                    e.printStackTrace();
+                }
+            };
+
+            //Non-Blocking Invocation
+            sender = new ServiceClient();
+            sender.setOptions(options);
+            sender.sendReceiveNonBlocking(payload, callback);
+
+            //Wait till the callback receives the response.
+            while (!callback.isComplete()) {
+                Thread.sleep(1000);
+            }
+
+        } catch (AxisFault axisFault) {
+            axisFault.printStackTrace();
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        } finally {
+            try {
+                sender.cleanup();
+            } catch (AxisFault axisFault) {
+                //
+            }
+        }
+
+    }
+}

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/EchoNonBlockingDualClient.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/EchoNonBlockingDualClient.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/EchoNonBlockingDualClient.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/EchoNonBlockingDualClient.java Mon Jul 11 21:10:36 2011
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package userguide.clients;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.client.async.AsyncResult;
+import org.apache.axis2.client.async.Callback;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Sample for asynchronous dual channel non-blocking service invocation.
+ * Message Exchage Pattern IN-OUT
+ * Ulitmate asynchronous service invocation sample.
+ */
+public class EchoNonBlockingDualClient {
+    private static EndpointReference targetEPR = new EndpointReference("http://127.0.0.1:8080/axis2/services/MyService");
+
+    public static void main(String[] args) {
+        ServiceClient sender = null;
+        try {
+            OMElement payload = ClientUtil.getEchoOMElement();
+
+            Options options = new Options();
+            options.setTo(targetEPR);
+            options.setAction("urn:echo");
+            options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+            options.setUseSeparateListener(true);
+            options.setAction("urn:echo");  // this is the action mapping we put within the service.xml
+
+            //Callback to handle the response
+            Callback callback = new Callback() {
+                public void onComplete(AsyncResult result) {
+                    System.out.println(result.getResponseEnvelope());
+                }
+
+                public void onError(Exception e) {
+                    e.printStackTrace();
+                }
+            };
+
+            //Non-Blocking Invocation
+            sender = new ServiceClient();
+            sender.engageModule(Constants.MODULE_ADDRESSING);
+            sender.setOptions(options);
+            sender.sendReceiveNonBlocking(payload, callback);
+
+            //Wait till the callback receives the response.
+            while (!callback.isComplete()) {
+                Thread.sleep(1000);
+            }
+            //Need to close the Client Side Listener.
+
+        } catch (AxisFault axisFault) {
+            axisFault.printStackTrace();
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        } finally {
+            try {
+                sender.cleanup();
+            } catch (AxisFault axisFault) {
+                //have to ignore this
+            }
+        }
+
+    }
+}

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/MailClient.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/MailClient.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/MailClient.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/MailClient.java Mon Jul 11 21:10:36 2011
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package userguide.clients;
+
+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.AxisFault;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+
+/**
+ * This is a Client progam that accesses 'MyService' web service in Axis2 samples
+ * @deprecated 
+ */
+public class MailClient {
+
+    private static String toEpr = "http://localhost:8080/axis2/services/myservice";
+
+    public static void main(String[] args) throws AxisFault {
+        Options options = new Options();
+        options.setTo(
+                new EndpointReference(toEpr));
+        options.setAction("urn:echo");
+        ServiceClient servicClient = new ServiceClient();
+
+        servicClient.setOptions(options);
+
+        servicClient.sendRobust(getPayload());
+    }
+
+    private static OMElement getPayload() {
+        OMFactory fac = OMAbstractFactory.getOMFactory();
+        OMNamespace omNs = fac.createOMNamespace(
+                "http://example1.org/example1", "example1");
+        OMElement method = fac.createOMElement("echo", omNs);
+        OMElement value = fac.createOMElement("Text", omNs);
+        value.addChild(fac.createOMText(value, "Axis2 Echo String "));
+        method.addChild(value);
+
+        return method;
+    }
+}

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/PingClient.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/PingClient.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/PingClient.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/PingClient.java Mon Jul 11 21:10:36 2011
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package userguide.clients;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+
+/**
+ * Sample for fire-and-forget service invocation
+ * Message Exchage Pattern IN-Only
+ */
+public class PingClient {
+    private static EndpointReference targetEPR = new EndpointReference("http://localhost:8080/axis2/services/MyService");
+
+    public static void main(String[] args) {
+        try {
+            OMElement payload = ClientUtil.getPingOMElement();
+            ServiceClient serviceClient = new ServiceClient();
+
+            Options options = new Options();
+            serviceClient.setOptions(options);
+            options.setTo(targetEPR);
+            options.setAction("urn:ping");
+
+            serviceClient.fireAndForget(payload);
+            /**
+             * We have to bock this thread untill we send the request , the problem
+             * is if we go out of the main thread , then request wont send ,so
+             * you have to wait some time :)
+             */
+          Thread.sleep(500);
+
+        } catch (AxisFault axisFault) {
+            axisFault.printStackTrace();
+        } catch (InterruptedException e) {
+            //
+        }
+    }
+
+}

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/RESTClient.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/RESTClient.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/RESTClient.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/RESTClient.java Mon Jul 11 21:10:36 2011
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package userguide.clients;
+
+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.AxisFault;
+import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.FactoryConfigurationError;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/**
+ * This is a Client progam that accesses 'MyService' web service in Axis2 samples
+ */
+public class RESTClient {
+
+    private static String toEpr = "http://localhost:8080/axis2/services/MyService";
+
+    public static void main(String[] args) throws AxisFault {
+
+        Options options = new Options();
+        options.setTo(new EndpointReference(toEpr));
+        options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+        options.setProperty(Constants.Configuration.ENABLE_REST, Constants.VALUE_TRUE);
+
+        ServiceClient sender = new ServiceClient();
+        sender.engageModule(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(
+                "http://example1.org/example1", "example1");
+        OMElement method = fac.createOMElement("echo", omNs);
+        OMElement value = fac.createOMElement("Text", omNs);
+        value.addChild(fac.createOMText(value, "Axis2 Echo String "));
+        method.addChild(value);
+
+        return method;
+    }
+}

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/TCPClient.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/TCPClient.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/TCPClient.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/clients/TCPClient.java Mon Jul 11 21:10:36 2011
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package userguide.clients;
+
+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.AxisFault;
+import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.FactoryConfigurationError;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/**
+ * This is a Client progam that accesses 'MyService' web service in Axis2 samples
+ */
+public class TCPClient {
+
+    private static String toEpr = "tcp://localhost:8080/axis2/services/MyService";
+
+    public static void main(String[] args) throws AxisFault {
+
+        Options options = new Options();
+        options.setTo(new EndpointReference(toEpr));
+        options.setTransportInProtocol(Constants.TRANSPORT_TCP);
+        options.setAction("urn:echo");
+
+        ServiceClient sender = new ServiceClient();
+        sender.engageModule(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(
+                "tcp://localhost:8080/axis2/services/MyService", "example1");
+        OMElement method = fac.createOMElement("echo", omNs);
+        OMElement value = fac.createOMElement("Text", omNs);
+        value.addChild(fac.createOMText(value, "Axis2 Echo String "));
+        method.addChild(value);
+
+        return method;
+    }
+}

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/example1/META-INF/services.xml
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/example1/META-INF/services.xml?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/example1/META-INF/services.xml (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/example1/META-INF/services.xml Mon Jul 11 21:10:36 2011
@@ -0,0 +1,33 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied. See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<service name="MyService">
+    <description>
+        This is a sample Web Service with two operations,echo and ping.
+    </description>
+    <parameter name="ServiceClass">userguide.example1.MyService</parameter>
+    <operation name="echo">
+        <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <actionMapping>urn:echo</actionMapping>
+    </operation>
+    <operation name="ping">
+        <messageReceiver class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <actionMapping>urn:ping</actionMapping>
+    </operation>
+</service>
\ No newline at end of file

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/example1/MyService.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/example1/MyService.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/example1/MyService.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/example1/MyService.java Mon Jul 11 21:10:36 2011
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package userguide.example1;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axis2.AxisFault;
+
+import javax.xml.stream.XMLStreamException;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: Jaliya
+ * Date: Jun 2, 2005
+ * Time: 2:17:58 PM
+ */
+public class MyService {
+    public OMElement echo(OMElement element) throws XMLStreamException {
+        //Praparing the OMElement so that it can be attached to another OM Tree.
+        //First the OMElement should be completely build in case it is not fully built and still
+        //some of the xml is in the stream.
+        element.build();
+        //Secondly the OMElement should be detached from the current OMTree so that it can be attached
+        //some other OM Tree. Once detached the OmTree will remove its connections to this OMElement.
+        element.detach();
+        return element;
+    }
+
+    public void ping(OMElement element) throws XMLStreamException {
+        //Do some processing
+    }
+    public void pingF(OMElement element) throws AxisFault{
+        throw new AxisFault("Fault being thrown");
+    }
+}

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/example2/META-INF/services.xml
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/example2/META-INF/services.xml?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/example2/META-INF/services.xml (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/example2/META-INF/services.xml Mon Jul 11 21:10:36 2011
@@ -0,0 +1,34 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied. See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<service name="MyServiceWithModule">
+    <description>
+        This is a sample Web Service with a logging module engaged.
+    </description>
+    <module ref="sample-logging"/>
+    <parameter name="ServiceClass">userguide.example2.MyService</parameter>
+    <operation name="echo">
+        <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <actionMapping>urn:echo</actionMapping>
+    </operation>
+    <operation name="ping">
+        <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <actionMapping>urn:ping</actionMapping>
+    </operation>
+</service>

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/example2/MyService.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/example2/MyService.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/example2/MyService.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/example2/MyService.java Mon Jul 11 21:10:36 2011
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package userguide.example2;
+
+import org.apache.axiom.om.OMElement;
+
+import javax.xml.stream.XMLStreamException;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: Jaliya
+ * Date: Jun 2, 2005
+ * Time: 2:17:58 PM
+ */
+public class MyService {
+    public OMElement echo(OMElement element) throws XMLStreamException {
+        //Praparing the OMElement so that it can be attached to another OM Tree.
+        //First the OMElement should be completely build in case it is not fully built and still
+        //some of the xml is in the stream.
+        element.build();
+        //Secondly the OMElement should be detached from the current OMTree so that it can be attached
+        //some other OM Tree. Once detached the OmTree will remove its connections to this OMElement.
+        element.detach();
+        return element;
+    }
+
+    public void ping(OMElement element) throws XMLStreamException {
+        //Do some processing
+    }
+}

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/example3/META-INF/services.xml
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/example3/META-INF/services.xml?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/example3/META-INF/services.xml (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/example3/META-INF/services.xml Mon Jul 11 21:10:36 2011
@@ -0,0 +1,32 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied. See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<serviceGroup>
+    <service name="WsaMappingTest">
+        <description>
+            Sample to via WSA Mapping
+        </description>
+        <parameter name="ServiceClass">userguide.example3.MyService</parameter>
+        <operation name="echo">
+            <messageReceiver
+                    class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+            <actionMapping>urn:echo</actionMapping>
+        </operation>
+    </service>
+</serviceGroup>
\ No newline at end of file

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/example3/MyService.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/example3/MyService.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/example3/MyService.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/example3/MyService.java Mon Jul 11 21:10:36 2011
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package userguide.example3;
+
+import org.apache.axiom.om.OMElement;
+
+import javax.xml.stream.XMLStreamException;
+
+
+public class MyService {
+    public OMElement echo(OMElement element) throws XMLStreamException {
+            //Praparing the OMElement so that it can be attached to another OM Tree.
+            //First the OMElement should be completely build in case it is not fully built and still
+            //some of the xml is in the stream.
+            element.build();
+            //Secondly the OMElement should be detached from the current OMTree so that it can be attached
+            //some other OM Tree. Once detached the OmTree will remove its connections to this OMElement.
+            element.detach();
+            return element;
+        }
+
+}

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/loggingmodule/LogHandler.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/loggingmodule/LogHandler.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/loggingmodule/LogHandler.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/loggingmodule/LogHandler.java Mon Jul 11 21:10:36 2011
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package userguide.loggingmodule;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.engine.Handler;
+import org.apache.axis2.handlers.AbstractHandler;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import javax.xml.namespace.QName;
+
+public class LogHandler extends AbstractHandler implements Handler {
+	private static final Log log = LogFactory.getLog(LogHandler.class);
+    private String name;
+
+    public String getName() {
+        return name;
+    }
+
+    public InvocationResponse invoke(MessageContext msgContext) throws AxisFault {
+        log.info(msgContext.getEnvelope().toString());
+        return InvocationResponse.CONTINUE;        
+    }
+
+    public void revoke(MessageContext msgContext) {
+        log.info(msgContext.getEnvelope().toString());
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+}

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/loggingmodule/LoggingModule.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/loggingmodule/LoggingModule.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/loggingmodule/LoggingModule.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/loggingmodule/LoggingModule.java Mon Jul 11 21:10:36 2011
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package userguide.loggingmodule;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.description.AxisDescription;
+import org.apache.axis2.description.AxisModule;
+import org.apache.axis2.modules.Module;
+import org.apache.neethi.Assertion;
+import org.apache.neethi.Policy;
+
+public class LoggingModule implements Module {
+
+
+    // initialize the module
+    public void init(ConfigurationContext configContext, AxisModule module) throws AxisFault {
+    }
+
+    public void engageNotify(AxisDescription axisDescription) throws AxisFault {
+    }
+
+    // shutdown the module
+    public void shutdown(ConfigurationContext configurationContext) throws AxisFault {
+    }
+    
+    public String[] getPolicyNamespaces() {
+    	return null;	
+    }
+
+    public void applyPolicy(Policy policy, AxisDescription axisDescription) throws AxisFault {
+    }
+		   
+    public boolean canSupportAssertion(Assertion assertion) {
+        return true;
+    }
+}

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/loggingmodule/META-INF/module.xml
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/loggingmodule/META-INF/module.xml?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/loggingmodule/META-INF/module.xml (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/userguide/src/userguide/loggingmodule/META-INF/module.xml Mon Jul 11 21:10:36 2011
@@ -0,0 +1,44 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied. See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<module name="sample-logging" class="userguide.loggingmodule.LoggingModule">
+    <InFlow>
+        <handler name="InFlowLogHandler" class="userguide.loggingmodule.LogHandler">
+            <order phase="loggingPhase"/>
+        </handler>
+    </InFlow>
+
+    <OutFlow>
+        <handler name="OutFlowLogHandler" class="userguide.loggingmodule.LogHandler">
+            <order phase="loggingPhase"/>
+        </handler>
+    </OutFlow>
+
+    <OutFaultFlow>
+        <handler name="FaultOutFlowLogHandler" class="userguide.loggingmodule.LogHandler">
+            <order phase="loggingPhase"/>
+        </handler>
+    </OutFaultFlow>
+
+    <InFaultFlow>
+        <handler name="FaultInFlowLogHandler" class="userguide.loggingmodule.LogHandler">
+            <order phase="loggingPhase"/>
+        </handler>
+    </InFaultFlow>
+</module>

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/version/README.txt
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/version/README.txt?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/version/README.txt (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/version/README.txt Mon Jul 11 21:10:36 2011
@@ -0,0 +1,28 @@
+Sample: Version
+===============
+
+Introduction
+============
+
+A simple service that returns a text which contains the version number and the built 
+date of the Axis2 Distribution used.
+
+In other words, this is a simple service used by many to test whether the distribution they got is setup 
+and working properly. It contains a single method that simply returns version and built 
+date of the Axis2 distribution used.
+
+
+Pre-Requisites
+==============
+
+Apache Ant 1.6.2 or later
+
+Running the Sample
+==================
+
+Type $ant from Axis2_HOME/samples/version
+
+
+Help
+====
+Please contact axis-user list (axis-user@ws.apache.org) if you have any trouble running the sample.
\ No newline at end of file

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/version/build.xml
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/version/build.xml?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/version/build.xml (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/version/build.xml Mon Jul 11 21:10:36 2011
@@ -0,0 +1,64 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied. See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project name="version" basedir="." default="generate.service">
+	
+	<property name="dest.dir" value="build" />
+	
+	<property name="dest.dir.classes" value="${dest.dir}/classes" />
+	
+	<property name="axis2.home" value="../../" />
+	
+	<property name="repository.path" value="${axis2.home}/repository/services" />
+	
+	<path id="build.class.path">
+		<fileset dir="${axis2.home}/lib">
+			<include name="*.jar" />
+		</fileset>
+	</path>
+	
+	<target name="clean">
+		<delete dir="${dest.dir}" />
+	</target>
+	
+	<target name="prepare">
+		
+		<mkdir dir="${dest.dir}" />
+		
+		<mkdir dir="${dest.dir.classes}" />
+		
+		<mkdir dir="${dest.dir.classes}/META-INF" />
+	
+	</target>
+	
+	<target name="generate.service" depends="clean,prepare">
+		
+		<copy file="src/sample/axisversion/META-INF/services.xml" tofile="${dest.dir.classes}/META-INF/services.xml" overwrite="true" />
+		
+		<javac srcdir="src" destdir="${dest.dir.classes}" includes="sample/axisversion/**">
+			<classpath refid="build.class.path" />
+		</javac>
+		
+		<jar basedir="${dest.dir.classes}" destfile="${dest.dir}/version.aar" />
+		
+		<copy file="${dest.dir}/version.aar" tofile="${repository.path}/version.aar" overwrite="true" />
+	
+	</target>
+	
+</project>