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 [19/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/mtom/build.xml
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/mtom/build.xml?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/mtom/build.xml (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/mtom/build.xml Mon Jul 11 21:10:36 2011
@@ -0,0 +1,130 @@
+<!--
+  ~ 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="mtom" basedir="." default="generate.service">
+
+	<property environment="env" />
+	<property name="build.dir" value="${basedir}/build" />
+	<property name="client.dir" value="${build.dir}/client" />
+	<property name="service.dir" value="${build.dir}/service" />
+	<property name="client.classes.dir" value="${client.dir}/classes" />
+	<property name="skeleton.path" value="src/sample/mtom/service/MTOMSampleSkeleton.java" />
+	<property name="client.path" value="src/sample/mtom/client/Client.java" />
+	<!-- USE AXIS2_HOME FOR THIS -->
+	<property name="lib.dir" value="../lib" />
+
+	<path id="class.path">
+		<fileset dir="../../lib">
+			<include name="**/*.jar" />
+		</fileset>
+	</path>
+
+	<!-- Create Service -->
+	<target name="generate.service">
+
+		<java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
+			<arg value="-uri" />
+			<arg value="${basedir}/resources/MTOMSample.wsdl" />
+			<arg value="-ss" />
+                  <arg value="-ap" />
+			<arg value="-sd" />
+			<arg value="-p" />
+			<arg value="sample.mtom.service" />
+			<arg value="-o" />
+			<arg value="${service.dir}" />
+			<classpath refid="class.path" />
+		</java>
+		<copy file="${skeleton.path}" tofile="${service.dir}/${skeleton.path}" overwrite="true" />
+		<antcall target="jar.server"/>
+		<copy file="${service.dir}/sample-mtom.aar" tofile="../../repository/services/sample-mtom.aar" overwrite="true"/>
+	</target>
+	<target name="check-parameters">
+		<condition property="parameters.set">
+			<and>
+				<isset property="dest" />
+				<isset property="file" />
+			</and>
+		</condition>
+		<!-- This is a hack to get an if-else working in ant. Some much more "ANTy" person is welcome to improve this -->
+		<antcall target="print-usage" />
+	</target>
+
+	<target name="print-usage" unless="parameters.set">
+		<echo message="ant run.client -Dfile &lt;file to be transferred&gt;  -Ddest &lt;name of the destination file&gt;" />
+	</target>
+
+	<!-- Generate Client -->
+	<target name="generate.client">
+		<java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
+			<arg value="-uri" />
+			<arg value="resources/MTOMSample.wsdl" />
+			<arg value="-p" />
+			<arg value="-ap" />
+			<arg value="sample.mtom.service" />
+			<arg value="-o" />
+			<arg value="${client.dir}" />
+			<classpath refid="class.path" />
+		</java>
+
+		<copy file="${client.path}" tofile="${client.dir}/${client.path}" overwrite="true" />
+
+		<mkdir dir="${client.classes.dir}" />
+		<!-- Compile client -->
+		<javac srcdir="${client.dir}/src" destdir="${client.classes.dir}" fork="true">
+			<classpath refid="class.path" />
+		</javac>
+    </target>	
+
+	<!-- Run Client -->
+	<target name="run.client" depends="check-parameters,generate.client" if="parameters.set">
+		<!-- Accept two arguments from the command line, Also use the class.path set earlier -->
+		<java classname="sample.mtom.client.Client" fork="true">
+			<arg value="-file" />
+			<arg value="${file}" />
+			<arg value="-dest" />
+			<arg value="${dest}" />
+			<classpath>
+				<fileset dir="../../lib">
+					<include name="**/*.jar" />
+				</fileset>
+				<dirset dir="${client.classes.dir}" />
+			</classpath>
+		</java>
+	</target>
+	<target  name="jar.server">
+		<mkdir dir="${service.dir}/classes" />
+		<javac debug="on" memoryMaximumSize="256m" memoryInitialSize="256m" fork="true" 		destdir="${service.dir}/classes" srcdir="${service.dir}/src">
+		<classpath refid="class.path"/>
+		</javac>
+
+		<copy toDir="${service.dir}/classes/META-INF" failonerror="false">
+		<fileset dir="${service.dir}/resources">
+		<include name="*.xml"/>
+		<include name="*.wsdl"/>
+		<include name="*.xsd"/>
+		</fileset>
+		</copy>
+		<jar destfile="${service.dir}/sample-mtom.aar">
+		<fileset excludes="**/Test.class" dir="${service.dir}/classes"/>
+		</jar>
+	</target>
+	<target name="clean">
+		<delete dir="build" />
+	</target>
+</project>

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/mtom/resources/MTOMSample.wsdl
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/mtom/resources/MTOMSample.wsdl?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/mtom/resources/MTOMSample.wsdl (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/mtom/resources/MTOMSample.wsdl Mon Jul 11 21:10:36 2011
@@ -0,0 +1,103 @@
+<!--
+  ~ 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.
+  -->
+
+<wsdl:definitions xmlns:tns="http://ws.apache.org/axis2/mtomsample/"
+	xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
+	xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
+	xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
+	xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
+	xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
+	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+	xmlns="http://schemas.xmlsoap.org/wsdl/"
+	targetNamespace="http://ws.apache.org/axis2/mtomsample/">
+	<wsdl:types>
+		<xsd:schema xmlns="http://schemas.xmlsoap.org/wsdl/"
+			attributeFormDefault="qualified" elementFormDefault="qualified"
+			targetNamespace="http://ws.apache.org/axis2/mtomsample/">
+			<xsd:import namespace="http://www.w3.org/2005/05/xmlmime"
+				schemaLocation="xmime.xsd" />
+			<xsd:complexType name="AttachmentType">
+				<xsd:sequence>
+					<xsd:element minOccurs="0" name="fileName"
+						type="xsd:string" />
+					<xsd:element minOccurs="0" name="binaryData"
+						type="xmime:base64Binary" />
+				</xsd:sequence>
+			</xsd:complexType>
+			<xsd:element name="AttachmentRequest" type="tns:AttachmentType" />
+			<xsd:element name="AttachmentResponse" type="xsd:string" />
+		</xsd:schema>
+	</wsdl:types>
+	<wsdl:message name="AttachmentRequest">
+		<wsdl:part name="part1" element="tns:AttachmentRequest" />
+	</wsdl:message>
+	<wsdl:message name="AttachmentResponse">
+		<wsdl:part name="part1" element="tns:AttachmentResponse" />
+	</wsdl:message>
+	<wsdl:portType name="MTOMServicePortType">
+		<wsdl:operation name="attachment">
+			<wsdl:input message="tns:AttachmentRequest"
+				wsaw:Action="attachment" />
+			<wsdl:output message="tns:AttachmentResponse"
+				wsaw:Action="http://schemas.xmlsoap.org/wsdl/MTOMServicePortType/AttachmentResponse" />
+		</wsdl:operation>
+	</wsdl:portType>
+	<wsdl:binding name="MTOMServiceSOAP11Binding"
+		type="tns:MTOMServicePortType">
+		<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
+			style="document" />
+		<wsdl:operation name="attachment">
+			<soap:operation soapAction="attachment" style="document" />
+			<wsdl:input>
+				<soap:body use="literal" />
+			</wsdl:input>
+			<wsdl:output>
+				<soap:body use="literal" />
+			</wsdl:output>
+		</wsdl:operation>
+	</wsdl:binding>
+	<wsdl:binding name="MTOMServiceSOAP12Binding"
+		type="tns:MTOMServicePortType">
+		<soap12:binding transport="http://schemas.xmlsoap.org/soap/http"
+			style="document" />
+		<wsdl:operation name="attachment">
+			<soap12:operation soapAction="attachment" style="document" />
+			<wsdl:input>
+				<soap12:body use="literal" />
+			</wsdl:input>
+			<wsdl:output>
+				<soap12:body use="literal" />
+			</wsdl:output>
+		</wsdl:operation>
+	</wsdl:binding>
+	<wsdl:service name="MTOMSample">
+		<wsdl:port name="MTOMSampleSOAP11port_http"
+			binding="tns:MTOMServiceSOAP11Binding">
+			<soap:address
+				location="http://localhost:8080/axis2/services/MTOMSample" />
+		</wsdl:port>
+		<wsdl:port name="MTOMSampleSOAP12port_http"
+			binding="tns:MTOMServiceSOAP12Binding">
+			<soap12:address
+				location="http://localhost:8080/axis2/services/MTOMSample" />
+		</wsdl:port>
+	</wsdl:service>
+</wsdl:definitions>
\ No newline at end of file

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/mtom/resources/xmime.xsd
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/mtom/resources/xmime.xsd?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/mtom/resources/xmime.xsd (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/mtom/resources/xmime.xsd Mon Jul 11 21:10:36 2011
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+
+<!--
+  ~ 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.
+  -->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+	xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
+	targetNamespace="http://www.w3.org/2005/05/xmlmime">
+	<xs:attribute name="contentType">
+		<xs:simpleType>
+			<xs:restriction base="xs:string">
+				<xs:minLength value="3" />
+			</xs:restriction>
+		</xs:simpleType>
+	</xs:attribute>
+	<xs:attribute name="expectedContentTypes" type="xs:string" />
+	<xs:complexType name="base64Binary">
+		<xs:simpleContent>
+			<xs:extension base="xs:base64Binary">
+				<xs:attribute ref="xmime:contentType" />
+			</xs:extension>
+		</xs:simpleContent>
+	</xs:complexType>
+	<xs:complexType name="hexBinary">
+		<xs:simpleContent>
+			<xs:extension base="xs:hexBinary">
+				<xs:attribute ref="xmime:contentType" />
+			</xs:extension>
+		</xs:simpleContent>
+	</xs:complexType>
+</xs:schema>

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/mtom/src/sample/mtom/client/Client.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/mtom/src/sample/mtom/client/Client.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/mtom/src/sample/mtom/client/Client.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/mtom/src/sample/mtom/client/Client.java Mon Jul 11 21:10:36 2011
@@ -0,0 +1,124 @@
+/*
+ * 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 sample.mtom.client;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.rmi.RemoteException;
+import java.util.List;
+import java.util.Map;
+
+import javax.activation.DataHandler;
+import javax.activation.FileDataSource;
+
+import org.apache.axis2.Constants;
+import org.apache.axis2.util.CommandLineOption;
+import org.apache.axis2.util.CommandLineOptionParser;
+import org.apache.axis2.util.OptionsValidator;
+import org.apache.ws.axis2.mtomsample.MTOMSampleMTOMSampleSOAP11Port_httpStub;
+
+
+public class Client {
+
+	/**
+	 * @param args
+	 * @throws Exception
+	 */
+	public static void main(String[] args) throws Exception {
+		CommandLineOptionParser optionsParser = new CommandLineOptionParser(
+				args);
+		List invalidOptionsList = optionsParser
+				.getInvalidOptions(new OptionsValidator() {
+					public boolean isInvalid(CommandLineOption option) {
+						String optionType = option.getOptionType();
+						return !("dest".equalsIgnoreCase(optionType) || "file"
+								.equalsIgnoreCase(optionType));
+					}
+				});
+
+		if ((invalidOptionsList.size() > 0) || (args.length != 4)) {
+			// printUsage();
+			System.out.println("Invalid Parameters.");
+			return;
+		}
+
+		Map optionsMap = optionsParser.getAllOptions();
+
+		CommandLineOption fileOption = (CommandLineOption) optionsMap
+				.get("file");
+		CommandLineOption destinationOption = (CommandLineOption) optionsMap
+				.get("dest");
+		File file = new File(fileOption.getOptionValue());
+		if (file.exists())
+			transferFile(file, destinationOption.getOptionValue());
+		else
+			throw new FileNotFoundException();
+	}
+
+	public static void transferFile(File file, String destination)
+			throws RemoteException {
+		// uncomment the following if you need to capture the messages from
+		// TCPMON. Please look at http://ws.apache.org/commons/tcpmon/tcpmontutorial.html
+		// to learn how to setup tcpmon
+		MTOMSampleMTOMSampleSOAP11Port_httpStub serviceStub = new MTOMSampleMTOMSampleSOAP11Port_httpStub(
+				//"http://localhost:8081/axis2/rest/MTOMSample"
+		);
+
+		// Enable MTOM in the client side
+		serviceStub._getServiceClient().getOptions().setProperty(
+				Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
+		//Increase the time out when sending large attachments
+		serviceStub._getServiceClient().getOptions().setTimeOutInMilliSeconds(10000);
+
+		// Uncomment and fill the following if you want to have client side file
+		// caching switched ON.
+		/*
+		 * serviceStub._getServiceClient().getOptions().setProperty(
+		 * Constants.Configuration.CACHE_ATTACHMENTS, Constants.VALUE_TRUE);
+		 * serviceStub._getServiceClient().getOptions().setProperty(
+		 * Constants.Configuration.ATTACHMENT_TEMP_DIR, "your temp dir");
+		 * serviceStub._getServiceClient().getOptions().setProperty(
+		 * Constants.Configuration.FILE_SIZE_THRESHOLD, "4000");
+		 */
+
+		// Populating the code generated beans
+		MTOMSampleMTOMSampleSOAP11Port_httpStub.AttachmentRequest attachmentRequest = new MTOMSampleMTOMSampleSOAP11Port_httpStub.AttachmentRequest();
+		MTOMSampleMTOMSampleSOAP11Port_httpStub.AttachmentType attachmentType = new MTOMSampleMTOMSampleSOAP11Port_httpStub.AttachmentType();
+		MTOMSampleMTOMSampleSOAP11Port_httpStub.Base64Binary base64Binary = new MTOMSampleMTOMSampleSOAP11Port_httpStub.Base64Binary();
+
+		// Creating a javax.activation.FileDataSource from the input file.
+		FileDataSource fileDataSource = new FileDataSource(file);
+
+		// Create a dataHandler using the fileDataSource. Any implementation of
+		// javax.activation.DataSource interface can fit here.
+		DataHandler dataHandler = new DataHandler(fileDataSource);
+		base64Binary.setBase64Binary(dataHandler);
+        MTOMSampleMTOMSampleSOAP11Port_httpStub.ContentType_type0 param = new MTOMSampleMTOMSampleSOAP11Port_httpStub.ContentType_type0();
+        param.setContentType_type0(dataHandler.getContentType());
+        base64Binary.setContentType(param);
+		attachmentType.setBinaryData(base64Binary);
+		attachmentType.setFileName(destination);
+		attachmentRequest.setAttachmentRequest(attachmentType);
+
+		MTOMSampleMTOMSampleSOAP11Port_httpStub.AttachmentResponse response = serviceStub.attachment(attachmentRequest);
+		System.out.println(response.getAttachmentResponse());
+	}
+
+}

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/mtom/src/sample/mtom/service/MTOMSampleSkeleton.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/mtom/src/sample/mtom/service/MTOMSampleSkeleton.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/mtom/src/sample/mtom/service/MTOMSampleSkeleton.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/mtom/src/sample/mtom/service/MTOMSampleSkeleton.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 sample.mtom.service;
+
+import java.io.File;
+import java.io.FileOutputStream;
+
+import javax.activation.DataHandler;
+
+import org.apache.ws.axis2.mtomsample.AttachmentResponse;
+import org.apache.ws.axis2.mtomsample.AttachmentType;
+import org.w3.www._2005._05.xmlmime.Base64Binary;
+
+/**
+ * MTOMServiceSkeleton java skeleton for the axisService
+ */
+public class MTOMSampleSkeleton {
+
+	/**
+	 * Auto generated method signature
+	 * 
+	 * @param param0
+	 * @throws Exception 
+	 * 
+	 */
+	public org.apache.ws.axis2.mtomsample.AttachmentResponse attachment(
+			org.apache.ws.axis2.mtomsample.AttachmentRequest param0)
+			throws Exception
+
+	{
+		AttachmentType attachmentRequest = param0.getAttachmentRequest();
+		Base64Binary binaryData = attachmentRequest.getBinaryData();
+		DataHandler dataHandler = binaryData.getBase64Binary();
+		File file = new File(
+				attachmentRequest.getFileName());
+		FileOutputStream fileOutputStream = new FileOutputStream(file);
+		dataHandler.writeTo(fileOutputStream);
+		fileOutputStream.flush();
+		fileOutputStream.close();
+		
+		AttachmentResponse response = new AttachmentResponse();
+		response.setAttachmentResponse("File saved succesfully.");
+		return response;
+	}
+
+}

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojo/README.txt
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojo/README.txt?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojo/README.txt (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojo/README.txt Mon Jul 11 21:10:36 2011
@@ -0,0 +1,57 @@
+Sample: POJO (Plain Old Java Object)
+====================================
+
+Introduction
+============
+
+This is an example POJO Web service. It shows how to expose the methods of a Java class as a Web
+service using Aixs2.
+
+
+Prerequisites  
+=============
+
+To build the sample service you must have ant-1.6.x installed in your system. 
+
+To set AXIS2_HOME in Unix/Linux type:
+$export AXIS2_HOME=<path to axis2 distribution>
+
+Building the Service
+====================
+
+To build the sample service, type: $ant generate.service or just ant
+
+This will build the AddressBookService.aar in the build directory and copy it to the
+<AXIS2_HOME>/repository/services directory.
+
+You can start the Axis2 server by running either axis2server.bat (on Windows) or axis2server.sh
+(on Linux)that are located in <AXIS2_HOME>/bin directory.
+
+The WSDL for this service should be viewable at:
+
+http://<yourhost>:<yourport>/axis2/services/AddressBookService?wsdl 
+(e.g. http://localhost:8080/axis2/services/AddressBookService?wsdl)
+
+src/sample/addressbook/rpcclient/AddressBookRPCClient.java is a Client that uses RPCServiceClient
+to invoke the methods of this web services just like the method invocations of a Java object.
+
+
+Running the Client
+==================
+
+To compile and run, type
+$ant rpc.client
+
+src/sample/addressbook/adbclient/AddressBookADBClient is Client that uses a generated stub with ADB
+to invoke the methods of this web service.
+
+To generate the stub, compile and run, type
+$ant adb.client -Dwsdl=http://<yourhost>:<yourport>/axis2/services/AddressBookService?wsdl
+
+Help
+====
+Please contact axis-user list (axis-user@ws.apache.org) if you have any trouble running the sample.
+
+
+
+

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojo/build.xml
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojo/build.xml?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojo/build.xml (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojo/build.xml Mon Jul 11 21:10:36 2011
@@ -0,0 +1,166 @@
+<!--
+  ~ 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="pojo" basedir="." default="generate.service">
+
+	<property name="dest.dir" value="build" />
+
+	<property name="dest.dir.classes" value="${dest.dir}/classes" />
+
+	<property name="dest.dir.lib" value="${dest.dir}/lib" />
+
+	<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>
+
+	<path id="client.class.path">
+		<fileset dir="${axis2.home}/lib">
+			<include name="*.jar" />
+		</fileset>
+		<fileset dir="${dest.dir.lib}">
+			<include name="*.jar" />
+		</fileset>
+
+	</path>
+	<target name="clean">
+		<delete dir="${dest.dir}" />
+		<delete dir="src" includes="sample/addressbook/stub/**"/>
+	</target>
+
+	<target name="prepare">
+
+		<mkdir dir="${dest.dir}" />
+
+		<mkdir dir="${dest.dir.classes}" />
+
+		<mkdir dir="${dest.dir.lib}" />
+
+		<mkdir dir="${dest.dir.classes}/META-INF" />
+
+	</target>
+
+	<target name="generate.service" depends="clean,prepare">
+
+		<copy file="src/META-INF/services.xml" tofile="${dest.dir.classes}/META-INF/services.xml" overwrite="true" />
+
+		<javac srcdir="src" destdir="${dest.dir.classes}" includes="sample/addressbook/service/**,sample/addressbook/entry/**">
+			<classpath refid="build.class.path" />
+		</javac>
+
+		<jar basedir="${dest.dir.classes}" destfile="${dest.dir}/AddressBookService.aar" />
+
+		<copy file="${dest.dir}/AddressBookService.aar" tofile="${repository.path}/AddressBookService.aar" overwrite="true" />
+
+	</target>
+
+	<target name="rpc.client" depends="clean,prepare">
+
+		<antcall target="rpc.client.compile" />
+
+		<antcall target="rpc.client.jar" />
+
+		<antcall target="rpc.client.run">
+			<param name="uri" value="${uri}"/>
+		</antcall>
+
+	</target>
+
+	<target name="rpc.client.compile">
+		<javac srcdir="src" destdir="${dest.dir.classes}" includes="sample/addressbook/rpcclient/**,sample/addressbook/entry/**">
+			<classpath refid="build.class.path" />
+		</javac>
+	</target>
+
+	<target name="rpc.client.jar">
+		<jar basedir="${dest.dir.classes}" destfile="${dest.dir.lib}/rpc-client.jar" includes="sample/addressbook/rpcclient/**,sample/addressbook/entry/**" />
+	</target>
+
+	<target name="rpc.client.run">
+		<java classname="sample.addressbook.rpcclient.AddressBookRPCClient" fork="true">
+			<classpath refid="client.class.path" />
+			<arg value="${uri}" />
+		</java>
+	</target>
+
+	<target name="check-parameters">
+		<condition property="parameters.set">
+			<and>
+				<isset property="wsdl" />
+			</and>
+		</condition>
+		<!-- This is a hack to get a if-else working in ant. Some much more "ANTy" person is welcome to improve this -->
+		<antcall target="print-usage" />
+	</target>
+
+	<target name="print-usage" unless="parameters.set">
+		<echo message="ant adb.client -Dwsdl='http://&lt;yourhost>:&lt;yourport>/axis2/services/AdressBookService?wsdl'" />
+	</target>
+
+	<target name="adb.client" depends="check-parameters" if="parameters.set">
+
+		<antcall target="clean" />
+		<antcall target="prepare" />
+		<antcall target="adb.client.codegen-stub">
+			<param name="wsdl" value="${wsdl}"/>
+		</antcall>
+
+		<antcall target="adb.client.compile" />
+
+		<antcall target="adb.client.jar" />
+
+		<antcall target="adb.client.run" />
+
+	</target>
+
+	<target name="adb.client.codegen-stub">
+		<java classname="org.apache.axis2.wsdl.WSDL2Java">
+			<arg value="-uri" />
+			<arg value="${wsdl}" />
+			<arg value="-p" />
+			<arg value="sample.addressbook.stub" />
+			<arg value="-o" />
+			<arg value="src" />
+			<arg value="-f" />
+			<classpath refid="build.class.path" />
+		</java>
+	</target>
+
+	<target name="adb.client.compile">
+		<javac srcdir="src" destdir="${dest.dir.classes}" includes="sample/addressbook/adbclient/**,sample/addressbook/stub/**">
+			<classpath refid="build.class.path" />
+		</javac>
+	</target>
+
+	<target name="adb.client.jar">
+		<jar basedir="${dest.dir.classes}" destfile="${dest.dir.lib}/adb-client.jar" includes="sample/addressbook/adbclient/**,sample/addressbook/stub/**" />
+	</target>
+
+	<target name="adb.client.run">
+		<java classname="sample.addressbook.adbclient.AddressBookADBClient">
+			<classpath refid="client.class.path" />
+		</java>
+	</target>
+
+</project>

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojo/src/META-INF/services.xml
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojo/src/META-INF/services.xml?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojo/src/META-INF/services.xml (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojo/src/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.
+  -->
+
+<service name="AddressBookService" scope="application">
+    <description>
+        POJO: AddressBook Service
+    </description>
+    <messageReceivers>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
+                         class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+                         class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
+    </messageReceivers>
+    <parameter name="ServiceClass">sample.addressbook.service.AddressBookService</parameter>
+
+</service>
\ No newline at end of file

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojo/src/sample/addressbook/adbclient/AddressBookADBClient.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojo/src/sample/addressbook/adbclient/AddressBookADBClient.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojo/src/sample/addressbook/adbclient/AddressBookADBClient.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojo/src/sample/addressbook/adbclient/AddressBookADBClient.java Mon Jul 11 21:10:36 2011
@@ -0,0 +1,71 @@
+/*
+ * 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 sample.addressbook.adbclient;
+
+import sample.addressbook.stub.AddressBookServiceStub;
+
+
+public class AddressBookADBClient {
+
+    private static String URL = "http://127.0.0.1:8080/axis2/services/AddressBookService";
+
+    public static void main(String[] args) {
+
+        try {
+            AddressBookServiceStub stub;
+
+            if (args != null && args.length != 0) {
+                stub = new AddressBookServiceStub(args[0]);
+                
+            } else {
+                stub = new AddressBookServiceStub(URL);
+            }
+            
+            AddressBookServiceStub.AddEntry addEntry = new AddressBookServiceStub.AddEntry();
+            AddressBookServiceStub.Entry entry = new AddressBookServiceStub.Entry();
+            
+            entry.setName("Abby Cadabby");
+            entry.setStreet("Sesame Street");
+            entry.setCity("Sesame City");
+            entry.setState("Sesame State");
+            entry.setPostalCode("11111");
+            
+            addEntry.setArgs0(entry);
+            stub.addEntry(addEntry);
+            
+            AddressBookServiceStub.FindEntry findEntry = new AddressBookServiceStub.FindEntry();
+            
+            findEntry.setArgs0("Abby Cadabby");
+            
+            AddressBookServiceStub.FindEntryResponse response = stub.findEntry(findEntry);
+            AddressBookServiceStub.Entry responseEntry = response.get_return();
+            
+            System.out.println("Name   :" + responseEntry.getName());
+            System.out.println("Street :" + responseEntry.getStreet());
+            System.out.println("City   :" + responseEntry.getCity());
+            System.out.println("State  :" + responseEntry.getState());
+            System.out.println("Postal Code :" + responseEntry.getPostalCode());
+
+        } catch (Exception ex) {
+            ex.printStackTrace();
+
+        }
+    }
+
+}

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojo/src/sample/addressbook/entry/Entry.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojo/src/sample/addressbook/entry/Entry.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojo/src/sample/addressbook/entry/Entry.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojo/src/sample/addressbook/entry/Entry.java Mon Jul 11 21:10:36 2011
@@ -0,0 +1,73 @@
+/*
+ * 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 sample.addressbook.entry;
+
+public class Entry {
+    
+    private String name = null;
+    
+    private String street = null;
+    
+    private String city = null;
+    
+    private String state = null;
+    
+    private String postalCode = null;
+
+    public String getCity() {
+        return city;
+    }
+
+    public void setCity(String city) {
+        this.city = city;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getPostalCode() {
+        return postalCode;
+    }
+
+    public void setPostalCode(String postalCode) {
+        this.postalCode = postalCode;
+    }
+
+    public String getState() {
+        return state;
+    }
+
+    public void setState(String state) {
+        this.state = state;
+    }
+
+    public String getStreet() {
+        return street;
+    }
+
+    public void setStreet(String street) {
+        this.street = street;
+    }
+    
+}

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojo/src/sample/addressbook/rpcclient/AddressBookRPCClient.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojo/src/sample/addressbook/rpcclient/AddressBookRPCClient.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojo/src/sample/addressbook/rpcclient/AddressBookRPCClient.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojo/src/sample/addressbook/rpcclient/AddressBookRPCClient.java Mon Jul 11 21:10:36 2011
@@ -0,0 +1,108 @@
+/*
+ * 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 sample.addressbook.rpcclient;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.rpc.client.RPCServiceClient;
+
+import sample.addressbook.entry.Entry;
+
+
+
+public class AddressBookRPCClient {
+
+    public static void main(String[] args1) throws AxisFault {
+
+        RPCServiceClient serviceClient = new RPCServiceClient();
+
+        Options options = serviceClient.getOptions();
+
+        EndpointReference targetEPR = new EndpointReference(
+                "http://127.0.0.1:8080/axis2/services/AddressBookService");
+        options.setTo(targetEPR);
+
+        // /////////////////////////////////////////////////////////////////////
+
+        /*
+         * Creates an Entry and stores it in the AddressBook.
+         */
+
+        // QName of the target method 
+        QName opAddEntry = new QName("http://service.addressbook.sample", "addEntry");
+
+        /*
+         * Constructing a new Entry
+         */
+        Entry entry = new Entry();
+
+        entry.setName("Abby Cadabby");
+        entry.setStreet("Sesame Street");
+        entry.setCity("Sesame City");
+        entry.setState("Sesame State");
+        entry.setPostalCode("11111");
+
+        // Constructing the arguments array for the method invocation
+        Object[] opAddEntryArgs = new Object[] { entry };
+
+        // Invoking the method
+        serviceClient.invokeRobust(opAddEntry, opAddEntryArgs);
+
+        ////////////////////////////////////////////////////////////////////////
+        
+        
+        ///////////////////////////////////////////////////////////////////////
+        
+        /*
+         * Fetching an Entry from the Address book
+         */
+        
+        // QName of the method to invoke 
+        QName opFindEntry = new QName("http://service.addressbook.sample", "findEntry");
+
+        //
+        String name = "Abby Cadabby";
+
+        Object[] opFindEntryArgs = new Object[] { name };
+        Class[] returnTypes = new Class[] { Entry.class };
+
+        
+        Object[] response = serviceClient.invokeBlocking(opFindEntry,
+                opFindEntryArgs, returnTypes);
+        
+        Entry result = (Entry) response[0];
+        
+        if (result == null) {
+            System.out.println("No entry found for " + name);
+            return;
+        } 
+        
+        System.out.println("Name   :" + result.getName());
+        System.out.println("Street :" + result.getStreet());
+        System.out.println("City   :" + result.getCity());
+        System.out.println("State  :" + result.getState());
+        System.out.println("Postal Code :" + result.getPostalCode());
+        
+
+        ///////////////////////////////////////////////////////////////////////
+    }
+}

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojo/src/sample/addressbook/service/AddressBookService.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojo/src/sample/addressbook/service/AddressBookService.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojo/src/sample/addressbook/service/AddressBookService.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojo/src/sample/addressbook/service/AddressBookService.java Mon Jul 11 21:10:36 2011
@@ -0,0 +1,49 @@
+/*
+ * 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 sample.addressbook.service;
+
+
+import java.util.HashMap;
+
+import sample.addressbook.entry.Entry;
+
+
+
+public class AddressBookService {
+    
+    private HashMap entries = new HashMap();
+
+    /**
+     * Add an Entry to the Address Book
+     * @param entry
+     */
+    public void addEntry(Entry entry) {
+        this.entries.put(entry.getName(), entry);
+    }
+    
+    /**
+     * Search an address of a person
+     * 
+     * @param name the name of the person whose address needs to be found
+     * @return return the address entry of the person. 
+     */
+    public Entry findEntry(String name) {
+        return (Entry) this.entries.get(name);
+    }
+}

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguide/README.txt
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguide/README.txt?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguide/README.txt (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguide/README.txt Mon Jul 11 21:10:36 2011
@@ -0,0 +1,38 @@
+POJO Web Services using Apache Axis2- Sample 1
+=============================================
+This sample contains source code for the xdocs/1_1/pojoguide.html document found in 
+the extracted Axis2 Documents Distribution. For a more detailed description on the 
+source code kindly see this 'POJO Web Services using Apache Axis2' document.
+
+The above mentioned document shows you how to take a simple POJO (Plain Old Java 
+Object), and deploy it on Apache Tomcat as a Web service in the exploded directory 
+format. This is a quick way to get a Web service up and running in no time. 
+
+Introduction
+============
+
+This sample shows how to expose a Java class as a web service.  
+The WeatherService Java class provides methods to get and set a Weather 
+type Java objects. The client uses RPCServiceClient to invoke those two 
+methods just as Java object method invocation.
+
+Prerequisites
+==============
+
+Apache Ant 1.6.2 or later
+
+Building the Service
+====================
+
+Type $ant from Axis2_HOME/samples/pojoguide
+
+
+Running the Client
+==================
+
+Type $ant rpc.client
+
+
+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/pojoguide/build.xml
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguide/build.xml?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguide/build.xml (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguide/build.xml Mon Jul 11 21:10:36 2011
@@ -0,0 +1,95 @@
+<!--
+  ~ 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="pojoguide" basedir="." default="generate.service">
+
+	<property name="service.name" value="WeatherService" />
+	<property name="dest.dir" value="build" />
+	<property name="dest.dir.classes" value="${dest.dir}/${service.name}" />
+	<property name="dest.dir.lib" value="${dest.dir}/lib" />	
+	<property name="axis2.home" value="../../" />
+	<property name="repository.path" value="${axis2.home}/repository" />
+
+	<path id="build.class.path">
+		<fileset dir="${axis2.home}/lib">
+			<include name="*.jar" />
+		</fileset>
+	</path>
+
+	<path id="client.class.path">
+		<fileset dir="${axis2.home}/lib">
+			<include name="*.jar" />
+		</fileset>
+		<fileset dir="${dest.dir.lib}">
+			<include name="*.jar" />
+		</fileset>
+
+	</path>
+	<target name="clean">
+		<delete dir="${dest.dir}" />
+		<delete dir="src" includes="sample/pojo/stub/**"/>
+	</target>
+
+	<target name="prepare">
+		<mkdir dir="${dest.dir}" />
+		<mkdir dir="${dest.dir}/lib" />
+		<mkdir dir="${dest.dir.classes}" />
+		<mkdir dir="${dest.dir.classes}/META-INF" />
+	</target>
+
+	<target name="generate.service" depends="clean,prepare">
+
+		<copy file="src/META-INF/services.xml" tofile="${dest.dir.classes}/META-INF/services.xml" overwrite="true" />
+
+		<javac srcdir="src" destdir="${dest.dir.classes}" includes="sample/pojo/service/**,sample/pojo/data/**">
+			<classpath refid="build.class.path" />
+		</javac>
+		
+		<jar basedir="${dest.dir.classes}" destfile="${dest.dir}/${service.name}.aar" />
+
+		<copy file="${dest.dir}/${service.name}.aar" tofile="${repository.path}/services/${service.name}.aar" overwrite="true" />
+		
+	</target>
+
+	<target name="rpc.client" depends="clean,prepare">
+
+		<antcall target="rpc.client.compile" />
+
+		<antcall target="rpc.client.jar" />
+
+		<antcall target="rpc.client.run" />
+
+	</target>
+
+	<target name="rpc.client.compile">
+		<javac srcdir="src" destdir="${dest.dir.classes}" includes="sample/pojo/rpcclient/**,sample/pojo/data/**">
+			<classpath refid="build.class.path" />
+		</javac>
+	</target>
+
+	<target name="rpc.client.jar">
+		<jar basedir="${dest.dir.classes}" destfile="${dest.dir.lib}/rpc-client.jar" includes="sample/pojo/rpcclient/**,sample/pojo/data/**" />
+	</target>
+
+	<target name="rpc.client.run">
+		<java classname="sample.pojo.rpcclient.WeatherRPCClient" fork="true">
+			<classpath refid="client.class.path" />
+		</java>
+	</target>
+</project>

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguide/src/META-INF/services.xml
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguide/src/META-INF/services.xml?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguide/src/META-INF/services.xml (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguide/src/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.
+  -->
+
+<service name="WeatherService" scope="application">
+    <description>
+        Weather POJO Service
+    </description>
+    <messageReceivers>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
+                         class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+                         class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
+    </messageReceivers>
+    <parameter name="ServiceClass">sample.pojo.service.WeatherService</parameter>
+
+</service>

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguide/src/sample/pojo/data/Weather.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguide/src/sample/pojo/data/Weather.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguide/src/sample/pojo/data/Weather.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguide/src/sample/pojo/data/Weather.java Mon Jul 11 21:10:36 2011
@@ -0,0 +1,58 @@
+/*
+ * 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 sample.pojo.data;
+
+public class Weather{
+    float temperature;
+    String forecast;
+    boolean rain;
+    float howMuchRain;
+    
+    public void setTemperature(float temp){
+        temperature = temp;
+    }
+
+    public float getTemperature(){
+        return temperature;
+    }
+    
+    public void setForecast(String fore){
+        forecast = fore;
+    }
+
+    public String getForecast(){
+        return forecast;
+    }
+    
+    public void setRain(boolean r){
+        rain = r;
+    }
+
+    public boolean getRain(){
+        return rain;
+    }
+    
+    public void setHowMuchRain(float howMuch){
+        howMuchRain = howMuch;
+    }
+
+    public float getHowMuchRain(){
+        return howMuchRain;
+    }
+}
\ No newline at end of file

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguide/src/sample/pojo/rpcclient/WeatherRPCClient.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguide/src/sample/pojo/rpcclient/WeatherRPCClient.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguide/src/sample/pojo/rpcclient/WeatherRPCClient.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguide/src/sample/pojo/rpcclient/WeatherRPCClient.java Mon Jul 11 21:10:36 2011
@@ -0,0 +1,86 @@
+/*
+ * 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 sample.pojo.rpcclient;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.rpc.client.RPCServiceClient;
+
+import sample.pojo.data.Weather;
+
+
+public class WeatherRPCClient {
+
+    public static void main(String[] args1) throws AxisFault {
+
+        RPCServiceClient serviceClient = new RPCServiceClient();
+
+        Options options = serviceClient.getOptions();
+
+        EndpointReference targetEPR = new EndpointReference("http://localhost:8080/axis2/services/WeatherService");
+
+        options.setTo(targetEPR);
+
+        // Setting the weather
+        QName opSetWeather = new QName("http://service.pojo.sample", "setWeather");
+
+        Weather w = new Weather();
+
+        w.setTemperature((float)39.3);
+        w.setForecast("Cloudy with showers");
+        w.setRain(true);
+        w.setHowMuchRain((float)4.5);
+
+        Object[] opSetWeatherArgs = new Object[] { w };
+
+        serviceClient.invokeRobust(opSetWeather, opSetWeatherArgs);
+
+
+        // Getting the weather
+        QName opGetWeather = new QName("http://service.pojo.sample", "getWeather");
+
+        Object[] opGetWeatherArgs = new Object[] { };
+        Class[] returnTypes = new Class[] { Weather.class };
+        
+        
+        Object[] response = serviceClient.invokeBlocking(opGetWeather,
+                opGetWeatherArgs, returnTypes);
+        
+        Weather result = (Weather) response[0];
+        
+        if (result == null) {
+            System.out.println("Weather didn't initialize!");
+            return;
+        }
+        
+        // Displaying the result
+        System.out.println("Temperature               : " +
+                           result.getTemperature());
+        System.out.println("Forecast                  : " +
+                           result.getForecast());
+        System.out.println("Rain                      : " +
+                           result.getRain());
+        System.out.println("How much rain (in inches) : " +
+                           result.getHowMuchRain());
+        
+    }
+}

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguide/src/sample/pojo/service/WeatherService.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguide/src/sample/pojo/service/WeatherService.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguide/src/sample/pojo/service/WeatherService.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguide/src/sample/pojo/service/WeatherService.java 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.
+ */
+package sample.pojo.service;
+
+import sample.pojo.data.Weather;
+
+public class WeatherService{
+    Weather weather;
+    
+    public void setWeather(Weather weather){
+        this.weather = weather;
+    }
+
+    public Weather getWeather(){
+        return this.weather;
+    }
+}
\ No newline at end of file

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/README.txt
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/README.txt?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/README.txt (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/README.txt Mon Jul 11 21:10:36 2011
@@ -0,0 +1,40 @@
+POJO Web Services using Apache Axis2- Sample 2
+==============================================
+This sample contains source code for the xdocs/1_1/pojoguide.html document found in 
+the extracted Axis2 Documents Distribution. For a more detailed description on the 
+source code kindly see this 'POJO Web Services using Apache Axis2' document.
+
+In this specific sample you'll be shown how to take a POJO  (Plain Old Java Object) 
+based on the Spring Framework, and deploy that as an AAR packaged Web service on Tomcat. 
+This is a quick way to get a Web service up and running in no time. 
+
+Introduction
+============
+
+This sample shows how to expose the getters and setters of WeatherSpringService that 
+takes Weather type Java Object as the argument and the return type. It uses the Spring 
+framework to initialize the weather property of the WeatherSpringService.
+
+
+Pre-Requisites
+==============
+
+Apache Ant 1.6.2 or later
+
+Spring-1.2.6.jar or later 
+You need to have this jar in your build and runtime class path. The easiest way to do this 
+is to copy it to Axis2_HOME/lib directory.
+
+Building the Service
+====================
+
+Type $ant from Axis2_HOME/samples/pojoguidespring
+
+
+Running the Client
+==================
+Type $ant rpc.client from from Axis2_HOME/samples/pojoguidespring
+
+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/pojoguidespring/build.xml
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/build.xml?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/build.xml (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/build.xml Mon Jul 11 21:10:36 2011
@@ -0,0 +1,134 @@
+<!--
+  ~ 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="pojoguidespring" basedir="." default="generate.service">
+
+	<property environment="env" />
+	<property name="service-name" value="WeatherSpringService" />
+	<property name="dest.dir" value="target" />
+	<property name="axis2.home" value="../../" />
+
+	<property name="repository.path" value="${axis2.home}/repository" />
+
+	<property name="dest.dir.classes" value="${dest.dir}/classes" />
+
+	<property name="dest.dir.lib" value="${dest.dir}/lib" />
+
+	<property name="catalina-modules" value="${env.CATALINA_HOME}/webapps/axis2/WEB-INF/services" />
+
+	<path id="build.class.path">
+		<fileset dir="${axis2.home}/lib">
+			<include name="*.jar" />
+		</fileset>
+		<!--add downloaded spring jars to classpath-->
+		<fileset dir="lib">
+			<include name="*.jar" />
+		</fileset>
+	</path>
+
+	<path id="client.class.path">
+		<pathelement location="${dest.dir.classes}" />
+		<fileset dir="${axis2.home}/lib">
+			<include name="*.jar" />
+		</fileset>
+	</path>
+
+	<target name="clean">
+		<delete dir="${dest.dir}" />
+	</target>
+
+	<target name="clean.libs">
+		<delete dir="lib" />
+	</target>
+
+	<target name="prepare" depends="clean">
+
+		<mkdir dir="${dest.dir}" />
+
+		<mkdir dir="${dest.dir.classes}" />
+
+		<mkdir dir="${dest.dir.classes}/META-INF" />
+		<antcall target="download.jars"/>
+	</target>
+
+	<target name="generate.service" depends="prepare">
+
+		<mkdir dir="${dest.dir}" />
+
+		<mkdir dir="${dest.dir.classes}" />
+		<mkdir dir="${dest.dir.classes}/META-INF" />
+
+		<copy file="src/META-INF/services.xml" tofile="${dest.dir.classes}/META-INF/services.xml" overwrite="true" />
+		<copy file="src/applicationContext.xml" tofile="${dest.dir.classes}/applicationContext.xml" overwrite="true" />
+
+		<javac debug="on" srcdir="src" destdir="${dest.dir.classes}" includes="sample/**">
+			<classpath refid="build.class.path" />
+		</javac>
+
+		<jar basedir="${dest.dir.classes}" destfile="${dest.dir}/${service-name}.aar" />
+
+		<copy file="${dest.dir}/${service-name}.aar" tofile="${repository.path}/services/${service-name}.aar" overwrite="true" />
+
+	</target>
+
+	<target name="rpc.client">
+		<antcall target="rpc.client.run" />
+	</target>
+
+	<target name="rpc.client.compile" depends="prepare">
+		<javac debug="on" srcdir="src" destdir="${dest.dir.classes}" includes="client/**">
+			<classpath refid="build.class.path" />
+		</javac>
+	</target>
+
+	<target name="rpc.client.run" depends="rpc.client.compile">
+		<echo message="${ant.file}" />
+		<java classname="client.WeatherSpringRPCClient" fork="true">
+			<classpath refid="client.class.path" />
+		</java>
+	</target>
+
+	<target name="copy.to.tomcat" depends="generate.service">
+		<copy file="${dest.dir}/${service-name}.aar" todir="${catalina-modules}" />
+	</target>
+
+        <!--We are not shipping spring jar with the release. This target can be used to
+        download spring jar to run this sample.-->
+	<target name="checkSpringJarAvailability">
+	    <!--if either one of jar is not available, spring_available will set to false-->
+	    <condition property="spring_available">
+		<and>
+		        <available file="lib/spring-core-1.2.8.jar" />
+			<available file="lib/spring-context-1.2.8.jar" />			
+	         	<available file="lib/spring-beans-1.2.8.jar" />
+		</and>
+	    </condition>
+	</target>
+
+	<target name="download.jars" depends="checkSpringJarAvailability" unless="spring_available">
+	    <echo message="Spring jars not available.Downloading...."/>
+	    <mkdir dir="lib"/>
+            <get src="http://ws.zones.apache.org/repository/org.springframework/jars/spring-core-1.2.8.jar"
+	             dest="lib/spring-core-1.2.8.jar" verbose="true"/>
+	    <get src="http://ws.zones.apache.org/repository/org.springframework/jars/spring-context-1.2.8.jar"
+	             dest="lib/spring-context-1.2.8.jar" verbose="true"/>
+	    <get src="http://ws.zones.apache.org/repository/org.springframework/jars/spring-beans-1.2.8.jar"
+	             dest="lib/spring-beans-1.2.8.jar" verbose="true"/>
+	</target>
+</project>

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/src/META-INF/services.xml
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/src/META-INF/services.xml?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/src/META-INF/services.xml (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/src/META-INF/services.xml Mon Jul 11 21:10:36 2011
@@ -0,0 +1,46 @@
+<!--
+  ~ 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="SpringInit" class="sample.spring.service.SpringInit">
+    <description>
+      This web service initializes Spring.
+    </description>
+    <parameter name="ServiceClass" >sample.spring.service.SpringInit</parameter>
+    <parameter name="ServiceTCCL" >composite</parameter>
+    <parameter name="load-on-startup" >true</parameter>
+    <operation name="springInit">
+      <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+    </operation>
+  </service>
+  <service name="WeatherSpringService">
+    <description>
+      Weather Spring POJO Axis2 AAR deployment
+    </description>
+    <parameter name="ServiceClass" >sample.spring.service.WeatherSpringService</parameter>
+    <parameter name="ServiceObjectSupplier" >org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier</parameter>
+    <parameter name="SpringBeanName" >weatherSpringService</parameter>
+    <messageReceivers>
+      <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
+                       class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
+      <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+                       class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
+    </messageReceivers>
+  </service>
+</serviceGroup>

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/src/applicationContext.xml
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/src/applicationContext.xml?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/src/applicationContext.xml (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/src/applicationContext.xml Mon Jul 11 21:10:36 2011
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ 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.
+  -->
+
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+
+<beans>
+  <bean id="applicationContext" 
+    class="org.apache.axis2.extensions.spring.receivers.ApplicationContextHolder" />
+
+  <bean id="weatherSpringService" class="sample.spring.service.WeatherSpringService">
+    <property name="weather" ref="weatherBean"/>
+  </bean>
+
+  <bean id="weatherBean" class="sample.spring.bean.Weather">
+    <property name="temperature" value="89.9"/>
+    <property name="forecast" value="Sunny"/>
+    <property name="rain" value="false"/>
+    <property name="howMuchRain" value="0.2"/>
+  </bean>
+</beans>

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/src/client/WeatherSpringRPCClient.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/src/client/WeatherSpringRPCClient.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/src/client/WeatherSpringRPCClient.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/src/client/WeatherSpringRPCClient.java Mon Jul 11 21:10:36 2011
@@ -0,0 +1,70 @@
+/*
+ * 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 client;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.rpc.client.RPCServiceClient;
+
+import sample.spring.bean.Weather;
+
+public class WeatherSpringRPCClient {
+
+    public static void main(String[] args1) throws AxisFault {
+
+        RPCServiceClient serviceClient = new RPCServiceClient();
+
+        Options options = serviceClient.getOptions();
+
+        EndpointReference targetEPR 
+                = new EndpointReference(
+                "http://localhost:8080/axis2/services/WeatherSpringService"); 
+        
+        options.setTo(targetEPR);
+
+        // Get the weather (no setting, the Spring Framework has already initialized it for us)
+        QName opGetWeather = new QName("http://service.spring.sample/xsd", "getWeather");
+
+        Object[] opGetWeatherArgs = new Object[] { };
+        Class[] returnTypes = new Class[] { Weather.class };
+        
+        
+        Object[] response = serviceClient.invokeBlocking(opGetWeather,
+                opGetWeatherArgs, returnTypes);
+        
+        Weather result = (Weather) response[0];
+        
+        // display results
+        if (result == null) {
+            System.out.println("Weather didn't initialize!");
+        }else{
+            System.out.println("Temperature               : " +
+                               result.getTemperature());
+            System.out.println("Forecast                  : " +
+                               result.getForecast());
+            System.out.println("Rain                      : " +
+                               result.getRain());
+            System.out.println("How much rain (in inches) : " +
+                               result.getHowMuchRain());
+        }
+    }
+}

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/src/sample/spring/bean/Weather.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/src/sample/spring/bean/Weather.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/src/sample/spring/bean/Weather.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/src/sample/spring/bean/Weather.java Mon Jul 11 21:10:36 2011
@@ -0,0 +1,58 @@
+/*
+ * 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 sample.spring.bean;
+
+public class Weather{
+    float temperature;
+    String forecast;
+    boolean rain;
+    float howMuchRain;
+    
+    public void setTemperature(float temp){
+        temperature = temp;
+    }
+
+    public float getTemperature(){
+        return temperature;
+    }
+    
+    public void setForecast(String fore){
+        forecast = fore;
+    }
+
+    public String getForecast(){
+        return forecast;
+    }
+    
+    public void setRain(boolean r){
+        rain = r;
+    }
+
+    public boolean getRain(){
+        return rain;
+    }
+    
+    public void setHowMuchRain(float howMuch){
+        howMuchRain = howMuch;
+    }
+
+    public float getHowMuchRain(){
+        return howMuchRain;
+    }
+}

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/src/sample/spring/service/SpringInit.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/src/sample/spring/service/SpringInit.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/src/sample/spring/service/SpringInit.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/src/sample/spring/service/SpringInit.java Mon Jul 11 21:10:36 2011
@@ -0,0 +1,76 @@
+/*
+ * 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 sample.spring.service;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axis2.engine.ServiceLifeCycle;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.OperationContext;
+import org.apache.axis2.context.ServiceContext;
+import org.apache.axis2.description.AxisService;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class SpringInit implements ServiceLifeCycle {
+        
+    private static Log logger = LogFactory
+        .getLog(SpringInit .class);
+
+    // The web service
+    public OMElement springInit(OMElement ignore) {
+
+        return null;
+    }
+
+    public void init(ServiceContext serviceContext) {
+        
+    }
+
+    public void setOperationContext(OperationContext arg0) {
+
+    }
+
+    public void destroy(ServiceContext arg0) {
+
+    }
+
+     /**
+     * this will be called during the deployement time of the service. irrespective
+     * of the service scope this method will be called
+     */
+    public void startUp(ConfigurationContext ignore, AxisService service) {
+        ClassLoader classLoader = service.getClassLoader();
+        ClassPathXmlApplicationContext appCtx = new
+            ClassPathXmlApplicationContext(new String[] {"applicationContext.xml"}, false);
+        appCtx.setClassLoader(classLoader);
+        appCtx.refresh();
+        if (logger.isDebugEnabled()) {
+            logger.debug("\n\nstartUp() set spring classloader via axisService.getClassLoader() ... ");
+        }
+    }
+    /**
+     * this will be called during the deployement time of the service. irrespective
+     * of the service scope this method will be called
+     */
+    public void shutDown(ConfigurationContext ignore, AxisService service) {
+        
+    }
+}
\ No newline at end of file

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/src/sample/spring/service/WeatherSpringService.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/src/sample/spring/service/WeatherSpringService.java?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/src/sample/spring/service/WeatherSpringService.java (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/pojoguidespring/src/sample/spring/service/WeatherSpringService.java 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.
+ */
+package sample.spring.service;
+
+import sample.spring.bean.Weather;
+
+public class WeatherSpringService{
+    Weather weather;
+    
+    public void setWeather(Weather w){
+        weather = w;
+    }
+
+    public Weather getWeather(){
+        return weather;
+    }
+}
\ No newline at end of file

Added: incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/quickstart/README.txt
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/quickstart/README.txt?rev=1145356&view=auto
==============================================================================
--- incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/quickstart/README.txt (added)
+++ incubator/airavata/trunk/ws-messaging/distribution/axis2_releases/axis2-1.6.0/samples/quickstart/README.txt Mon Jul 11 21:10:36 2011
@@ -0,0 +1,46 @@
+Axis2 Quick Start Guide- Sample 1
+=================================
+
+This sample contains source code for the xdocs/1_1/quickstartguide.html document found in 
+the extracted Axis2 Documents Distribution. For a more detailed description on the 
+source code kindly see this 'Axis2 Quick Start Guide' document.
+
+Introduction
+============
+In this sample, we are deploying a POJO after writing a services.xml and
+creating an aar. We also test the getPrice and update methods using a browser.
+
+Pre-Requisites
+==============
+
+Apache Ant 1.6.2 or later
+
+Building the Service
+====================
+
+Type "ant generate.service" or just "ant" from Axis2_HOME/samples/quickstart directory 
+and then deploy the Axis2_HOME/samples/quickstart/build/StockQuoteService.aar
+
+Generate WSDL
+==============
+
+Type "ant generate.wsdl" from Axis2_HOME/samples/quickstart directory which generates a 
+WSDL file for the above Web service and it will be placed in Axis2_HOME/samples/quickstart/build 
+directory.
+
+Running the Client
+==================
+- From your browser, If you point to the following URL:
+http://localhost:8080/axis2/services/StockQuoteService/getPrice?symbol=IBM
+
+You will get the following response:
+<ns:getPriceResponse><ns:return>42.0</ns:return></ns:getPriceResponse>
+
+- If you invoke the update method like so:
+http://localhost:8080/axis2/services/StockQuoteService/update?symbol=IBM&price=100
+
+And then execute the first getPrice url. You can see that the price got updated.
+
+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