You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sandesha-dev@ws.apache.org by ch...@apache.org on 2006/09/30 11:56:58 UTC

svn commit: r451570 [1/2] - in /webservices/sandesha/trunk/java/interop: conf/ src/org/ src/org/apache/ src/org/apache/sandesha2/ src/org/apache/sandesha2/interop/ src/org/apache/sandesha2/interop/rm1_1_clients/ src/org/tempuri/ src/sandesha2/

Author: chamikara
Date: Sat Sep 30 02:56:57 2006
New Revision: 451570

URL: http://svn.apache.org/viewvc?view=rev&rev=451570
Log:
Added the RMInteropService.wsdl the WSDL file for the interop service.
Added generated code (ADB) for te Skeleton and Stubs.

Modified and renamed client code.

Added:
    webservices/sandesha/trunk/java/interop/conf/RMInteropService.wsdl
    webservices/sandesha/trunk/java/interop/conf/services.xml
    webservices/sandesha/trunk/java/interop/src/org/
    webservices/sandesha/trunk/java/interop/src/org/apache/
    webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/
    webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/
    webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceCallbackHandler.java
    webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceCallbackHandlerImpl.java
    webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceMessageReceiverInOnly.java
    webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceMessageReceiverInOut.java
    webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceSkeleton.java
    webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceSkeletonImpl.java
    webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceStub.java
    webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/
      - copied from r450800, webservices/sandesha/trunk/java/interop/src/sandesha2/interop/rm1_1/clients/
    webservices/sandesha/trunk/java/interop/src/org/tempuri/
    webservices/sandesha/trunk/java/interop/src/org/tempuri/EchoStringRequest.java
    webservices/sandesha/trunk/java/interop/src/org/tempuri/EchoStringRequestBodyType.java
    webservices/sandesha/trunk/java/interop/src/org/tempuri/EchoStringRequestBodyType1.java
    webservices/sandesha/trunk/java/interop/src/org/tempuri/EchoStringResponse.java
    webservices/sandesha/trunk/java/interop/src/org/tempuri/EchoStringResponseBodyType.java
    webservices/sandesha/trunk/java/interop/src/org/tempuri/EchoStringResponseBodyType0.java
    webservices/sandesha/trunk/java/interop/src/org/tempuri/ExtensionMapper.java
    webservices/sandesha/trunk/java/interop/src/org/tempuri/PingRequest.java
Removed:
    webservices/sandesha/trunk/java/interop/src/sandesha2/
Modified:
    webservices/sandesha/trunk/java/interop/conf/sandesha2_interop.properties
    webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_1_1.java
    webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_1_2.java
    webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_1_3.java
    webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_1_4.java
    webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_2_1.java
    webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_2_2.java
    webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_2_3.java

Added: webservices/sandesha/trunk/java/interop/conf/RMInteropService.wsdl
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/interop/conf/RMInteropService.wsdl?view=auto&rev=451570
==============================================================================
--- webservices/sandesha/trunk/java/interop/conf/RMInteropService.wsdl (added)
+++ webservices/sandesha/trunk/java/interop/conf/RMInteropService.wsdl Sat Sep 30 02:56:57 2006
@@ -0,0 +1,176 @@
+<wsdl:definitions xmlns:tns="http://tempuri.org/"
+	xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
+	xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
+	xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
+	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/"
+	targetNamespace="http://tempuri.org/">
+	<wsdl:types>
+		<xsd:schema targetNamespace="http://tempuri.org/"
+			attributeFormDefault="unqualified"
+			elementFormDefault="unqualified">
+			<xsd:element name="PingRequest">
+				<xsd:complexType>
+					<xsd:sequence>
+						<xsd:element name="Text" minOccurs="0"
+							type="xsd:string" nillable="true" />
+					</xsd:sequence>
+				</xsd:complexType>
+			</xsd:element>
+			<xsd:element name="EchoStringRequest">
+				<xsd:complexType>
+					<xsd:sequence>
+						<xsd:element name="echoString" minOccurs="0"
+							type="tns:EchoStringRequest.BodyType" nillable="true" />
+					</xsd:sequence>
+				</xsd:complexType>
+			</xsd:element>
+			<xsd:complexType name="EchoStringRequest.BodyType">
+				<xsd:sequence>
+					<xsd:element name="Text" minOccurs="0"
+						type="xsd:string" nillable="true" />
+					<xsd:element name="Sequence" minOccurs="0"
+						type="xsd:string" nillable="true" />
+				</xsd:sequence>
+			</xsd:complexType>
+			<xsd:element name="EchoStringRequest.BodyType"
+				type="tns:EchoStringRequest.BodyType" nillable="true" />
+			<xsd:element name="EchoStringResponse">
+				<xsd:complexType>
+					<xsd:sequence>
+						<xsd:element name="echoStringResponse"
+							minOccurs="0" type="tns:EchoStringResponse.BodyType"
+							nillable="true" />
+					</xsd:sequence>
+				</xsd:complexType>
+			</xsd:element>
+			<xsd:complexType name="EchoStringResponse.BodyType">
+				<xsd:sequence>
+					<xsd:element name="EchoStringReturn" minOccurs="0"
+						type="xsd:string" nillable="true" />
+				</xsd:sequence>
+			</xsd:complexType>
+			<xsd:element name="EchoStringResponse.BodyType"
+				type="tns:EchoStringResponse.BodyType" nillable="true" />
+		</xsd:schema>
+	</wsdl:types>
+	<wsdl:message name="EchoStringRequest">
+		<wsdl:part name="part1" element="tns:EchoStringRequest" />
+	</wsdl:message>
+	<wsdl:message name="EchoStringResponse">
+		<wsdl:part name="part1" element="tns:EchoStringResponse" />
+	</wsdl:message>
+	<wsdl:message name="PingRequest">
+		<wsdl:part name="part1" element="tns:PingRequest" />
+	</wsdl:message>
+	<wsdl:portType name="RMInteropServicePortType">
+		<wsdl:operation name="EchoString">
+			<wsdl:input message="tns:EchoStringRequest"
+				wsaw:Action="urn:wsrm:EchoString" />
+			<wsdl:output message="tns:EchoStringResponse"
+				wsaw:Action="urn:wsrm:EchoStringResponse" />
+		</wsdl:operation>
+		<wsdl:operation name="Ping">
+			<wsdl:input message="tns:PingRequest"
+				wsaw:Action="urn:wsrm:Ping" />
+		</wsdl:operation>
+		<wsdl:operation name="echoString">
+			<wsdl:input message="tns:EchoStringRequest"
+				wsaw:Action="urn:wsrm:EchoString" />
+			<wsdl:output message="tns:EchoStringResponse"
+				wsaw:Action="urn:wsrm:EchoStringResponse" />
+		</wsdl:operation>
+		<wsdl:operation name="ping">
+			<wsdl:input message="tns:PingRequest"
+				wsaw:Action="urn:wsrm:Ping" />
+		</wsdl:operation>
+	</wsdl:portType>
+	<wsdl:binding name="RMInteropServiceSOAP11Binding"
+		type="tns:RMInteropServicePortType">
+		<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
+			style="document" />
+		<wsdl:operation name="EchoString">
+			<soap:operation soapAction="urn:wsrm:EchoString"
+				style="document" />
+			<wsdl:input>
+				<soap:body use="literal" />
+			</wsdl:input>
+			<wsdl:output>
+				<soap:body use="literal" />
+			</wsdl:output>
+		</wsdl:operation>
+		<wsdl:operation name="Ping">
+			<soap:operation soapAction="urn:wsrm:Ping" style="document" />
+			<wsdl:input>
+				<soap:body use="literal" />
+			</wsdl:input>
+		</wsdl:operation>
+		<wsdl:operation name="echoString">
+			<soap:operation soapAction="urn:wsrm:EchoString"
+				style="document" />
+			<wsdl:input>
+				<soap:body use="literal" />
+			</wsdl:input>
+			<wsdl:output>
+				<soap:body use="literal" />
+			</wsdl:output>
+		</wsdl:operation>
+		<wsdl:operation name="ping">
+			<soap:operation soapAction="urn:wsrm:Ping" style="document" />
+			<wsdl:input>
+				<soap:body use="literal" />
+			</wsdl:input>
+		</wsdl:operation>
+	</wsdl:binding>
+	<wsdl:binding name="RMInteropServiceSOAP12Binding"
+		type="tns:RMInteropServicePortType">
+		<soap12:binding transport="http://schemas.xmlsoap.org/soap/http"
+			style="document" />
+		<wsdl:operation name="EchoString">
+			<soap12:operation soapAction="urn:wsrm:EchoString"
+				style="document" />
+			<wsdl:input>
+				<soap12:body use="literal" />
+			</wsdl:input>
+			<wsdl:output>
+				<soap12:body use="literal" />
+			</wsdl:output>
+		</wsdl:operation>
+		<wsdl:operation name="Ping">
+			<soap12:operation soapAction="urn:wsrm:Ping"
+				style="document" />
+			<wsdl:input>
+				<soap12:body use="literal" />
+			</wsdl:input>
+		</wsdl:operation>
+		<wsdl:operation name="echoString">
+			<soap12:operation soapAction="urn:wsrm:EchoString"
+				style="document" />
+			<wsdl:input>
+				<soap12:body use="literal" />
+			</wsdl:input>
+			<wsdl:output>
+				<soap12:body use="literal" />
+			</wsdl:output>
+		</wsdl:operation>
+		<wsdl:operation name="ping">
+			<soap12:operation soapAction="urn:wsrm:Ping"
+				style="document" />
+			<wsdl:input>
+				<soap12:body use="literal" />
+			</wsdl:input>
+		</wsdl:operation>
+	</wsdl:binding>
+	<wsdl:service name="RMInteropService">
+		<wsdl:port name="RMInteropServiceSOAP11port_http"
+			binding="tns:RMInteropServiceSOAP11Binding">
+			<soap:address location="http://www.example.org/" />
+		</wsdl:port>
+		<wsdl:port name="RMInteropServiceSOAP12port_http"
+			binding="tns:RMInteropServiceSOAP12Binding">
+			<soap12:address location="http://www.example.org/" />
+		</wsdl:port>
+	</wsdl:service>
+</wsdl:definitions>
\ No newline at end of file

Modified: webservices/sandesha/trunk/java/interop/conf/sandesha2_interop.properties
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/interop/conf/sandesha2_interop.properties?view=diff&rev=451570&r1=451569&r2=451570
==============================================================================
--- webservices/sandesha/trunk/java/interop/conf/sandesha2_interop.properties (original)
+++ webservices/sandesha/trunk/java/interop/conf/sandesha2_interop.properties Sat Sep 30 02:56:57 2006
@@ -1,2 +1,3 @@
 to=http://127.0.0.1:8080/axis2/services/RMInteropService
+#to=http://127.0.0.1:8080/axis2/services/RMInteropService
 transportTo=http://127.0.0.1:8070/axis2/services/RMInteropService

Added: webservices/sandesha/trunk/java/interop/conf/services.xml
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/interop/conf/services.xml?view=auto&rev=451570
==============================================================================
--- webservices/sandesha/trunk/java/interop/conf/services.xml (added)
+++ webservices/sandesha/trunk/java/interop/conf/services.xml Sat Sep 30 02:56:57 2006
@@ -0,0 +1,42 @@
+<!-- This file was auto-generated from WSDL -->
+<!-- by the Apache Axis2 version: #axisVersion# #today# -->
+<serviceGroup>
+	<service name="RMInteropService">
+	
+	    <module ref="sandesha2" />
+	    
+		<messageReceivers>
+			<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+				class="org.apache.sandesha2.interop.RMInteropServiceMessageReceiverInOut" />
+			<messageReceiver
+				mep="http://www.w3.org/2004/08/wsdl/in-only"
+				class="org.apache.sandesha2.interop.RMInteropServiceMessageReceiverInOnly" />
+		</messageReceivers>
+		
+		<parameter locked="false" name="ServiceClass">
+			org.apache.sandesha2.interop.RMInteropServiceSkeletonImpl
+		</parameter>
+		<operation name="EchoString"
+			mep="http://www.w3.org/2004/08/wsdl/in-out">
+			<actionMapping>urn:wsrm:EchoString</actionMapping>
+			<outputActionMapping>
+				urn:wsrm:EchoStringResponse
+			</outputActionMapping>
+		</operation>
+		<operation name="Ping"
+			mep="http://www.w3.org/2004/08/wsdl/in-only">
+			<actionMapping>urn:wsrm:Ping</actionMapping>
+		</operation>
+		<operation name="echoString"
+			mep="http://www.w3.org/2004/08/wsdl/in-out">
+			<actionMapping>urn:wsrm:EchoString</actionMapping>
+			<outputActionMapping>
+				urn:wsrm:EchoStringResponse
+			</outputActionMapping>
+		</operation>
+		<operation name="ping"
+			mep="http://www.w3.org/2004/08/wsdl/in-only">
+			<actionMapping>urn:wsrm:Ping</actionMapping>
+		</operation>
+	</service>
+</serviceGroup>

Added: webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceCallbackHandler.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceCallbackHandler.java?view=auto&rev=451570
==============================================================================
--- webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceCallbackHandler.java (added)
+++ webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceCallbackHandler.java Sat Sep 30 02:56:57 2006
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.sandesha2.interop;
+
+/**
+ * RMInteropServiceCallbackHandler Callback class, Users can extend this class
+ * and implement their own receiveResult and receiveError methods.
+ */
+public abstract class RMInteropServiceCallbackHandler {
+
+	protected Object clientData;
+
+	/**
+	 * User can pass in any object that needs to be accessed once the
+	 * NonBlocking Web service call is finished and appropreate method of this
+	 * CallBack is called.
+	 * 
+	 * @param clientData
+	 *            Object mechanism by which the user can pass in user data that
+	 *            will be avilable at the time this callback is called.
+	 */
+	public RMInteropServiceCallbackHandler(Object clientData) {
+		this.clientData = clientData;
+	}
+
+	/**
+	 * Get the client data
+	 */
+
+	public Object getClientData() {
+		return clientData;
+	}
+
+	/**
+	 * auto generated Axis2 call back method for EchoString method
+	 * 
+	 */
+	public void receiveResultEchoString(org.tempuri.EchoStringResponse param43) {
+	}
+
+	/**
+	 * auto generated Axis2 Error handler
+	 * 
+	 */
+	public void receiveErrorEchoString(java.lang.Exception e) {
+	}
+
+	// No methods generated for meps other than in-out
+
+	/**
+	 * auto generated Axis2 call back method for echoString method
+	 * 
+	 */
+	public void receiveResultechoString(org.tempuri.EchoStringResponse param46) {
+	}
+
+	/**
+	 * auto generated Axis2 Error handler
+	 * 
+	 */
+	public void receiveErrorechoString(java.lang.Exception e) {
+	}
+
+	// No methods generated for meps other than in-out
+
+}

Added: webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceCallbackHandlerImpl.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceCallbackHandlerImpl.java?view=auto&rev=451570
==============================================================================
--- webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceCallbackHandlerImpl.java (added)
+++ webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceCallbackHandlerImpl.java Sat Sep 30 02:56:57 2006
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.sandesha2.interop;
+
+import org.tempuri.EchoStringResponse;
+
+public class RMInteropServiceCallbackHandlerImpl extends
+		RMInteropServiceCallbackHandler {
+	
+	public RMInteropServiceCallbackHandlerImpl(Object clientData) {
+		super (clientData);
+	}
+
+	public Object getClientData() {
+		// TODO Auto-generated method stub
+		return super.getClientData();
+	}
+
+	public void receiveErrorechoString(Exception e) {
+		System.out.println("EchoString callback got error:");
+		e.printStackTrace();
+	}
+
+	public void receiveErrorEchoString(Exception e) {
+		receiveErrorEchoString(e);
+	}
+
+	public void receiveResultechoString(EchoStringResponse echoStringResponse) {
+		String text = echoStringResponse.getEchoStringResponse().getEchoStringReturn();
+		System.out.println("EchoSting callback got text:" + text);
+	}
+
+	public void receiveResultEchoString(EchoStringResponse echoStringResponse) {
+		receiveResultechoString(echoStringResponse);
+	}
+	
+	
+}

Added: webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceMessageReceiverInOnly.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceMessageReceiverInOnly.java?view=auto&rev=451570
==============================================================================
--- webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceMessageReceiverInOnly.java (added)
+++ webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceMessageReceiverInOnly.java Sat Sep 30 02:56:57 2006
@@ -0,0 +1,196 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.sandesha2.interop;
+
+/**
+ * RMInteropServiceMessageReceiverInOnly message receiver
+ */
+
+public class RMInteropServiceMessageReceiverInOnly extends
+		org.apache.axis2.receivers.AbstractInMessageReceiver {
+
+	public void invokeBusinessLogic(
+			org.apache.axis2.context.MessageContext inMessage)
+			throws org.apache.axis2.AxisFault {
+
+		try {
+
+			// get the implementation class for the Web Service
+			Object obj = getTheImplementationObject(inMessage);
+
+			// Inject the Message Context if it is asked for
+			org.apache.axis2.engine.DependencyManager
+					.configureBusinessLogicProvider(obj, inMessage
+							.getOperationContext());
+
+			RMInteropServiceSkeleton skel = (RMInteropServiceSkeleton) obj;
+			// Out Envelop
+			org.apache.axiom.soap.SOAPEnvelope envelope = null;
+			// Find the axisOperation that has been set by the Dispatch phase.
+			org.apache.axis2.description.AxisOperation op = inMessage
+					.getOperationContext().getAxisOperation();
+			if (op == null) {
+				throw new org.apache.axis2.AxisFault(
+						"Operation is not located, if this is doclit style the SOAP-ACTION should specified via the SOAP Action to use the RawXMLProvider");
+			}
+
+			java.lang.String methodName;
+			if (op.getName() != null
+					& (methodName = op.getName().getLocalPart()) != null) {
+
+				if ("Ping".equals(methodName)) {
+
+					// doc style
+					skel.Ping((org.tempuri.PingRequest) fromOM(inMessage
+							.getEnvelope().getBody().getFirstElement(),
+							org.tempuri.PingRequest.class,
+							getEnvelopeNamespaces(inMessage.getEnvelope())));
+
+				}
+
+				if ("ping".equals(methodName)) {
+
+					// doc style
+					skel.ping((org.tempuri.PingRequest) fromOM(inMessage
+							.getEnvelope().getBody().getFirstElement(),
+							org.tempuri.PingRequest.class,
+							getEnvelopeNamespaces(inMessage.getEnvelope())));
+
+				}
+
+			}
+		} catch (Exception e) {
+			throw org.apache.axis2.AxisFault.makeFault(e);
+		}
+	}
+
+	//
+	private org.apache.axiom.om.OMElement toOM(
+			org.tempuri.EchoStringRequest param, boolean optimizeContent) {
+
+		return param.getOMElement(org.tempuri.EchoStringRequest.MY_QNAME,
+				org.apache.axiom.om.OMAbstractFactory.getOMFactory());
+
+	}
+
+	private org.apache.axiom.om.OMElement toOM(
+			org.tempuri.EchoStringResponse param, boolean optimizeContent) {
+
+		return param.getOMElement(org.tempuri.EchoStringResponse.MY_QNAME,
+				org.apache.axiom.om.OMAbstractFactory.getOMFactory());
+
+	}
+
+	private org.apache.axiom.om.OMElement toOM(org.tempuri.PingRequest param,
+			boolean optimizeContent) {
+
+		return param.getOMElement(org.tempuri.PingRequest.MY_QNAME,
+				org.apache.axiom.om.OMAbstractFactory.getOMFactory());
+
+	}
+
+	private org.apache.axiom.soap.SOAPEnvelope toEnvelope(
+			org.apache.axiom.soap.SOAPFactory factory,
+			org.tempuri.EchoStringResponse param, boolean optimizeContent) {
+		org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory
+				.getDefaultEnvelope();
+
+		emptyEnvelope.getBody().addChild(
+				param.getOMElement(org.tempuri.EchoStringResponse.MY_QNAME,
+						factory));
+
+		return emptyEnvelope;
+	}
+
+	/**
+	 * get the default envelope
+	 */
+	private org.apache.axiom.soap.SOAPEnvelope toEnvelope(
+			org.apache.axiom.soap.SOAPFactory factory) {
+		return factory.getDefaultEnvelope();
+	}
+
+	private java.lang.Object fromOM(org.apache.axiom.om.OMElement param,
+			java.lang.Class type, java.util.Map extraNamespaces) {
+
+		try {
+
+			if (org.tempuri.EchoStringRequest.class.equals(type)) {
+
+				return org.tempuri.EchoStringRequest.Factory.parse(param
+						.getXMLStreamReaderWithoutCaching());
+
+			}
+
+			if (org.tempuri.EchoStringResponse.class.equals(type)) {
+
+				return org.tempuri.EchoStringResponse.Factory.parse(param
+						.getXMLStreamReaderWithoutCaching());
+
+			}
+
+			if (org.tempuri.PingRequest.class.equals(type)) {
+
+				return org.tempuri.PingRequest.Factory.parse(param
+						.getXMLStreamReaderWithoutCaching());
+
+			}
+
+			if (org.tempuri.EchoStringRequest.class.equals(type)) {
+
+				return org.tempuri.EchoStringRequest.Factory.parse(param
+						.getXMLStreamReaderWithoutCaching());
+
+			}
+
+			if (org.tempuri.EchoStringResponse.class.equals(type)) {
+
+				return org.tempuri.EchoStringResponse.Factory.parse(param
+						.getXMLStreamReaderWithoutCaching());
+
+			}
+
+			if (org.tempuri.PingRequest.class.equals(type)) {
+
+				return org.tempuri.PingRequest.Factory.parse(param
+						.getXMLStreamReaderWithoutCaching());
+
+			}
+
+		} catch (Exception e) {
+			throw new RuntimeException(e);
+		}
+		return null;
+	}
+
+	/**
+	 * A utility method that copies the namepaces from the SOAPEnvelope
+	 */
+	private java.util.Map getEnvelopeNamespaces(
+			org.apache.axiom.soap.SOAPEnvelope env) {
+		java.util.Map returnMap = new java.util.HashMap();
+		java.util.Iterator namespaceIterator = env.getAllDeclaredNamespaces();
+		while (namespaceIterator.hasNext()) {
+			org.apache.axiom.om.OMNamespace ns = (org.apache.axiom.om.OMNamespace) namespaceIterator
+					.next();
+			returnMap.put(ns.getPrefix(), ns.getNamespaceURI());
+		}
+		return returnMap;
+	}
+
+}// end of class
+

Added: webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceMessageReceiverInOut.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceMessageReceiverInOut.java?view=auto&rev=451570
==============================================================================
--- webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceMessageReceiverInOut.java (added)
+++ webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceMessageReceiverInOut.java Sat Sep 30 02:56:57 2006
@@ -0,0 +1,226 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.sandesha2.interop;
+
+/**
+ * RMInteropServiceMessageReceiverInOut message receiver
+ */
+
+public class RMInteropServiceMessageReceiverInOut extends
+		org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver {
+
+	public void invokeBusinessLogic(
+			org.apache.axis2.context.MessageContext msgContext,
+			org.apache.axis2.context.MessageContext newMsgContext)
+			throws org.apache.axis2.AxisFault {
+
+		try {
+
+			// get the implementation class for the Web Service
+			Object obj = getTheImplementationObject(msgContext);
+
+			// Inject the Message Context if it is asked for
+			org.apache.axis2.engine.DependencyManager
+					.configureBusinessLogicProvider(obj, msgContext
+							.getOperationContext());
+
+			RMInteropServiceSkeleton skel = (RMInteropServiceSkeleton) obj;
+			// Out Envelop
+			org.apache.axiom.soap.SOAPEnvelope envelope = null;
+			// Find the axisOperation that has been set by the Dispatch phase.
+			org.apache.axis2.description.AxisOperation op = msgContext
+					.getOperationContext().getAxisOperation();
+			if (op == null) {
+				throw new org.apache.axis2.AxisFault(
+						"Operation is not located, if this is doclit style the SOAP-ACTION should specified via the SOAP Action to use the RawXMLProvider");
+			}
+
+			java.lang.String methodName;
+			if (op.getName() != null
+					& (methodName = op.getName().getLocalPart()) != null) {
+
+				if ("EchoString".equals(methodName)) {
+
+					org.tempuri.EchoStringResponse param7 = null;
+
+					// doc style
+					org.tempuri.EchoStringRequest wrappedParam = (org.tempuri.EchoStringRequest) fromOM(
+							msgContext.getEnvelope().getBody()
+									.getFirstElement(),
+							org.tempuri.EchoStringRequest.class,
+							getEnvelopeNamespaces(msgContext.getEnvelope()));
+
+					param7 = skel.EchoString(wrappedParam);
+
+					envelope = toEnvelope(getSOAPFactory(msgContext), param7,
+							false);
+
+				}
+
+				if ("echoString".equals(methodName)) {
+
+					org.tempuri.EchoStringResponse param9 = null;
+
+					// doc style
+					org.tempuri.EchoStringRequest wrappedParam = (org.tempuri.EchoStringRequest) fromOM(
+							msgContext.getEnvelope().getBody()
+									.getFirstElement(),
+							org.tempuri.EchoStringRequest.class,
+							getEnvelopeNamespaces(msgContext.getEnvelope()));
+
+					param9 = skel.echoString(wrappedParam);
+
+					envelope = toEnvelope(getSOAPFactory(msgContext), param9,
+							false);
+
+				}
+
+				newMsgContext.setEnvelope(envelope);
+			}
+		} catch (Exception e) {
+			throw org.apache.axis2.AxisFault.makeFault(e);
+		}
+	}
+
+	//
+	private org.apache.axiom.om.OMElement toOM(
+			org.tempuri.EchoStringRequest param, boolean optimizeContent) {
+
+		return param.getOMElement(org.tempuri.EchoStringRequest.MY_QNAME,
+				org.apache.axiom.om.OMAbstractFactory.getOMFactory());
+
+	}
+
+	private org.apache.axiom.om.OMElement toOM(
+			org.tempuri.EchoStringResponse param, boolean optimizeContent) {
+
+		return param.getOMElement(org.tempuri.EchoStringResponse.MY_QNAME,
+				org.apache.axiom.om.OMAbstractFactory.getOMFactory());
+
+	}
+
+	private org.apache.axiom.om.OMElement toOM(org.tempuri.PingRequest param,
+			boolean optimizeContent) {
+
+		return param.getOMElement(org.tempuri.PingRequest.MY_QNAME,
+				org.apache.axiom.om.OMAbstractFactory.getOMFactory());
+
+	}
+
+	private org.apache.axiom.soap.SOAPEnvelope toEnvelope(
+			org.apache.axiom.soap.SOAPFactory factory,
+			org.tempuri.EchoStringResponse param, boolean optimizeContent) {
+		org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory
+				.getDefaultEnvelope();
+
+		emptyEnvelope.getBody().addChild(
+				param.getOMElement(org.tempuri.EchoStringResponse.MY_QNAME,
+						factory));
+
+		return emptyEnvelope;
+	}
+
+	/**
+	 * get the default envelope
+	 */
+	private org.apache.axiom.soap.SOAPEnvelope toEnvelope(
+			org.apache.axiom.soap.SOAPFactory factory) {
+		return factory.getDefaultEnvelope();
+	}
+
+	private java.lang.Object fromOM(org.apache.axiom.om.OMElement param,
+			java.lang.Class type, java.util.Map extraNamespaces) {
+
+		try {
+
+			if (org.tempuri.EchoStringRequest.class.equals(type)) {
+
+				return org.tempuri.EchoStringRequest.Factory.parse(param
+						.getXMLStreamReaderWithoutCaching());
+
+			}
+
+			if (org.tempuri.EchoStringResponse.class.equals(type)) {
+
+				return org.tempuri.EchoStringResponse.Factory.parse(param
+						.getXMLStreamReaderWithoutCaching());
+
+			}
+
+			if (org.tempuri.PingRequest.class.equals(type)) {
+
+				return org.tempuri.PingRequest.Factory.parse(param
+						.getXMLStreamReaderWithoutCaching());
+
+			}
+
+			if (org.tempuri.EchoStringRequest.class.equals(type)) {
+
+				return org.tempuri.EchoStringRequest.Factory.parse(param
+						.getXMLStreamReaderWithoutCaching());
+
+			}
+
+			if (org.tempuri.EchoStringResponse.class.equals(type)) {
+
+				return org.tempuri.EchoStringResponse.Factory.parse(param
+						.getXMLStreamReaderWithoutCaching());
+
+			}
+
+			if (org.tempuri.PingRequest.class.equals(type)) {
+
+				return org.tempuri.PingRequest.Factory.parse(param
+						.getXMLStreamReaderWithoutCaching());
+
+			}
+
+		} catch (Exception e) {
+			throw new RuntimeException(e);
+		}
+		return null;
+	}
+
+	/**
+	 * A utility method that copies the namepaces from the SOAPEnvelope
+	 */
+	private java.util.Map getEnvelopeNamespaces(
+			org.apache.axiom.soap.SOAPEnvelope env) {
+		java.util.Map returnMap = new java.util.HashMap();
+		java.util.Iterator namespaceIterator = env.getAllDeclaredNamespaces();
+		while (namespaceIterator.hasNext()) {
+			org.apache.axiom.om.OMNamespace ns = (org.apache.axiom.om.OMNamespace) namespaceIterator
+					.next();
+			returnMap.put(ns.getPrefix(), ns.getNamespaceURI());
+		}
+		return returnMap;
+	}
+
+	private org.apache.axis2.AxisFault createAxisFault(java.lang.Exception e) {
+		org.apache.axis2.AxisFault f;
+		Throwable cause = e.getCause();
+		if (cause != null) {
+			f = new org.apache.axis2.AxisFault(e.getMessage(), cause);
+		} else {
+			f = new org.apache.axis2.AxisFault(e.getMessage());
+		}
+
+		return f;
+	}
+
+}// end of class

Added: webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceSkeleton.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceSkeleton.java?view=auto&rev=451570
==============================================================================
--- webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceSkeleton.java (added)
+++ webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceSkeleton.java Sat Sep 30 02:56:57 2006
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.sandesha2.interop;
+
+/**
+ * RMInteropServiceSkeleton java skeleton for the axisService
+ */
+public class RMInteropServiceSkeleton {
+
+	/**
+	 * Auto generated method signature
+	 * 
+	 * @param param0
+	 * 
+	 */
+	public org.tempuri.EchoStringResponse EchoString(
+			org.tempuri.EchoStringRequest param0)
+
+	{
+		// Todo fill this with the necessary business logic
+		throw new java.lang.UnsupportedOperationException("Please implement "
+				+ this.getClass().getName() + "#EchoString");
+	}
+
+	/**
+	 * Auto generated method signature
+	 * 
+	 * @param param2
+	 * 
+	 */
+	public void Ping(org.tempuri.PingRequest param2)
+
+	{
+		// Todo fill this with the necessary business logic
+
+	}
+
+	/**
+	 * Auto generated method signature
+	 * 
+	 * @param param3
+	 * 
+	 */
+	public org.tempuri.EchoStringResponse echoString(
+			org.tempuri.EchoStringRequest param3)
+
+	{
+		// Todo fill this with the necessary business logic
+		throw new java.lang.UnsupportedOperationException("Please implement "
+				+ this.getClass().getName() + "#echoString");
+	}
+
+	/**
+	 * Auto generated method signature
+	 * 
+	 * @param param5
+	 * 
+	 */
+	public void ping(org.tempuri.PingRequest param5)
+
+	{
+		// Todo fill this with the necessary business logic
+
+	}
+
+}

Added: webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceSkeletonImpl.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceSkeletonImpl.java?view=auto&rev=451570
==============================================================================
--- webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceSkeletonImpl.java (added)
+++ webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceSkeletonImpl.java Sat Sep 30 02:56:57 2006
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.sandesha2.interop;
+
+import java.util.HashMap;
+
+import org.tempuri.EchoStringRequest;
+import org.tempuri.EchoStringResponse;
+import org.tempuri.PingRequest;
+
+public class RMInteropServiceSkeletonImpl extends RMInteropServiceSkeleton {
+
+	HashMap sequenceTextMap = new HashMap ();
+	
+	public EchoStringResponse echoString(EchoStringRequest echoStringRequest) {
+		String sequence = echoStringRequest.getEchoString().getSequence();
+		String text = echoStringRequest.getEchoString().getText();
+		
+		System.out.println("EchoString got text '" + text + "', for the sequence '" + sequence + "'.") ;
+		
+		String oldText = (String) sequenceTextMap.get(sequence);
+		String newText = oldText==null?text:oldText+text;
+		sequenceTextMap.put(sequence, newText);
+		
+		EchoStringResponse echoStringResponse = new EchoStringResponse ();
+		echoStringResponse.getEchoStringResponse().setEchoStringReturn(newText);
+		
+		return echoStringResponse;
+	}
+
+	public EchoStringResponse EchoString(EchoStringRequest echoStringRequest) {
+		return echoString(echoStringRequest);
+	}
+
+	public void ping(PingRequest pingRequest) {
+		String text = pingRequest.getText();
+		System.out.println("Ping got text '" + text + "'");
+	}
+
+	public void Ping(PingRequest pingRequest) {
+		ping(pingRequest);
+	}
+
+}

Added: webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceStub.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceStub.java?view=auto&rev=451570
==============================================================================
--- webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceStub.java (added)
+++ webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceStub.java Sat Sep 30 02:56:57 2006
@@ -0,0 +1,684 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.sandesha2.interop;
+
+/*
+ * RMInteropServiceStub java implementation
+ */
+
+public class RMInteropServiceStub extends org.apache.axis2.client.Stub {
+	protected org.apache.axis2.description.AxisOperation[] _operations;
+
+	// hashmaps to keep the fault mapping
+	private java.util.HashMap faultExeptionNameMap = new java.util.HashMap();
+
+	private java.util.HashMap faultExeptionClassNameMap = new java.util.HashMap();
+
+	private java.util.HashMap faultMessageMap = new java.util.HashMap();
+
+	private void populateAxisService() {
+
+		// creating the Service with a unique name
+		_service = new org.apache.axis2.description.AxisService(
+				"RMInteropService" + this.hashCode());
+
+		// creating the operations
+		org.apache.axis2.description.AxisOperation __operation;
+
+		_operations = new org.apache.axis2.description.AxisOperation[4];
+
+		__operation = new org.apache.axis2.description.OutInAxisOperation();
+
+		__operation.setName(new javax.xml.namespace.QName("", "EchoString"));
+
+		_operations[0] = __operation;
+		_service.addOperation(__operation);
+
+		__operation = new org.apache.axis2.description.OutOnlyAxisOperation();
+
+		__operation.setName(new javax.xml.namespace.QName("", "Ping"));
+
+		_operations[1] = __operation;
+		_service.addOperation(__operation);
+
+		__operation = new org.apache.axis2.description.OutInAxisOperation();
+
+		__operation.setName(new javax.xml.namespace.QName("", "echoString"));
+
+		_operations[2] = __operation;
+		_service.addOperation(__operation);
+
+		__operation = new org.apache.axis2.description.OutOnlyAxisOperation();
+
+		__operation.setName(new javax.xml.namespace.QName("", "ping"));
+
+		_operations[3] = __operation;
+		_service.addOperation(__operation);
+
+	}
+
+	// populates the faults
+	private void populateFaults() {
+
+	}
+
+	/**
+	 * Constructor that takes in a configContext
+	 */
+	public RMInteropServiceStub(
+			org.apache.axis2.context.ConfigurationContext configurationContext,
+			java.lang.String targetEndpoint) throws org.apache.axis2.AxisFault {
+		// To populate AxisService
+		populateAxisService();
+		populateFaults();
+
+		_serviceClient = new org.apache.axis2.client.ServiceClient(
+				configurationContext, _service);
+		configurationContext = _serviceClient.getServiceContext()
+				.getConfigurationContext();
+
+		_serviceClient.getOptions().setTo(
+				new org.apache.axis2.addressing.EndpointReference(
+						targetEndpoint));
+
+	}
+
+	/**
+	 * Default Constructor
+	 */
+	public RMInteropServiceStub() throws org.apache.axis2.AxisFault {
+
+		this("http://www.example.org/");
+
+	}
+
+	/**
+	 * Constructor taking the target endpoint
+	 */
+	public RMInteropServiceStub(java.lang.String targetEndpoint)
+			throws org.apache.axis2.AxisFault {
+		this(null, targetEndpoint);
+	}
+
+	/**
+	 * Auto generated method signature
+	 * 
+	 * @see org.apache.sandesha2.interop.RMInteropService#EchoString
+	 * @param param48
+	 * 
+	 */
+	public org.tempuri.EchoStringResponse EchoString(
+
+	org.tempuri.EchoStringRequest param48) throws java.rmi.RemoteException
+
+	{
+		try {
+			org.apache.axis2.client.OperationClient _operationClient = _serviceClient
+					.createClient(_operations[0].getName());
+			_operationClient.getOptions().setAction("urn:wsrm:EchoString");
+			_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(
+					true);
+
+			// create SOAP envelope with that payload
+			org.apache.axiom.soap.SOAPEnvelope env = null;
+
+			// Style is Doc.
+
+			env = toEnvelope(getFactory(_operationClient.getOptions()
+					.getSoapVersionURI()), param48,
+					optimizeContent(new javax.xml.namespace.QName("",
+							"EchoString")));
+
+			// adding SOAP headers
+			_serviceClient.addHeadersToEnvelope(env);
+			// create message context with that soap envelope
+			org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
+			_messageContext.setEnvelope(env);
+
+			// add the message contxt to the operation client
+			_operationClient.addMessageContext(_messageContext);
+
+			// execute the operation client
+			_operationClient.execute(true);
+
+			org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient
+					.getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);
+			org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext
+					.getEnvelope();
+
+			java.lang.Object object = fromOM(_returnEnv.getBody()
+					.getFirstElement(), org.tempuri.EchoStringResponse.class,
+					getEnvelopeNamespaces(_returnEnv));
+			_messageContext.getTransportOut().getSender().cleanup(
+					_messageContext);
+			return (org.tempuri.EchoStringResponse) object;
+
+		} catch (org.apache.axis2.AxisFault f) {
+			org.apache.axiom.om.OMElement faultElt = f.getDetail();
+			if (faultElt != null) {
+				if (faultExeptionNameMap.containsKey(faultElt.getQName())) {
+					// make the fault by reflection
+					try {
+						java.lang.String exceptionClassName = (java.lang.String) faultExeptionClassNameMap
+								.get(faultElt.getQName());
+						java.lang.Class exceptionClass = java.lang.Class
+								.forName(exceptionClassName);
+						java.lang.Exception ex = (java.lang.Exception) exceptionClass
+								.newInstance();
+						// message class
+						java.lang.String messageClassName = (java.lang.String) faultMessageMap
+								.get(faultElt.getQName());
+						java.lang.Class messageClass = java.lang.Class
+								.forName(messageClassName);
+						java.lang.Object messageObject = fromOM(faultElt,
+								messageClass, null);
+						java.lang.reflect.Method m = exceptionClass.getMethod(
+								"setFaultMessage",
+								new java.lang.Class[] { messageClass });
+						m.invoke(ex, new java.lang.Object[] { messageObject });
+
+						throw new java.rmi.RemoteException(ex.getMessage(), ex);
+					} catch (java.lang.ClassCastException e) {
+						// we cannot intantiate the class - throw the original
+						// Axis fault
+						throw f;
+					} catch (java.lang.ClassNotFoundException e) {
+						// we cannot intantiate the class - throw the original
+						// Axis fault
+						throw f;
+					} catch (java.lang.NoSuchMethodException e) {
+						// we cannot intantiate the class - throw the original
+						// Axis fault
+						throw f;
+					} catch (java.lang.reflect.InvocationTargetException e) {
+						// we cannot intantiate the class - throw the original
+						// Axis fault
+						throw f;
+					} catch (java.lang.IllegalAccessException e) {
+						// we cannot intantiate the class - throw the original
+						// Axis fault
+						throw f;
+					} catch (java.lang.InstantiationException e) {
+						// we cannot intantiate the class - throw the original
+						// Axis fault
+						throw f;
+					}
+				} else {
+					throw f;
+				}
+			} else {
+				throw f;
+			}
+		}
+	}
+
+	/**
+	 * Auto generated method signature for Asynchronous Invocations
+	 * 
+	 * @see org.apache.sandesha2.interop.RMInteropService#startEchoString
+	 * @param param48
+	 * 
+	 */
+	public void startEchoString(
+
+			org.tempuri.EchoStringRequest param48,
+			final org.apache.sandesha2.interop.RMInteropServiceCallbackHandler callback)
+
+	throws java.rmi.RemoteException {
+
+		org.apache.axis2.client.OperationClient _operationClient = _serviceClient
+				.createClient(_operations[0].getName());
+		_operationClient.getOptions().setAction("urn:wsrm:EchoString");
+		_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
+
+		// create SOAP envelope with that payload
+		org.apache.axiom.soap.SOAPEnvelope env = null;
+
+		// Style is Doc.
+
+		env = toEnvelope(
+				getFactory(_operationClient.getOptions().getSoapVersionURI()),
+				param48,
+				optimizeContent(new javax.xml.namespace.QName("", "EchoString")));
+
+		// adding SOAP headers
+		_serviceClient.addHeadersToEnvelope(env);
+		// create message context with that soap envelope
+		org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
+		_messageContext.setEnvelope(env);
+
+		// add the message contxt to the operation client
+		_operationClient.addMessageContext(_messageContext);
+
+		_operationClient
+				.setCallback(new org.apache.axis2.client.async.Callback() {
+					public void onComplete(
+							org.apache.axis2.client.async.AsyncResult result) {
+						java.lang.Object object = fromOM(result
+								.getResponseEnvelope().getBody()
+								.getFirstElement(),
+								org.tempuri.EchoStringResponse.class,
+								getEnvelopeNamespaces(result
+										.getResponseEnvelope()));
+						callback
+								.receiveResultEchoString((org.tempuri.EchoStringResponse) object);
+					}
+
+					public void onError(java.lang.Exception e) {
+						callback.receiveErrorEchoString(e);
+					}
+				});
+
+		org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;
+		if (_operations[0].getMessageReceiver() == null
+				&& _operationClient.getOptions().isUseSeparateListener()) {
+			_callbackReceiver = new org.apache.axis2.util.CallbackReceiver();
+			_operations[0].setMessageReceiver(_callbackReceiver);
+		}
+
+		// execute the operation client
+		_operationClient.execute(false);
+
+	}
+
+	public void Ping(org.tempuri.PingRequest param50
+
+	) throws java.rmi.RemoteException {
+
+		org.apache.axis2.client.OperationClient _operationClient = _serviceClient
+				.createClient(_operations[1].getName());
+		_operationClient.getOptions().setAction("urn:wsrm:Ping");
+		_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
+
+		org.apache.axiom.soap.SOAPEnvelope env = null;
+
+		// Style is Doc.
+
+		env = toEnvelope(getFactory(_operationClient.getOptions()
+				.getSoapVersionURI()), param50,
+				optimizeContent(new javax.xml.namespace.QName("", "Ping")));
+
+		// adding SOAP headers
+		_serviceClient.addHeadersToEnvelope(env);
+		// create message context with that soap envelope
+		org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
+		_messageContext.setEnvelope(env);
+
+		// add the message contxt to the operation client
+		_operationClient.addMessageContext(_messageContext);
+
+		_operationClient.execute(true);
+		return;
+	}
+
+	/**
+	 * Auto generated method signature
+	 * 
+	 * @see org.apache.sandesha2.interop.RMInteropService#echoString
+	 * @param param51
+	 * 
+	 */
+	public org.tempuri.EchoStringResponse echoString(
+
+	org.tempuri.EchoStringRequest param51) throws java.rmi.RemoteException
+
+	{
+		try {
+			org.apache.axis2.client.OperationClient _operationClient = _serviceClient
+					.createClient(_operations[2].getName());
+			_operationClient.getOptions().setAction("urn:wsrm:EchoString");
+			_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(
+					true);
+
+			// create SOAP envelope with that payload
+			org.apache.axiom.soap.SOAPEnvelope env = null;
+
+			// Style is Doc.
+
+			env = toEnvelope(getFactory(_operationClient.getOptions()
+					.getSoapVersionURI()), param51,
+					optimizeContent(new javax.xml.namespace.QName("",
+							"echoString")));
+
+			// adding SOAP headers
+			_serviceClient.addHeadersToEnvelope(env);
+			// create message context with that soap envelope
+			org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
+			_messageContext.setEnvelope(env);
+
+			// add the message contxt to the operation client
+			_operationClient.addMessageContext(_messageContext);
+
+			// execute the operation client
+			_operationClient.execute(true);
+
+			org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient
+					.getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);
+			org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext
+					.getEnvelope();
+
+			java.lang.Object object = fromOM(_returnEnv.getBody()
+					.getFirstElement(), org.tempuri.EchoStringResponse.class,
+					getEnvelopeNamespaces(_returnEnv));
+			_messageContext.getTransportOut().getSender().cleanup(
+					_messageContext);
+			return (org.tempuri.EchoStringResponse) object;
+
+		} catch (org.apache.axis2.AxisFault f) {
+			org.apache.axiom.om.OMElement faultElt = f.getDetail();
+			if (faultElt != null) {
+				if (faultExeptionNameMap.containsKey(faultElt.getQName())) {
+					// make the fault by reflection
+					try {
+						java.lang.String exceptionClassName = (java.lang.String) faultExeptionClassNameMap
+								.get(faultElt.getQName());
+						java.lang.Class exceptionClass = java.lang.Class
+								.forName(exceptionClassName);
+						java.lang.Exception ex = (java.lang.Exception) exceptionClass
+								.newInstance();
+						// message class
+						java.lang.String messageClassName = (java.lang.String) faultMessageMap
+								.get(faultElt.getQName());
+						java.lang.Class messageClass = java.lang.Class
+								.forName(messageClassName);
+						java.lang.Object messageObject = fromOM(faultElt,
+								messageClass, null);
+						java.lang.reflect.Method m = exceptionClass.getMethod(
+								"setFaultMessage",
+								new java.lang.Class[] { messageClass });
+						m.invoke(ex, new java.lang.Object[] { messageObject });
+
+						throw new java.rmi.RemoteException(ex.getMessage(), ex);
+					} catch (java.lang.ClassCastException e) {
+						// we cannot intantiate the class - throw the original
+						// Axis fault
+						throw f;
+					} catch (java.lang.ClassNotFoundException e) {
+						// we cannot intantiate the class - throw the original
+						// Axis fault
+						throw f;
+					} catch (java.lang.NoSuchMethodException e) {
+						// we cannot intantiate the class - throw the original
+						// Axis fault
+						throw f;
+					} catch (java.lang.reflect.InvocationTargetException e) {
+						// we cannot intantiate the class - throw the original
+						// Axis fault
+						throw f;
+					} catch (java.lang.IllegalAccessException e) {
+						// we cannot intantiate the class - throw the original
+						// Axis fault
+						throw f;
+					} catch (java.lang.InstantiationException e) {
+						// we cannot intantiate the class - throw the original
+						// Axis fault
+						throw f;
+					}
+				} else {
+					throw f;
+				}
+			} else {
+				throw f;
+			}
+		}
+	}
+
+	/**
+	 * Auto generated method signature for Asynchronous Invocations
+	 * 
+	 * @see org.apache.sandesha2.interop.RMInteropService#startechoString
+	 * @param param51
+	 * 
+	 */
+	public void startechoString(
+
+			org.tempuri.EchoStringRequest param51,
+			final org.apache.sandesha2.interop.RMInteropServiceCallbackHandler callback)
+
+	throws java.rmi.RemoteException {
+
+		org.apache.axis2.client.OperationClient _operationClient = _serviceClient
+				.createClient(_operations[2].getName());
+		_operationClient.getOptions().setAction("urn:wsrm:EchoString");
+		_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
+
+		// create SOAP envelope with that payload
+		org.apache.axiom.soap.SOAPEnvelope env = null;
+
+		// Style is Doc.
+
+		env = toEnvelope(
+				getFactory(_operationClient.getOptions().getSoapVersionURI()),
+				param51,
+				optimizeContent(new javax.xml.namespace.QName("", "echoString")));
+
+		// adding SOAP headers
+		_serviceClient.addHeadersToEnvelope(env);
+		// create message context with that soap envelope
+		org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
+		_messageContext.setEnvelope(env);
+
+		// add the message contxt to the operation client
+		_operationClient.addMessageContext(_messageContext);
+
+		_operationClient
+				.setCallback(new org.apache.axis2.client.async.Callback() {
+					public void onComplete(
+							org.apache.axis2.client.async.AsyncResult result) {
+						java.lang.Object object = fromOM(result
+								.getResponseEnvelope().getBody()
+								.getFirstElement(),
+								org.tempuri.EchoStringResponse.class,
+								getEnvelopeNamespaces(result
+										.getResponseEnvelope()));
+						callback
+								.receiveResultechoString((org.tempuri.EchoStringResponse) object);
+					}
+
+					public void onError(java.lang.Exception e) {
+						callback.receiveErrorechoString(e);
+					}
+				});
+
+		org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;
+		if (_operations[2].getMessageReceiver() == null
+				&& _operationClient.getOptions().isUseSeparateListener()) {
+			_callbackReceiver = new org.apache.axis2.util.CallbackReceiver();
+			_operations[2].setMessageReceiver(_callbackReceiver);
+		}
+
+		// execute the operation client
+		_operationClient.execute(false);
+
+	}
+
+	public void ping(org.tempuri.PingRequest param53
+
+	) throws java.rmi.RemoteException {
+
+		org.apache.axis2.client.OperationClient _operationClient = _serviceClient
+				.createClient(_operations[3].getName());
+		_operationClient.getOptions().setAction("urn:wsrm:Ping");
+		_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
+
+		org.apache.axiom.soap.SOAPEnvelope env = null;
+
+		// Style is Doc.
+
+		env = toEnvelope(getFactory(_operationClient.getOptions()
+				.getSoapVersionURI()), param53,
+				optimizeContent(new javax.xml.namespace.QName("", "ping")));
+
+		// adding SOAP headers
+		_serviceClient.addHeadersToEnvelope(env);
+		// create message context with that soap envelope
+		org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
+		_messageContext.setEnvelope(env);
+
+		// add the message contxt to the operation client
+		_operationClient.addMessageContext(_messageContext);
+
+		_operationClient.execute(true);
+		return;
+	}
+
+	/**
+	 * A utility method that copies the namepaces from the SOAPEnvelope
+	 */
+	private java.util.Map getEnvelopeNamespaces(
+			org.apache.axiom.soap.SOAPEnvelope env) {
+		java.util.Map returnMap = new java.util.HashMap();
+		java.util.Iterator namespaceIterator = env.getAllDeclaredNamespaces();
+		while (namespaceIterator.hasNext()) {
+			org.apache.axiom.om.OMNamespace ns = (org.apache.axiom.om.OMNamespace) namespaceIterator
+					.next();
+			returnMap.put(ns.getPrefix(), ns.getNamespaceURI());
+		}
+		return returnMap;
+	}
+
+	private javax.xml.namespace.QName[] opNameArray = null;
+
+	private boolean optimizeContent(javax.xml.namespace.QName opName) {
+
+		if (opNameArray == null) {
+			return false;
+		}
+		for (int i = 0; i < opNameArray.length; i++) {
+			if (opName.equals(opNameArray[i])) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	// http://www.example.org/
+	private org.apache.axiom.om.OMElement toOM(
+			org.tempuri.EchoStringRequest param, boolean optimizeContent) {
+
+		return param.getOMElement(org.tempuri.EchoStringRequest.MY_QNAME,
+				org.apache.axiom.om.OMAbstractFactory.getOMFactory());
+
+	}
+
+	private org.apache.axiom.om.OMElement toOM(
+			org.tempuri.EchoStringResponse param, boolean optimizeContent) {
+
+		return param.getOMElement(org.tempuri.EchoStringResponse.MY_QNAME,
+				org.apache.axiom.om.OMAbstractFactory.getOMFactory());
+
+	}
+
+	private org.apache.axiom.om.OMElement toOM(org.tempuri.PingRequest param,
+			boolean optimizeContent) {
+
+		return param.getOMElement(org.tempuri.PingRequest.MY_QNAME,
+				org.apache.axiom.om.OMAbstractFactory.getOMFactory());
+
+	}
+
+	private org.apache.axiom.soap.SOAPEnvelope toEnvelope(
+			org.apache.axiom.soap.SOAPFactory factory,
+			org.tempuri.EchoStringRequest param, boolean optimizeContent) {
+		org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory
+				.getDefaultEnvelope();
+
+		emptyEnvelope.getBody().addChild(
+				param.getOMElement(org.tempuri.EchoStringRequest.MY_QNAME,
+						factory));
+
+		return emptyEnvelope;
+	}
+
+	private org.apache.axiom.soap.SOAPEnvelope toEnvelope(
+			org.apache.axiom.soap.SOAPFactory factory,
+			org.tempuri.PingRequest param, boolean optimizeContent) {
+		org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory
+				.getDefaultEnvelope();
+
+		emptyEnvelope.getBody().addChild(
+				param.getOMElement(org.tempuri.PingRequest.MY_QNAME, factory));
+
+		return emptyEnvelope;
+	}
+
+	/**
+	 * get the default envelope
+	 */
+	private org.apache.axiom.soap.SOAPEnvelope toEnvelope(
+			org.apache.axiom.soap.SOAPFactory factory) {
+		return factory.getDefaultEnvelope();
+	}
+
+	private java.lang.Object fromOM(org.apache.axiom.om.OMElement param,
+			java.lang.Class type, java.util.Map extraNamespaces) {
+
+		try {
+
+			if (org.tempuri.EchoStringRequest.class.equals(type)) {
+
+				return org.tempuri.EchoStringRequest.Factory.parse(param
+						.getXMLStreamReaderWithoutCaching());
+
+			}
+
+			if (org.tempuri.EchoStringResponse.class.equals(type)) {
+
+				return org.tempuri.EchoStringResponse.Factory.parse(param
+						.getXMLStreamReaderWithoutCaching());
+
+			}
+
+			if (org.tempuri.PingRequest.class.equals(type)) {
+
+				return org.tempuri.PingRequest.Factory.parse(param
+						.getXMLStreamReaderWithoutCaching());
+
+			}
+
+			if (org.tempuri.EchoStringRequest.class.equals(type)) {
+
+				return org.tempuri.EchoStringRequest.Factory.parse(param
+						.getXMLStreamReaderWithoutCaching());
+
+			}
+
+			if (org.tempuri.EchoStringResponse.class.equals(type)) {
+
+				return org.tempuri.EchoStringResponse.Factory.parse(param
+						.getXMLStreamReaderWithoutCaching());
+
+			}
+
+			if (org.tempuri.PingRequest.class.equals(type)) {
+
+				return org.tempuri.PingRequest.Factory.parse(param
+						.getXMLStreamReaderWithoutCaching());
+
+			}
+
+		} catch (Exception e) {
+			throw new RuntimeException(e);
+		}
+		return null;
+	}
+
+	private void setOpNameArray() {
+		opNameArray = null;
+	}
+
+}

Modified: webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_1_1.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_1_1.java?view=diff&rev=451570&r1=450800&r2=451570
==============================================================================
--- webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_1_1.java (original)
+++ webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_1_1.java Sat Sep 30 02:56:57 2006
@@ -14,11 +14,12 @@
  * the License.
  */
 
-package sandesha2.interop.rm1_1.clients;
+package org.apache.sandesha2.interop.rm1_1_clients;
 
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
+import java.rmi.RemoteException;
 import java.util.Properties;
 
 import org.apache.axiom.om.OMAbstractFactory;
@@ -33,15 +34,19 @@
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.ConfigurationContextFactory;
 import org.apache.axis2.context.MessageContextConstants;
+import org.apache.axis2.engine.AxisError;
 import org.apache.sandesha2.Sandesha2Constants;
+import org.apache.sandesha2.SandeshaException;
 import org.apache.sandesha2.client.SandeshaClient;
 import org.apache.sandesha2.client.SandeshaClientConstants;
 import org.apache.sandesha2.client.SequenceReport;
+import org.apache.sandesha2.interop.RMInteropServiceStub;
+import org.tempuri.PingRequest;
 
 public class Scenario_1_1 {
 
 	private static final String applicationNamespaceName = "http://tempuri.org/"; 
-	private static final String ping = "ping";
+	private static final String PingRequest = "PingRequest";
 	private static final String Text = "Text";
 	
 	private static String toIP = "127.0.0.1";
@@ -56,7 +61,7 @@
 	
 	private static String AXIS2_CLIENT_PATH = SANDESHA2_HOME + File.separator + "target" + File.separator +"repos" + File.separator + "client" + File.separator;   //this will be available after a maven build
 	
-	public static void main(String[] args) throws AxisFault,IOException  {
+	public static void main(String[] args) throws Exception  {
 		
 		String axisClientRepo = null;
 		if (args!=null && args.length>0)
@@ -72,24 +77,85 @@
 		Properties properties = new Properties();
 		if (in != null) {
 			properties.load(in);
+			
+			toEPR = properties.getProperty("to");
+			transportToEPR = properties.getProperty("transportTo");
 		}
+
+
+//		new Scenario_1_1 ().run();
+		new Scenario_1_1 ().runStub();
+	}
+	
+	private void run () throws Exception {
+		
+		ConfigurationContext configurationContext = generateConfigContext();
+		
+		Options clientOptions = new Options ();
+		setUpOptions(clientOptions);
 		
-		toEPR = properties.getProperty("to");
-		transportToEPR = properties.getProperty("transportTo");
+		ServiceClient serviceClient = new ServiceClient (configurationContext,null);		
+		
+		serviceClient.setOptions(clientOptions);
+		
+		serviceClient.fireAndForget(getPingOMBlock("ping1"));
+		serviceClient.fireAndForget(getPingOMBlock("ping2"));
+		serviceClient.fireAndForget(getPingOMBlock("ping3"));
+		
+		terminateSequence(serviceClient);
+		
+		serviceClient.finalizeInvoke();
+	}
+	
+	private static OMElement getPingOMBlock(String text) {
+		OMFactory fac = OMAbstractFactory.getOMFactory();
+		OMNamespace namespace = fac.createOMNamespace(applicationNamespaceName,"ns1");
+		OMElement pingElem = fac.createOMElement(PingRequest, namespace);
+		OMElement textElem = fac.createOMElement(Text, null);
+		
+		textElem.setText(text);
+		pingElem.addChild(textElem);
 
-		new Scenario_1_1 ().run();
+		return pingElem;
 	}
 	
-	private void run () throws AxisFault {
+	private void runStub () throws Exception {
+		String targetEndpoint = toEPR;
+		ConfigurationContext configurationContext = generateConfigContext();
+		
+		RMInteropServiceStub stub = new RMInteropServiceStub (configurationContext, targetEndpoint);
+		setUpOptions(stub._getServiceClient().getOptions());
+		
+		PingRequest pingRequest = new PingRequest ();
+		pingRequest.setText("ping1");
+		stub.ping(pingRequest);
+		
+		pingRequest = new PingRequest ();
+		pingRequest.setText("ping2");
+		stub.ping(pingRequest);
+		
+		pingRequest = new PingRequest ();
+		pingRequest.setText("ping3");
+		stub.ping(pingRequest);
+		
+		terminateSequence(stub._getServiceClient());
+		stub._getServiceClient().finalizeInvoke();
 		
+	}
+	
+	private ConfigurationContext generateConfigContext () throws Exception {
 		if ("<SANDESHA2_HOME>".equals(SANDESHA2_HOME)){
 			System.out.println("ERROR: Please change <SANDESHA2_HOME> to your Sandesha2 installation directory.");
-			return;
+			throw new Exception ("Client not set up correctly");
 		}
 		
 		String axis2_xml = AXIS2_CLIENT_PATH + "client_axis2.xml";
 		ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(AXIS2_CLIENT_PATH,axis2_xml);
-		Options clientOptions = new Options ();
+
+		return configContext;
+	}
+	
+	private void setUpOptions (Options clientOptions) {
 		clientOptions.setProperty(MessageContextConstants.TRANSPORT_URL,transportToEPR);
 //		clientOptions.setProperty(Options.COPY_PROPERTIES, new Boolean (true));
 		clientOptions.setTo(new EndpointReference (toEPR));
@@ -105,14 +171,9 @@
 		
 		clientOptions.setAction("urn:wsrm:Ping");
 		
-		ServiceClient serviceClient = new ServiceClient (configContext,null);		
-		
-		serviceClient.setOptions(clientOptions);
-		
-		serviceClient.fireAndForget(getPingOMBlock("ping1"));
-		serviceClient.fireAndForget(getPingOMBlock("ping2"));
-		serviceClient.fireAndForget(getPingOMBlock("ping3"));
-		
+	}
+	
+	private void terminateSequence (ServiceClient serviceClient) throws SandeshaException {
 		SequenceReport sequenceReport = null;		
 		boolean complete = false;
 		while (!complete) {
@@ -129,19 +190,6 @@
 		} 		
 		
 		SandeshaClient.terminateSequence(serviceClient);
-//		serviceClient.finalizeInvoke();
-	}
-	
-	private static OMElement getPingOMBlock(String text) {
-		OMFactory fac = OMAbstractFactory.getOMFactory();
-		OMNamespace namespace = fac.createOMNamespace(applicationNamespaceName,"ns1");
-		OMElement pingElem = fac.createOMElement(ping, namespace);
-		OMElement textElem = fac.createOMElement(Text, namespace);
-		
-		textElem.setText(text);
-		pingElem.addChild(textElem);
-
-		return pingElem;
 	}
 	
 }

Modified: webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_1_2.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_1_2.java?view=diff&rev=451570&r1=450800&r2=451570
==============================================================================
--- webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_1_2.java (original)
+++ webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_1_2.java Sat Sep 30 02:56:57 2006
@@ -14,7 +14,7 @@
  * the License.
  */
 
-package sandesha2.interop.rm1_1.clients;
+package org.apache.sandesha2.interop.rm1_1_clients;
 
 import java.io.File;
 import java.io.IOException;
@@ -72,10 +72,10 @@
 		Properties properties = new Properties();
 		if (in != null) {
 			properties.load(in);
+			
+			toEPR = properties.getProperty("to");
+			transportToEPR = properties.getProperty("transportTo");
 		}
-		
-		toEPR = properties.getProperty("to");
-		transportToEPR = properties.getProperty("transportTo");
 		
 		new Scenario_1_2 ().run();
 	}

Modified: webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_1_3.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_1_3.java?view=diff&rev=451570&r1=450800&r2=451570
==============================================================================
--- webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_1_3.java (original)
+++ webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_1_3.java Sat Sep 30 02:56:57 2006
@@ -14,7 +14,7 @@
  * the License.
  */
 
-package sandesha2.interop.rm1_1.clients;
+package org.apache.sandesha2.interop.rm1_1_clients;
 
 import java.io.File;
 import java.io.IOException;
@@ -71,10 +71,10 @@
 		Properties properties = new Properties();
 		if (in != null) {
 			properties.load(in);
+			
+			toEPR = properties.getProperty("to");
+			transportToEPR = properties.getProperty("transportTo");
 		}
-		
-		toEPR = properties.getProperty("to");
-		transportToEPR = properties.getProperty("transportTo");
 		
 		new Scenario_1_3 ().run();
 	}

Modified: webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_1_4.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_1_4.java?view=diff&rev=451570&r1=450800&r2=451570
==============================================================================
--- webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_1_4.java (original)
+++ webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_1_4.java Sat Sep 30 02:56:57 2006
@@ -14,7 +14,7 @@
  * the License.
  */
 
-package sandesha2.interop.rm1_1.clients;
+package org.apache.sandesha2.interop.rm1_1_clients;
 
 import java.io.File;
 import java.io.IOException;
@@ -80,10 +80,10 @@
 		Properties properties = new Properties();
 		if (in != null) {
 			properties.load(in);
+			
+			toEPR = properties.getProperty("to");
+			transportToEPR = properties.getProperty("transportTo");
 		}
-		
-		toEPR = properties.getProperty("to");
-		transportToEPR = properties.getProperty("transportTo");
 		
 		new Scenario_1_4().run();
 	}

Modified: webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_2_1.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_2_1.java?view=diff&rev=451570&r1=450800&r2=451570
==============================================================================
--- webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_2_1.java (original)
+++ webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_2_1.java Sat Sep 30 02:56:57 2006
@@ -14,7 +14,7 @@
  * the License.
  */
 
-package sandesha2.interop.rm1_1.clients;
+package org.apache.sandesha2.interop.rm1_1_clients;
 
 import java.io.File;
 import java.io.IOException;
@@ -55,7 +55,7 @@
 	private final static String EchoStringReturn = "EchoStringReturn";
 	
 	private static String toIP = "127.0.0.1";
-	private static String toPort = "9762";
+	private static String toPort = "8080";
 	private static String transportToIP = "127.0.0.1";
 	private static String transportToPort = "8070";
 	private static String servicePart = "/axis2/services/RMInteropService";
@@ -83,11 +83,11 @@
 		Properties properties = new Properties();
 		if (in != null) {
 			properties.load(in);
+			
+			toAddress = properties.getProperty("to");
+			transportToEPR = properties.getProperty("transportTo");
 		}
 		
-		toAddress = properties.getProperty("to");
-		transportToEPR = properties.getProperty("transportTo");
-		
 		new Scenario_2_1 ().run();
 	}
 	
@@ -114,10 +114,13 @@
 		OMNamespace namespace = factory.createOMNamespace("urn:wsrm:InteropOptions","rmi");
 		OMElement acceptOfferElem = factory.createOMElement("acceptOffer",namespace);
 		OMElement useOfferElem = factory.createOMElement("useOffer",namespace);
+		
 		acceptOfferElem.setText("true");
 		useOfferElem.setText("true");
-		toEPR.addReferenceParameter(acceptOfferElem);
-		toEPR.addReferenceParameter(useOfferElem);
+		
+//		toEPR.addReferenceParameter(acceptOfferElem);
+//		toEPR.addReferenceParameter(useOfferElem);
+		
 //		clientOptions.setManageSession(true); // without this reference params wont go.
 		serviceClient.setTargetEPR(toEPR);
 		
@@ -149,11 +152,11 @@
 		
 		serviceClient.setOptions(clientOptions);
 
-		Callback callback1 = new TestCallback ("Callback 1");
-		serviceClient.sendReceiveNonBlocking(getEchoOMBlock("echo1",sequenceKey),callback1);
-		
-		Callback callback2 = new TestCallback ("Callback 2");
-		serviceClient.sendReceiveNonBlocking(getEchoOMBlock("echo2",sequenceKey),callback2);
+//		Callback callback1 = new TestCallback ("Callback 1");
+//		serviceClient.sendReceiveNonBlocking(getEchoOMBlock("echo1",sequenceKey),callback1);
+//		
+//		Callback callback2 = new TestCallback ("Callback 2");
+//		serviceClient.sendReceiveNonBlocking(getEchoOMBlock("echo2",sequenceKey),callback2);
 
 		
 		Callback callback3 = new TestCallback ("Callback 3");
@@ -167,7 +170,7 @@
 		boolean complete = false;
 		while (!complete) {
 			sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
-			if (sequenceReport!=null && sequenceReport.getCompletedMessages().size()==3) 
+			if (sequenceReport!=null && sequenceReport.getCompletedMessages().size()==1) 
 				complete = true;
 			else {
 				try {
@@ -180,7 +183,7 @@
        
 		Thread.sleep(6000);
         SandeshaClient.terminateSequence(serviceClient);
-        
+		Thread.sleep(60000000);
 //        serviceClient.finalizeInvoke();
         
 	}

Modified: webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_2_2.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_2_2.java?view=diff&rev=451570&r1=450800&r2=451570
==============================================================================
--- webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_2_2.java (original)
+++ webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_2_2.java Sat Sep 30 02:56:57 2006
@@ -14,7 +14,7 @@
  * the License.
  */
 
-package sandesha2.interop.rm1_1.clients;
+package org.apache.sandesha2.interop.rm1_1_clients;
 
 import java.io.File;
 import java.io.IOException;
@@ -51,7 +51,7 @@
 	private final static String EchoStringReturn = "EchoStringReturn";
 	
 	private static String toIP = "127.0.0.1";
-	private static String toPort = "9762";
+	private static String toPort = "8080";
 	private static String transportToIP = "127.0.0.1";
 	private static String transportToPort = "8070";
 	private static String servicePart = "/axis2/services/RMInteropService";
@@ -79,10 +79,9 @@
 		Properties properties = new Properties();
 		if (in != null) {
 			properties.load(in);
+			toEPR = properties.getProperty("to");
+			transportToEPR = properties.getProperty("transportTo");
 		}
-		
-		toEPR = properties.getProperty("to");
-		transportToEPR = properties.getProperty("transportTo");
 		
 		new Scenario_2_2 ().run();
 	}

Modified: webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_2_3.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_2_3.java?view=diff&rev=451570&r1=450800&r2=451570
==============================================================================
--- webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_2_3.java (original)
+++ webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_2_3.java Sat Sep 30 02:56:57 2006
@@ -14,7 +14,7 @@
  * the License.
  */
 
-package sandesha2.interop.rm1_1.clients;
+package org.apache.sandesha2.interop.rm1_1_clients;
 
 import java.io.File;
 import java.io.IOException;
@@ -52,7 +52,7 @@
 	private final static String EchoStringReturn = "EchoStringReturn";
 	
 	private static String toIP = "127.0.0.1";
-	private static String toPort = "9762";
+	private static String toPort = "8080";
 	private static String transportToIP = "127.0.0.1";
 	private static String transportToPort = "8070";
 	private static String servicePart = "/axis2/services/RMInteropService";
@@ -80,11 +80,10 @@
 		Properties properties = new Properties();
 		if (in != null) {
 			properties.load(in);
+			toAddress = properties.getProperty("to");
+			transportToEPR = properties.getProperty("transportTo");
 		}
 		
-		toAddress = properties.getProperty("to");
-		transportToEPR = properties.getProperty("transportTo");
-		
 		new Scenario_2_3 ().run();
 	}
 	
@@ -105,15 +104,16 @@
 		
 		EndpointReference toEPR = new EndpointReference (toAddress);
 		
-		
 		OMFactory factory = OMAbstractFactory.getOMFactory();
 		OMNamespace namespace = factory.createOMNamespace("urn:wsrm:InteropOptions","rmi");
 		OMElement acceptOfferElem = factory.createOMElement("acceptOffer",namespace);
 		OMElement useOfferElem = factory.createOMElement("useOffer",namespace);
 		acceptOfferElem.setText("false");
 		useOfferElem.setText("false");
+		
 		toEPR.addReferenceParameter(acceptOfferElem);
 		toEPR.addReferenceParameter(useOfferElem);
+		
 //		clientOptions.setManageSession(true); // without this reference params wont go.
 		serviceClient.setTargetEPR(toEPR);
 		

Added: webservices/sandesha/trunk/java/interop/src/org/tempuri/EchoStringRequest.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/interop/src/org/tempuri/EchoStringRequest.java?view=auto&rev=451570
==============================================================================
--- webservices/sandesha/trunk/java/interop/src/org/tempuri/EchoStringRequest.java (added)
+++ webservices/sandesha/trunk/java/interop/src/org/tempuri/EchoStringRequest.java Sat Sep 30 02:56:57 2006
@@ -0,0 +1,340 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.tempuri;
+
+/**
+ * EchoStringRequest bean class
+ */
+
+public class EchoStringRequest implements org.apache.axis2.databinding.ADBBean {
+
+	public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
+			"http://tempuri.org/", "EchoStringRequest", "ns1");
+
+	/**
+	 * field for EchoString
+	 */
+
+	protected org.tempuri.EchoStringRequestBodyType localEchoString;
+
+	/*
+	 * This tracker boolean wil be used to detect whether the user called the
+	 * set method for this attribute. It will be used to determine whether to
+	 * include this field in the serialized XML
+	 */
+	protected boolean localEchoStringTracker = false;
+
+	/**
+	 * Auto generated getter method
+	 * 
+	 * @return org.tempuri.EchoStringRequestBodyType
+	 */
+	public org.tempuri.EchoStringRequestBodyType getEchoString() {
+		return localEchoString;
+	}
+
+	/**
+	 * Auto generated setter method
+	 * 
+	 * @param param
+	 *            EchoString
+	 */
+	public void setEchoString(org.tempuri.EchoStringRequestBodyType param) {
+
+		// update the setting tracker
+		localEchoStringTracker = true;
+
+		this.localEchoString = param;
+
+	}
+
+	/**
+	 * 
+	 * @param parentQName
+	 * @param factory
+	 * @return org.apache.axiom.om.OMElement
+	 */
+	public org.apache.axiom.om.OMElement getOMElement(
+			final javax.xml.namespace.QName parentQName,
+			final org.apache.axiom.om.OMFactory factory) {
+
+		org.apache.axiom.om.OMDataSource dataSource = new org.apache.axis2.databinding.ADBDataSource(
+				this, parentQName) {
+
+			public void serialize(javax.xml.stream.XMLStreamWriter xmlWriter)
+					throws javax.xml.stream.XMLStreamException {
+
+				java.lang.String prefix = parentQName.getPrefix();
+				java.lang.String namespace = parentQName.getNamespaceURI();
+
+				if (namespace != null) {
+					java.lang.String writerPrefix = xmlWriter
+							.getPrefix(namespace);
+					if (writerPrefix != null) {
+						xmlWriter.writeStartElement(namespace, parentQName
+								.getLocalPart());
+					} else {
+						if (prefix == null) {
+							prefix = org.apache.axis2.databinding.utils.BeanUtil
+									.getUniquePrefix();
+						}
+
+						xmlWriter.writeStartElement(prefix, parentQName
+								.getLocalPart(), namespace);
+						xmlWriter.writeNamespace(prefix, namespace);
+						xmlWriter.setPrefix(prefix, namespace);
+					}
+				} else {
+					xmlWriter.writeStartElement(parentQName.getLocalPart());
+				}
+
+				if (localEchoStringTracker) {
+					if (localEchoString == null) {
+
+						java.lang.String namespace2 = "";
+
+						if (!namespace2.equals("")) {
+							java.lang.String prefix2 = xmlWriter
+									.getPrefix(namespace2);
+
+							if (prefix2 == null) {
+								prefix2 = org.apache.axis2.databinding.utils.BeanUtil
+										.getUniquePrefix();
+
+								xmlWriter.writeStartElement(prefix2,
+										"echoString", namespace2);
+								xmlWriter.writeNamespace(prefix2, namespace2);
+								xmlWriter.setPrefix(prefix2, namespace2);
+
+							} else {
+								xmlWriter.writeStartElement(namespace2,
+										"echoString");
+							}
+
+						} else {
+							xmlWriter.writeStartElement("echoString");
+						}
+
+						// write the nil attribute
+						writeAttribute("xsi",
+								"http://www.w3.org/2001/XMLSchema-instance",
+								"nil", "true", xmlWriter);
+						xmlWriter.writeEndElement();
+					} else {
+						localEchoString
+								.getOMElement(
+										new javax.xml.namespace.QName("",
+												"echoString"), factory)
+								.serialize(xmlWriter);
+					}
+				}
+
+				xmlWriter.writeEndElement();
+
+			}
+
+			/**
+			 * Util method to write an attribute with the ns prefix
+			 */
+			private void writeAttribute(java.lang.String prefix,
+					java.lang.String namespace, java.lang.String attName,
+					java.lang.String attValue,
+					javax.xml.stream.XMLStreamWriter xmlWriter)
+					throws javax.xml.stream.XMLStreamException {
+				if (xmlWriter.getPrefix(namespace) == null) {
+					xmlWriter.writeNamespace(prefix, namespace);
+					xmlWriter.setPrefix(prefix, namespace);
+
+				}
+
+				xmlWriter.writeAttribute(namespace, attName, attValue);
+
+			}
+
+			/**
+			 * Util method to write an attribute without the ns prefix
+			 */
+			private void writeAttribute(java.lang.String namespace,
+					java.lang.String attName, java.lang.String attValue,
+					javax.xml.stream.XMLStreamWriter xmlWriter)
+					throws javax.xml.stream.XMLStreamException {
+
+				registerPrefix(xmlWriter, namespace);
+
+				xmlWriter.writeAttribute(namespace, attName, attValue);
+			}
+
+			/**
+			 * Register a namespace prefix
+			 */
+			private java.lang.String registerPrefix(
+					javax.xml.stream.XMLStreamWriter xmlWriter,
+					java.lang.String namespace)
+					throws javax.xml.stream.XMLStreamException {
+				java.lang.String prefix = xmlWriter.getPrefix(namespace);
+
+				if (prefix == null) {
+					prefix = createPrefix();
+
+					while (xmlWriter.getNamespaceContext().getNamespaceURI(
+							prefix) != null) {
+						prefix = createPrefix();
+					}
+
+					xmlWriter.writeNamespace(prefix, namespace);
+					xmlWriter.setPrefix(prefix, namespace);
+				}
+
+				return prefix;
+			}
+
+			/**
+			 * Create a prefix
+			 */
+			private java.lang.String createPrefix() {
+				return "ns" + (int) Math.random();
+			}
+		};
+
+		// ignore the QName passed in - we send only OUR QName!
+		return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(MY_QNAME,
+				factory, dataSource);
+
+	}
+
+	/**
+	 * databinding method to get an XML representation of this object
+	 * 
+	 */
+	public javax.xml.stream.XMLStreamReader getPullParser(
+			javax.xml.namespace.QName qName) {
+
+		java.util.ArrayList elementList = new java.util.ArrayList();
+		java.util.ArrayList attribList = new java.util.ArrayList();
+
+		if (localEchoStringTracker) {
+			elementList.add(new javax.xml.namespace.QName("", "echoString"));
+
+			elementList.add(localEchoString == null ? null : localEchoString);
+		}
+
+		return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(
+				qName, elementList.toArray(), attribList.toArray());
+
+	}
+
+	/**
+	 * Factory class that keeps the parse method
+	 */
+	public static class Factory {
+
+		/**
+		 * static method to create the object Precondition: If this object is an
+		 * element, the current or next start element starts this object and any
+		 * intervening reader events are ignorable If this object is not an
+		 * element, it is a complex type and the reader is at the event just
+		 * after the outer start element Postcondition: If this object is an
+		 * element, the reader is positioned at its end element If this object
+		 * is a complex type, the reader is positioned at the end element of its
+		 * outer element
+		 */
+		public static EchoStringRequest parse(
+				javax.xml.stream.XMLStreamReader reader)
+				throws java.lang.Exception {
+			EchoStringRequest object = new EchoStringRequest();
+			int event;
+			try {
+
+				while (!reader.isStartElement() && !reader.isEndElement())
+					reader.next();
+
+				if (reader.getAttributeValue(
+						"http://www.w3.org/2001/XMLSchema-instance", "type") != null) {
+					java.lang.String fullTypeName = reader
+							.getAttributeValue(
+									"http://www.w3.org/2001/XMLSchema-instance",
+									"type");
+					if (fullTypeName != null) {
+						java.lang.String nsPrefix = fullTypeName.substring(0,
+								fullTypeName.indexOf(":"));
+						nsPrefix = nsPrefix == null ? "" : nsPrefix;
+
+						java.lang.String type = fullTypeName
+								.substring(fullTypeName.indexOf(":") + 1);
+						if (!"EchoStringRequest".equals(type)) {
+							// find namespace for the prefix
+							java.lang.String nsUri = reader
+									.getNamespaceContext().getNamespaceURI(
+											nsPrefix);
+							return (EchoStringRequest) org.tempuri.ExtensionMapper
+									.getTypeObject(nsUri, type, reader);
+						}
+
+					}
+
+				}
+
+				// Note all attributes that were handled. Used to differ normal
+				// attributes
+				// from anyAttributes.
+				java.util.Vector handledAttributes = new java.util.Vector();
+
+				boolean isReaderMTOMAware = false;
+
+				try {
+					isReaderMTOMAware = java.lang.Boolean.TRUE
+							.equals(reader
+									.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
+				} catch (java.lang.IllegalArgumentException e) {
+					isReaderMTOMAware = false;
+				}
+
+				reader.next();
+
+				while (!reader.isStartElement() && !reader.isEndElement())
+					reader.next();
+
+				if (reader.isStartElement()
+						&& new javax.xml.namespace.QName("", "echoString")
+								.equals(reader.getName())) {
+
+					object
+							.setEchoString(org.tempuri.EchoStringRequestBodyType.Factory
+									.parse(reader));
+
+					reader.next();
+
+				} // End of if for expected property start element
+
+				while (!reader.isStartElement() && !reader.isEndElement())
+					reader.next();
+				if (reader.isStartElement())
+					// A start element we are not expecting indicates a trailing
+					// invalid property
+					throw new java.lang.RuntimeException(
+							"Unexpected subelement " + reader.getLocalName());
+
+			} catch (javax.xml.stream.XMLStreamException e) {
+				throw new java.lang.Exception(e);
+			}
+
+			return object;
+		}
+
+	}// end of factory class
+
+}



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