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

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

Author: chamikara
Date: Thu Oct  5 00:56:36 2006
New Revision: 453129

URL: http://svn.apache.org/viewvc?view=rev&rev=453129
Log:
Updated interop service and clients.


Added:
    webservices/sandesha/trunk/java/interop/src/org/tempuri/EchoString.java
    webservices/sandesha/trunk/java/interop/src/org/tempuri/Ping.java
Removed:
    webservices/sandesha/trunk/java/interop/src/org/tempuri/EchoStringRequest.java
    webservices/sandesha/trunk/java/interop/src/org/tempuri/EchoStringRequestBodyType1.java
    webservices/sandesha/trunk/java/interop/src/org/tempuri/EchoStringResponseBodyType0.java
    webservices/sandesha/trunk/java/interop/src/org/tempuri/PingRequest.java
Modified:
    webservices/sandesha/trunk/java/interop/conf/RMInteropService.wsdl
    webservices/sandesha/trunk/java/interop/conf/sandesha2_interop.properties
    webservices/sandesha/trunk/java/interop/conf/services.xml
    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/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
    webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/rm1_1_clients/Scenario_4_1.java
    webservices/sandesha/trunk/java/interop/src/org/tempuri/EchoStringRequestBodyType.java
    webservices/sandesha/trunk/java/interop/src/org/tempuri/EchoStringResponse.java
    webservices/sandesha/trunk/java/interop/src/org/tempuri/EchoStringResponseBodyType.java

Modified: webservices/sandesha/trunk/java/interop/conf/RMInteropService.wsdl
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/interop/conf/RMInteropService.wsdl?view=diff&rev=453129&r1=453128&r2=453129
==============================================================================
--- webservices/sandesha/trunk/java/interop/conf/RMInteropService.wsdl (original)
+++ webservices/sandesha/trunk/java/interop/conf/RMInteropService.wsdl Thu Oct  5 00:56:36 2006
@@ -7,11 +7,14 @@
 	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">
+			elementFormDefault="qualified" >
+			
+			<xsd:element name="Ping">
 				<xsd:complexType>
 					<xsd:sequence>
 						<xsd:element name="Text" minOccurs="0"
@@ -19,14 +22,7 @@
 					</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"
@@ -35,58 +31,51 @@
 						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:element name="echoString" type="tns:EchoStringRequest.BodyType" nillable="true" /> 
+
 			<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>
+			
+			<xsd:element name="echoStringResponse" type="tns:EchoStringResponse.BodyType" nillable="true"/>
+
+        </xsd:schema>
+		
 	</wsdl:types>
+	
+	
 	<wsdl:message name="EchoStringRequest">
-		<wsdl:part name="part1" element="tns:EchoStringRequest" />
+		<wsdl:part name="part1" element="tns:echoString" />
 	</wsdl:message>
+	
 	<wsdl:message name="EchoStringResponse">
-		<wsdl:part name="part1" element="tns:EchoStringResponse" />
+		<wsdl:part name="part1" element="tns:echoStringResponse" />
 	</wsdl:message>
+	
 	<wsdl:message name="PingRequest">
-		<wsdl:part name="part1" element="tns:PingRequest" />
+		<wsdl:part name="part1" element="tns:Ping" />
 	</wsdl:message>
-	<wsdl:portType name="RMInteropServicePortType">
+	
+    <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:portType>
+	
 	<wsdl:binding name="RMInteropServiceSOAP11Binding"
 		type="tns:RMInteropServicePortType">
 		<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
@@ -107,27 +96,13 @@
 				<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" />
@@ -138,6 +113,7 @@
 				<soap12:body use="literal" />
 			</wsdl:output>
 		</wsdl:operation>
+		
 		<wsdl:operation name="Ping">
 			<soap12:operation soapAction="urn:wsrm:Ping"
 				style="document" />
@@ -145,24 +121,9 @@
 				<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">
@@ -173,4 +134,5 @@
 			<soap12:address location="http://www.example.org/" />
 		</wsdl:port>
 	</wsdl:service>
+	
 </wsdl:definitions>

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=453129&r1=453128&r2=453129
==============================================================================
--- webservices/sandesha/trunk/java/interop/conf/sandesha2_interop.properties (original)
+++ webservices/sandesha/trunk/java/interop/conf/sandesha2_interop.properties Thu Oct  5 00:56:36 2006
@@ -1,3 +1,26 @@
-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
\ No newline at end of file
+#to=http://216.75.63.32:6172/soap/RMInteropService
+#transportTo=http://localhost:8070/soap/RMInteropService
+
+to=http://127.0.0.1:8070/axis2/services/SecRMInteropService
+transportTo=http://127.0.0.1:8070/axis2/services/SecRMInteropService
+
+#to=http://131.107.72.15/MicrosoftWsrx/ReliablePing
+#transportTo=http://127.0.0.1:8070/MicrosoftWsrx/ReliablePing
+
+#to=http://216.75.63.32:6182/tungsten/soap/RMInteropService
+#transportTo=http://localhost:8070/tungsten/soap/RMInteropService
+
+#to=http://131.107.72.15/MicrosoftWsrx
+#transportTo=http://localhost:8070/MicrosoftWsrx
+
+#to=http://131.107.72.15/MicrosoftWsrx/ReliablePingAddressable
+#transportTo=http://127.0.0.1:8070/MicrosoftWsrx/ReliablePingAddressable
+
+#to=http://127.0.0.1:9762/tungsten/soap/RMInteropService
+#transportTo=http://127.0.0.1:8070/tungsten/soap/RMInteropService
+
+#to=http://131.107.72.15/MicrosoftWsrx/ReliableEchoString
+#transportTo=http://127.0.0.1:8070/MicrosoftWsrx/ReliableEchoString
+
+#to=http://131.107.72.15/MicrosoftWsrx/ReliableEchoStringWithoutOffer
+#transportTo=http://localhost:8070/MicrosoftWsrx/ReliableEchoStringWithoutOffer
\ No newline at end of file

Modified: webservices/sandesha/trunk/java/interop/conf/services.xml
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/interop/conf/services.xml?view=diff&rev=453129&r1=453128&r2=453129
==============================================================================
--- webservices/sandesha/trunk/java/interop/conf/services.xml (original)
+++ webservices/sandesha/trunk/java/interop/conf/services.xml Thu Oct  5 00:56:36 2006
@@ -1,42 +1,25 @@
-<!-- This file was auto-generated from WSDL -->
-<!-- by the Apache Axis2 version: #axisVersion# #today# -->
-<serviceGroup>
-	<service name="RMInteropService">
+<service name="RMInteropService">
+
+	<module ref="sandesha2" />
 	
-	    <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>
+	<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>
+</service>

Modified: 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=diff&rev=453129&r1=453128&r2=453129
==============================================================================
--- webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceCallbackHandler.java (original)
+++ webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceCallbackHandler.java Thu Oct  5 00:56:36 2006
@@ -26,7 +26,7 @@
 
 	/**
 	 * User can pass in any object that needs to be accessed once the
-	 * NonBlocking Web service call is finished and appropreate method of this
+	 * NonBlocking Web service call is finished and appropriate method of this
 	 * CallBack is called.
 	 * 
 	 * @param clientData
@@ -38,6 +38,13 @@
 	}
 
 	/**
+	 * Please use this constructor if you don't want to set any clientData
+	 */
+	public RMInteropServiceCallbackHandler() {
+		this.clientData = null;
+	}
+
+	/**
 	 * Get the client data
 	 */
 
@@ -49,7 +56,7 @@
 	 * auto generated Axis2 call back method for EchoString method
 	 * 
 	 */
-	public void receiveResultEchoString(org.tempuri.EchoStringResponse param43) {
+	public void receiveResultEchoString(org.tempuri.EchoStringResponse param22) {
 	}
 
 	/**
@@ -57,22 +64,6 @@
 	 * 
 	 */
 	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

Modified: 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=diff&rev=453129&r1=453128&r2=453129
==============================================================================
--- webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceCallbackHandlerImpl.java (original)
+++ webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceCallbackHandlerImpl.java Thu Oct  5 00:56:36 2006
@@ -20,9 +20,11 @@
 
 public class RMInteropServiceCallbackHandlerImpl extends
 		RMInteropServiceCallbackHandler {
-	
+
+	private boolean completed = false;
+
 	public RMInteropServiceCallbackHandlerImpl(Object clientData) {
-		super (clientData);
+		super(clientData);
 	}
 
 	public Object getClientData() {
@@ -30,23 +32,25 @@
 		return super.getClientData();
 	}
 
-	public void receiveErrorechoString(Exception e) {
+	public void receiveErrorEchoString(Exception e) {
 		System.out.println("EchoString callback got error:");
 		e.printStackTrace();
+		completed = true;
 	}
 
-	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);
+		completed = true;
 	}
 
-	public void receiveResultechoString(EchoStringResponse echoStringResponse) {
-		String text = echoStringResponse.getEchoStringResponse().getEchoStringReturn();
-		System.out.println("EchoSting callback got text:" + text);
+	public boolean isCompleted() {
+		return completed;
 	}
 
-	public void receiveResultEchoString(EchoStringResponse echoStringResponse) {
-		receiveResultechoString(echoStringResponse);
+	public void setCompleted(boolean completed) {
+		this.completed = completed;
 	}
-	
-	
+
 }

Modified: 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=diff&rev=453129&r1=453128&r2=453129
==============================================================================
--- webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceMessageReceiverInOnly.java (original)
+++ webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceMessageReceiverInOnly.java Thu Oct  5 00:56:36 2006
@@ -55,19 +55,9 @@
 				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,
+					skel.Ping((org.tempuri.Ping) fromOM(inMessage.getEnvelope()
+							.getBody().getFirstElement(),
+							org.tempuri.Ping.class,
 							getEnvelopeNamespaces(inMessage.getEnvelope())));
 
 				}
@@ -79,10 +69,10 @@
 	}
 
 	//
-	private org.apache.axiom.om.OMElement toOM(
-			org.tempuri.EchoStringRequest param, boolean optimizeContent) {
+	private org.apache.axiom.om.OMElement toOM(org.tempuri.EchoString param,
+			boolean optimizeContent) {
 
-		return param.getOMElement(org.tempuri.EchoStringRequest.MY_QNAME,
+		return param.getOMElement(org.tempuri.EchoString.MY_QNAME,
 				org.apache.axiom.om.OMAbstractFactory.getOMFactory());
 
 	}
@@ -95,10 +85,10 @@
 
 	}
 
-	private org.apache.axiom.om.OMElement toOM(org.tempuri.PingRequest param,
+	private org.apache.axiom.om.OMElement toOM(org.tempuri.Ping param,
 			boolean optimizeContent) {
 
-		return param.getOMElement(org.tempuri.PingRequest.MY_QNAME,
+		return param.getOMElement(org.tempuri.Ping.MY_QNAME,
 				org.apache.axiom.om.OMAbstractFactory.getOMFactory());
 
 	}
@@ -129,30 +119,9 @@
 
 		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)) {
+			if (org.tempuri.EchoString.class.equals(type)) {
 
-				return org.tempuri.EchoStringRequest.Factory.parse(param
+				return org.tempuri.EchoString.Factory.parse(param
 						.getXMLStreamReaderWithoutCaching());
 
 			}
@@ -164,9 +133,9 @@
 
 			}
 
-			if (org.tempuri.PingRequest.class.equals(type)) {
+			if (org.tempuri.Ping.class.equals(type)) {
 
-				return org.tempuri.PingRequest.Factory.parse(param
+				return org.tempuri.Ping.Factory.parse(param
 						.getXMLStreamReaderWithoutCaching());
 
 			}

Modified: 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=diff&rev=453129&r1=453128&r2=453129
==============================================================================
--- webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceMessageReceiverInOut.java (original)
+++ webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceMessageReceiverInOut.java Thu Oct  5 00:56:36 2006
@@ -14,7 +14,6 @@
  * the License.
  */
 
-
 package org.apache.sandesha2.interop;
 
 /**
@@ -56,36 +55,18 @@
 
 				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;
+					org.tempuri.EchoStringResponse param4 = null;
 
 					// doc style
-					org.tempuri.EchoStringRequest wrappedParam = (org.tempuri.EchoStringRequest) fromOM(
+					org.tempuri.EchoString wrappedParam = (org.tempuri.EchoString) fromOM(
 							msgContext.getEnvelope().getBody()
 									.getFirstElement(),
-							org.tempuri.EchoStringRequest.class,
+							org.tempuri.EchoString.class,
 							getEnvelopeNamespaces(msgContext.getEnvelope()));
 
-					param9 = skel.echoString(wrappedParam);
+					param4 = skel.EchoString(wrappedParam);
 
-					envelope = toEnvelope(getSOAPFactory(msgContext), param9,
+					envelope = toEnvelope(getSOAPFactory(msgContext), param4,
 							false);
 
 				}
@@ -98,10 +79,10 @@
 	}
 
 	//
-	private org.apache.axiom.om.OMElement toOM(
-			org.tempuri.EchoStringRequest param, boolean optimizeContent) {
+	private org.apache.axiom.om.OMElement toOM(org.tempuri.EchoString param,
+			boolean optimizeContent) {
 
-		return param.getOMElement(org.tempuri.EchoStringRequest.MY_QNAME,
+		return param.getOMElement(org.tempuri.EchoString.MY_QNAME,
 				org.apache.axiom.om.OMAbstractFactory.getOMFactory());
 
 	}
@@ -114,10 +95,10 @@
 
 	}
 
-	private org.apache.axiom.om.OMElement toOM(org.tempuri.PingRequest param,
+	private org.apache.axiom.om.OMElement toOM(org.tempuri.Ping param,
 			boolean optimizeContent) {
 
-		return param.getOMElement(org.tempuri.PingRequest.MY_QNAME,
+		return param.getOMElement(org.tempuri.Ping.MY_QNAME,
 				org.apache.axiom.om.OMAbstractFactory.getOMFactory());
 
 	}
@@ -148,30 +129,9 @@
 
 		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)) {
+			if (org.tempuri.EchoString.class.equals(type)) {
 
-				return org.tempuri.EchoStringRequest.Factory.parse(param
+				return org.tempuri.EchoString.Factory.parse(param
 						.getXMLStreamReaderWithoutCaching());
 
 			}
@@ -183,9 +143,9 @@
 
 			}
 
-			if (org.tempuri.PingRequest.class.equals(type)) {
+			if (org.tempuri.Ping.class.equals(type)) {
 
-				return org.tempuri.PingRequest.Factory.parse(param
+				return org.tempuri.Ping.Factory.parse(param
 						.getXMLStreamReaderWithoutCaching());
 
 			}

Modified: 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=diff&rev=453129&r1=453128&r2=453129
==============================================================================
--- webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceSkeleton.java (original)
+++ webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceSkeleton.java Thu Oct  5 00:56:36 2006
@@ -28,7 +28,7 @@
 	 * 
 	 */
 	public org.tempuri.EchoStringResponse EchoString(
-			org.tempuri.EchoStringRequest param0)
+			org.tempuri.EchoString param0)
 
 	{
 		// Todo fill this with the necessary business logic
@@ -42,35 +42,7 @@
 	 * @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)
+	public void Ping(org.tempuri.Ping param2)
 
 	{
 		// Todo fill this with the necessary business logic

Modified: 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=diff&rev=453129&r1=453128&r2=453129
==============================================================================
--- webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceSkeletonImpl.java (original)
+++ webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceSkeletonImpl.java Thu Oct  5 00:56:36 2006
@@ -18,41 +18,69 @@
 
 import java.util.HashMap;
 
-import org.tempuri.EchoStringRequest;
 import org.tempuri.EchoStringResponse;
-import org.tempuri.PingRequest;
+import org.tempuri.EchoStringResponseBodyType;
 
 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 + "'.") ;
-		
+	HashMap sequenceTextMap = new HashMap();
+
+	public EchoStringResponse EchoString(org.tempuri.EchoString echoString) {
+
+		String sequence = echoString.getEchoString().getSequence();
+		String text = echoString.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;
+		String newText = oldText == null ? text : oldText + text;
+
 		sequenceTextMap.put(sequence, newText);
-		
-		EchoStringResponse echoStringResponse = new EchoStringResponse ();
+
+		EchoStringResponse echoStringResponse = new EchoStringResponse();
+		echoStringResponse
+				.setEchoStringResponse(new EchoStringResponseBodyType());
 		echoStringResponse.getEchoStringResponse().setEchoStringReturn(newText);
-		
-		return echoStringResponse;
-	}
 
-	public EchoStringResponse EchoString(EchoStringRequest echoStringRequest) {
-		return echoString(echoStringRequest);
+		return echoStringResponse;
 	}
 
-	public void ping(PingRequest pingRequest) {
-		String text = pingRequest.getText();
+	public void Ping(org.tempuri.Ping ping) {
+		String text = ping.getText();
 		System.out.println("Ping got text '" + text + "'");
 	}
 
-	public void Ping(PingRequest pingRequest) {
-		ping(pingRequest);
-	}
+	// 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);
+	// }
 
 }

Modified: 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=diff&rev=453129&r1=453128&r2=453129
==============================================================================
--- webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceStub.java (original)
+++ webservices/sandesha/trunk/java/interop/src/org/apache/sandesha2/interop/RMInteropServiceStub.java Thu Oct  5 00:56:36 2006
@@ -30,7 +30,7 @@
 
 	private java.util.HashMap faultMessageMap = new java.util.HashMap();
 
-	private void populateAxisService() {
+	private void populateAxisService() throws org.apache.axis2.AxisFault {
 
 		// creating the Service with a unique name
 		_service = new org.apache.axis2.description.AxisService(
@@ -39,35 +39,25 @@
 		// creating the operations
 		org.apache.axis2.description.AxisOperation __operation;
 
-		_operations = new org.apache.axis2.description.AxisOperation[4];
+		_operations = new org.apache.axis2.description.AxisOperation[2];
 
 		__operation = new org.apache.axis2.description.OutInAxisOperation();
 
 		__operation.setName(new javax.xml.namespace.QName("", "EchoString"));
 
 		_operations[0] = __operation;
+
 		_service.addOperation(__operation);
+		__operation.applyPolicy(new org.apache.neethi.Policy());
 
 		__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);
+		__operation.applyPolicy(new org.apache.neethi.Policy());
 
 	}
 
@@ -118,12 +108,12 @@
 	 * Auto generated method signature
 	 * 
 	 * @see org.apache.sandesha2.interop.RMInteropService#EchoString
-	 * @param param48
+	 * @param param24
 	 * 
 	 */
 	public org.tempuri.EchoStringResponse EchoString(
 
-	org.tempuri.EchoStringRequest param48) throws java.rmi.RemoteException
+	org.tempuri.EchoString param24) throws java.rmi.RemoteException
 
 	{
 		try {
@@ -139,7 +129,7 @@
 			// Style is Doc.
 
 			env = toEnvelope(getFactory(_operationClient.getOptions()
-					.getSoapVersionURI()), param48,
+					.getSoapVersionURI()), param24,
 					optimizeContent(new javax.xml.namespace.QName("",
 							"EchoString")));
 
@@ -230,12 +220,12 @@
 	 * Auto generated method signature for Asynchronous Invocations
 	 * 
 	 * @see org.apache.sandesha2.interop.RMInteropService#startEchoString
-	 * @param param48
+	 * @param param24
 	 * 
 	 */
 	public void startEchoString(
 
-			org.tempuri.EchoStringRequest param48,
+			org.tempuri.EchoString param24,
 			final org.apache.sandesha2.interop.RMInteropServiceCallbackHandler callback)
 
 	throws java.rmi.RemoteException {
@@ -252,7 +242,7 @@
 
 		env = toEnvelope(
 				getFactory(_operationClient.getOptions().getSoapVersionURI()),
-				param48,
+				param24,
 				optimizeContent(new javax.xml.namespace.QName("", "EchoString")));
 
 		// adding SOAP headers
@@ -295,7 +285,7 @@
 
 	}
 
-	public void Ping(org.tempuri.PingRequest param50
+	public void Ping(org.tempuri.Ping param26
 
 	) throws java.rmi.RemoteException {
 
@@ -309,7 +299,7 @@
 		// Style is Doc.
 
 		env = toEnvelope(getFactory(_operationClient.getOptions()
-				.getSoapVersionURI()), param50,
+				.getSoapVersionURI()), param26,
 				optimizeContent(new javax.xml.namespace.QName("", "Ping")));
 
 		// adding SOAP headers
@@ -326,217 +316,6 @@
 	}
 
 	/**
-	 * 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(
@@ -567,10 +346,10 @@
 	}
 
 	// http://www.example.org/
-	private org.apache.axiom.om.OMElement toOM(
-			org.tempuri.EchoStringRequest param, boolean optimizeContent) {
+	private org.apache.axiom.om.OMElement toOM(org.tempuri.EchoString param,
+			boolean optimizeContent) {
 
-		return param.getOMElement(org.tempuri.EchoStringRequest.MY_QNAME,
+		return param.getOMElement(org.tempuri.EchoString.MY_QNAME,
 				org.apache.axiom.om.OMAbstractFactory.getOMFactory());
 
 	}
@@ -583,35 +362,34 @@
 
 	}
 
-	private org.apache.axiom.om.OMElement toOM(org.tempuri.PingRequest param,
+	private org.apache.axiom.om.OMElement toOM(org.tempuri.Ping param,
 			boolean optimizeContent) {
 
-		return param.getOMElement(org.tempuri.PingRequest.MY_QNAME,
+		return param.getOMElement(org.tempuri.Ping.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.tempuri.EchoString param, boolean optimizeContent) {
 		org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory
 				.getDefaultEnvelope();
 
 		emptyEnvelope.getBody().addChild(
-				param.getOMElement(org.tempuri.EchoStringRequest.MY_QNAME,
-						factory));
+				param.getOMElement(org.tempuri.EchoString.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.SOAPFactory factory, org.tempuri.Ping param,
+			boolean optimizeContent) {
 		org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory
 				.getDefaultEnvelope();
 
 		emptyEnvelope.getBody().addChild(
-				param.getOMElement(org.tempuri.PingRequest.MY_QNAME, factory));
+				param.getOMElement(org.tempuri.Ping.MY_QNAME, factory));
 
 		return emptyEnvelope;
 	}
@@ -629,30 +407,9 @@
 
 		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)) {
+			if (org.tempuri.EchoString.class.equals(type)) {
 
-				return org.tempuri.EchoStringRequest.Factory.parse(param
+				return org.tempuri.EchoString.Factory.parse(param
 						.getXMLStreamReaderWithoutCaching());
 
 			}
@@ -664,9 +421,9 @@
 
 			}
 
-			if (org.tempuri.PingRequest.class.equals(type)) {
+			if (org.tempuri.Ping.class.equals(type)) {
 
-				return org.tempuri.PingRequest.Factory.parse(param
+				return org.tempuri.Ping.Factory.parse(param
 						.getXMLStreamReaderWithoutCaching());
 
 			}

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=453129&r1=453128&r2=453129
==============================================================================
--- 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 Thu Oct  5 00:56:36 2006
@@ -41,7 +41,7 @@
 import org.apache.sandesha2.client.SandeshaClientConstants;
 import org.apache.sandesha2.client.SequenceReport;
 import org.apache.sandesha2.interop.RMInteropServiceStub;
-import org.tempuri.PingRequest;
+import org.tempuri.Ping;
 
 public class Scenario_1_1 {
 
@@ -84,7 +84,8 @@
 
 
 //		new Scenario_1_1 ().run();
-		new Scenario_1_1 ().runStub();
+		
+		new Scenario_1_1 ().runStubBased ();
 	}
 	
 	private void run () throws Exception {
@@ -102,7 +103,22 @@
 		serviceClient.fireAndForget(getPingOMBlock("ping2"));
 		serviceClient.fireAndForget(getPingOMBlock("ping3"));
 		
-		terminateSequence(serviceClient);
+		SequenceReport sequenceReport = null;		
+		boolean complete = false;
+		while (!complete) {
+			sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
+			if (sequenceReport!=null && sequenceReport.getCompletedMessages().size()==1) 
+				complete = true;
+			else {
+				try {
+					Thread.sleep(1000);
+				} catch (InterruptedException e1) {
+					e1.printStackTrace();
+	    		}
+			}
+		} 		
+		
+		SandeshaClient.terminateSequence(serviceClient);
 		
 		serviceClient.finalizeInvoke();
 	}
@@ -119,28 +135,47 @@
 		return pingElem;
 	}
 	
-	private void runStub () throws Exception {
+	private void runStubBased () throws Exception {
 		String targetEndpoint = toEPR;
 		ConfigurationContext configurationContext = generateConfigContext();
 		
 		RMInteropServiceStub stub = new RMInteropServiceStub (configurationContext, targetEndpoint);
-		setUpOptions(stub._getServiceClient().getOptions());
+		ServiceClient stubServiceClient = stub._getServiceClient();
+		setUpOptions(stubServiceClient.getOptions());
 		
-		PingRequest pingRequest = new PingRequest ();
-		pingRequest.setText("ping1");
-		stub.ping(pingRequest);
+		Ping ping = new Ping ();
+		ping.setText("ping1");
+		stub.Ping (ping);
+		
+		ping = new Ping ();
+		ping.setText("ping2");
+		stub.Ping (ping);
+		
+		ping = new Ping ();
+		ping.setText("ping3");
+		stub.Ping (ping);
 		
-		pingRequest = new PingRequest ();
-		pingRequest.setText("ping2");
-		stub.ping(pingRequest);
 		
-		pingRequest = new PingRequest ();
-		pingRequest.setText("ping3");
-		stub.ping(pingRequest);
+		SequenceReport sequenceReport = null;		
+		boolean complete = false;
+		while (!complete) {
+			sequenceReport = SandeshaClient.getOutgoingSequenceReport(stubServiceClient);
+			if (sequenceReport!=null && sequenceReport.getCompletedMessages().size()==3) 
+				complete = true;
+			else {
+				try {
+					Thread.sleep(1000);
+				} catch (InterruptedException e1) {
+					e1.printStackTrace();
+	    		}
+			}
+		} 		
 		
-		terminateSequence(stub._getServiceClient());
-		stub._getServiceClient().finalizeInvoke();
+		SandeshaClient.terminateSequence(stubServiceClient);
+		
+		Thread.sleep(3000);
 		
+		stub._getServiceClient().finalizeInvoke();
 	}
 	
 	private ConfigurationContext generateConfigContext () throws Exception {
@@ -173,23 +208,5 @@
 		
 	}
 	
-	private void terminateSequence (ServiceClient serviceClient) throws SandeshaException {
-		SequenceReport sequenceReport = null;		
-		boolean complete = false;
-		while (!complete) {
-			sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
-			if (sequenceReport!=null && sequenceReport.getCompletedMessages().size()==3) 
-				complete = true;
-			else {
-				try {
-					Thread.sleep(1000);
-				} catch (InterruptedException e1) {
-					e1.printStackTrace();
-	    		}
-			}
-		} 		
-		
-		SandeshaClient.terminateSequence(serviceClient);
-	}
 	
 }

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=453129&r1=453128&r2=453129
==============================================================================
--- 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 Thu Oct  5 00:56:36 2006
@@ -34,9 +34,11 @@
 import org.apache.axis2.context.ConfigurationContextFactory;
 import org.apache.axis2.context.MessageContextConstants;
 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;
 
 public class Scenario_1_2 {
 
@@ -56,7 +58,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)
@@ -78,47 +80,21 @@
 		}
 		
 		new Scenario_1_2 ().run();
+//		new Scenario_1_2 ().runStubBased ();
 	}
 	
-	private void run () throws AxisFault {
+	private void run () throws Exception {
 		
-		if ("<SANDESHA2_HOME>".equals(SANDESHA2_HOME)){
-			System.out.println("ERROR: Please change <SANDESHA2_HOME> to your Sandesha2 installation directory.");
-			return;
-		}
-		
-		String axis2_xml = AXIS2_CLIENT_PATH + "client_axis2.xml";
-		ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(AXIS2_CLIENT_PATH,axis2_xml);
+		ConfigurationContext configurationContext = generateConfigContext();
 		Options clientOptions = new Options ();
-		clientOptions.setProperty(MessageContextConstants.TRANSPORT_URL,transportToEPR);
-//		clientOptions.setProperty(Options.COPY_PROPERTIES, new Boolean (true));
-		clientOptions.setTo(new EndpointReference (toEPR));
-		
-		String sequenceKey = "sequence1";
-		clientOptions.setProperty(SandeshaClientConstants.SEQUENCE_KEY,sequenceKey);
-	    
-//		clientOptions.setProperty(MessageContextConstants.CHUNKED,Constants.VALUE_FALSE);   //uncomment this to send messages without chunking.
-		
-//		clientOptions.setProperty(AddressingConstants.WS_ADDRESSING_VERSION,AddressingConstants.Submission.WSA_NAMESPACE);
-
-		clientOptions.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);   //uncomment this to send messages in SOAP 1.2
-		
-		clientOptions.setProperty(SandeshaClientConstants.RM_SPEC_VERSION,Sandesha2Constants.SPEC_VERSIONS.v1_1);  //uncomment this to send the messages according to the v1_1 spec.
-		
-		clientOptions.setAction("urn:wsrm:Ping");
-		
-		ServiceClient serviceClient = new ServiceClient (configContext,null);		
+		setUpOptions(clientOptions);
 		
+		ServiceClient serviceClient = new ServiceClient (configurationContext,null);		
 		serviceClient.setOptions(clientOptions);
-		
-		clientOptions.setProperty(SandeshaClientConstants.DUMMY_MESSAGE,Sandesha2Constants.VALUE_TRUE);
-		clientOptions.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
-		serviceClient.fireAndForget(getPingOMBlock("ping31"));
-		
-		clientOptions.setProperty(SandeshaClientConstants.DUMMY_MESSAGE,Sandesha2Constants.VALUE_FALSE);
 
-		SequenceReport sequenceReport = null;
+		SandeshaClient.createSequence(serviceClient, false);
 		
+		SequenceReport sequenceReport = null;
 		boolean established = false;
 		while (!established) {
 			sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
@@ -165,5 +141,85 @@
 
 		return pingElem;
 	}
+	
+	
+	private void runStubBased () throws Exception {
+		String targetEndpoint = toEPR;
+		ConfigurationContext configurationContext = generateConfigContext();
+		
+		RMInteropServiceStub stub = new RMInteropServiceStub (configurationContext, targetEndpoint);
+		
+		setUpOptions(stub._getServiceClient().getOptions());
+		ServiceClient stubServiceClient = stub._getServiceClient();
+		Options clientOptions = stubServiceClient.getOptions();
+		
+//		stubServiceClient.setOptions(clientOptions);
+		
+		setUpOptions(clientOptions);
+		
+		SandeshaClient.createSequence(stubServiceClient, false);
+		
+		SequenceReport sequenceReport = null;
+		boolean established = false;
+		while (!established) {
+			sequenceReport = SandeshaClient.getOutgoingSequenceReport(stubServiceClient);
+			if (sequenceReport!=null && sequenceReport.getSequenceStatus()>=SequenceReport.SEQUENCE_STATUS_ESTABLISHED) 
+				established = true;
+			else {
+				try {
+					Thread.sleep(100);
+				} catch (InterruptedException e1) {
+					e1.printStackTrace();
+				}
+			} 
+		}
+		
+		SandeshaClient.sendAckRequest(stubServiceClient);
+		
+		SandeshaClient.terminateSequence(stubServiceClient);
+		
+		boolean terminated = false;
+		while (!terminated) {
+			sequenceReport = SandeshaClient.getOutgoingSequenceReport(stubServiceClient);
+			if (sequenceReport!=null && sequenceReport.getSequenceStatus()==SequenceReport.SEQUENCE_STATUS_TERMINATED) 
+				terminated = true;
+			else {
+				try {
+					Thread.sleep(1000);
+				} catch (InterruptedException e1) {
+					e1.printStackTrace();
+				}
+			} 
+		}
+		
+	}
+	
+	private ConfigurationContext generateConfigContext () throws Exception {
+		if ("<SANDESHA2_HOME>".equals(SANDESHA2_HOME)){
+			System.out.println("ERROR: Please change <SANDESHA2_HOME> to your Sandesha2 installation directory.");
+			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);
+
+		return configContext;
+	}
+	
+	private void setUpOptions (Options clientOptions) {
+		clientOptions.setProperty(MessageContextConstants.TRANSPORT_URL,transportToEPR);
+		clientOptions.setTo(new EndpointReference (toEPR));
+		
+		String sequenceKey = "sequence1";
+		clientOptions.setProperty(SandeshaClientConstants.SEQUENCE_KEY,sequenceKey);
+	    
+//		clientOptions.setProperty(MessageContextConstants.CHUNKED,Constants.VALUE_FALSE);   //uncomment this to send messages without chunking.
+		clientOptions.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);   //uncomment this to send messages in SOAP 1.2
+//		clientOptions.setProperty(AddressingConstants.WS_ADDRESSING_VERSION,AddressingConstants.Submission.WSA_NAMESPACE);
+		clientOptions.setProperty(SandeshaClientConstants.RM_SPEC_VERSION,Sandesha2Constants.SPEC_VERSIONS.v1_1);  //uncomment this to send the messages according to the v1_1 spec.
+		
+		clientOptions.setAction("urn:wsrm:Ping");
+	}
+	
 	
 }

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=453129&r1=453128&r2=453129
==============================================================================
--- 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 Thu Oct  5 00:56:36 2006
@@ -25,6 +25,7 @@
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.soap.SOAP12Constants;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Options;
@@ -36,6 +37,8 @@
 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.Ping;
 
 public class Scenario_1_3 {
 
@@ -55,7 +58,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)
@@ -76,38 +79,21 @@
 			transportToEPR = properties.getProperty("transportTo");
 		}
 		
-		new Scenario_1_3 ().run();
+//		new Scenario_1_3 ().run();
+		new Scenario_1_3 ().runStubBased ();
+		
+		Thread.sleep(60000);
 	}
 	
-	private void run () throws AxisFault {
+	private void run () throws Exception {
 		
-		if ("<SANDESHA2_HOME>".equals(SANDESHA2_HOME)){
-			System.out.println("ERROR: Please change <SANDESHA2_HOME> to your Sandesha2 installation directory.");
-			return;
-		}
+
+		ConfigurationContext configurationContext = generateConfigContext();
 		
-		String axis2_xml = AXIS2_CLIENT_PATH + "client_axis2.xml";
-		ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(AXIS2_CLIENT_PATH,axis2_xml);
 		Options clientOptions = new Options ();
-		clientOptions.setProperty(MessageContextConstants.TRANSPORT_URL,transportToEPR);
-//		clientOptions.setProperty(Options.COPY_PROPERTIES, new Boolean (true));
-		clientOptions.setTo(new EndpointReference (toEPR));
-		
-		String sequenceKey = "sequence1";
-		clientOptions.setProperty(SandeshaClientConstants.SEQUENCE_KEY,sequenceKey);
-	    
-//		clientOptions.setProperty(MessageContextConstants.CHUNKED,Constants.VALUE_FALSE);   //uncomment this to send messages without chunking.
-		
-//		clientOptions.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);   //uncomment this to send messages in SOAP 1.2
-		
-		clientOptions.setProperty(SandeshaClientConstants.RM_SPEC_VERSION,Sandesha2Constants.SPEC_VERSIONS.v1_1);  //uncomment this to send the messages according to the v1_1 spec.
-		
-//		clientOptions.setProperty(AddressingConstants.WS_ADDRESSING_VERSION,AddressingConstants.Submission.WSA_NAMESPACE);
-
-		clientOptions.setAction("urn:wsrm:Ping");
+		setUpOptions(clientOptions);
 		
-		ServiceClient serviceClient = new ServiceClient (configContext,null);		
-
+		ServiceClient serviceClient = new ServiceClient (configurationContext,null);		
 		serviceClient.setOptions(clientOptions);
 		
 		clientOptions.setProperty(SandeshaClientConstants.MESSAGE_NUMBER,new Long(1));
@@ -171,6 +157,90 @@
 		pingElem.addChild(textElem);
 
 		return pingElem;
+	}
+	
+	private void runStubBased () throws Exception {
+		
+		ConfigurationContext configurationContext = generateConfigContext();
+		RMInteropServiceStub stub = new RMInteropServiceStub (configurationContext,toEPR);
+		ServiceClient stubServiceClient = stub._getServiceClient();
+		
+		Options options = stubServiceClient.getOptions();
+		setUpOptions(options);
+		
+		options.setProperty(SandeshaClientConstants.MESSAGE_NUMBER,new Long(1));
+		Ping ping = new Ping ();
+		ping.setText("ping1");
+		stub.Ping(ping);
+		
+		options.setProperty(SandeshaClientConstants.MESSAGE_NUMBER,new Long(3));
+		ping = new Ping ();
+		ping.setText("ping2");
+		stub.Ping(ping);
+		
+		boolean complete = false;
+		while (!complete) {
+			SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(stubServiceClient);
+			if (sequenceReport!=null && sequenceReport.getCompletedMessages().size()==2) 
+				complete = true;
+			else {
+				try {
+					Thread.sleep(1000);
+				} catch (InterruptedException e1) {
+					e1.printStackTrace();
+				}
+			} 
+		}
+
+		SandeshaClient.closeSequence(stubServiceClient);
+		
+		try {
+			Thread.sleep(6000);
+		} catch (InterruptedException e) {
+			e.printStackTrace();
+		}
+		
+		SandeshaClient.terminateSequence(stubServiceClient);
+		
+		try {
+			Thread.sleep(3000000);
+		} catch (InterruptedException e) {
+			e.printStackTrace();
+		}
+		
+		stubServiceClient.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.");
+			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);
+
+		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));
+		
+		String sequenceKey = "sequence1";
+		clientOptions.setProperty(SandeshaClientConstants.SEQUENCE_KEY,sequenceKey);
+	    
+//		clientOptions.setProperty(MessageContextConstants.CHUNKED,Constants.VALUE_FALSE);   //uncomment this to send messages without chunking.
+		
+		clientOptions.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);   //uncomment this to send messages in SOAP 1.2
+//		clientOptions.setProperty(AddressingConstants.WS_ADDRESSING_VERSION,AddressingConstants.Submission.WSA_NAMESPACE);
+		clientOptions.setProperty(SandeshaClientConstants.RM_SPEC_VERSION,Sandesha2Constants.SPEC_VERSIONS.v1_1);  //uncomment this to send the messages according to the v1_1 spec.
+		
+		clientOptions.setAction("urn:wsrm:Ping");
+		
 	}
 	
 }

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=453129&r1=453128&r2=453129
==============================================================================
--- 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 Thu Oct  5 00:56:36 2006
@@ -25,6 +25,7 @@
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.soap.SOAP12Constants;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
@@ -37,6 +38,8 @@
 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.Ping;
 
 public class Scenario_1_4 {
 
@@ -64,7 +67,7 @@
 			+ "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)
@@ -85,56 +88,21 @@
 			transportToEPR = properties.getProperty("transportTo");
 		}
 		
-		new Scenario_1_4().run();
+//		new Scenario_1_4().run();
+		new Scenario_1_4().runStubBased ();
 	}
 
-	private void run() throws AxisFault {
+	private void run() throws Exception {
 
-		if ("<SANDESHA2_HOME>".equals(SANDESHA2_HOME)) {
-			System.out
-					.println("ERROR: Please change <SANDESHA2_HOME> to your Sandesha2 installation directory.");
-			return;
-		}
-
-		String axis2_xml = AXIS2_CLIENT_PATH + "client_axis2.xml";
-		ConfigurationContext configContext = ConfigurationContextFactory
-				.createConfigurationContextFromFileSystem(AXIS2_CLIENT_PATH,
-						axis2_xml);
-		Options clientOptions = new Options();
-		clientOptions.setProperty(MessageContextConstants.TRANSPORT_URL,
-				transportToEPR);
+		ConfigurationContext configurationContext = generateConfigContext();
 		
-//		clientOptions.setProperty(Options.COPY_PROPERTIES, new Boolean(true));
-		clientOptions.setTo(new EndpointReference(toEPR));
-		
-		clientOptions.setAction("urn:wsrm:Ping");
-		
-		ServiceClient serviceClient = new ServiceClient(configContext, null);
+		ServiceClient serviceClient = new ServiceClient(configurationContext, null);
 		
 //		String replyAddress = serviceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress() + "/" + ServiceClient.ANON_OUT_ONLY_OP;
 		String acksToAddress = serviceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress();
 		
-		clientOptions.setProperty(SandeshaClientConstants.AcksTo,acksToAddress);
-		
-//		clientOptions.setReplyTo(new EndpointReference (replyAddress));
-		clientOptions.setTransportInProtocol(Constants.TRANSPORT_HTTP);
-
-		String sequenceKey = "sequence1";
-		clientOptions.setProperty(SandeshaClientConstants.SEQUENCE_KEY, sequenceKey);
-
-		// clientOptions.setProperty(MessageContextConstants.CHUNKED,Constants.VALUE_FALSE);
-		// //uncomment this to send messages without chunking.
-
-//		clientOptions.setProperty(AddressingConstants.WS_ADDRESSING_VERSION,AddressingConstants.Submission.WSA_NAMESPACE);
-
-//		 clientOptions.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
-		// //uncomment this to send messages in SOAP 1.2
-
-		clientOptions.setProperty(SandeshaClientConstants.RM_SPEC_VERSION,
-				Sandesha2Constants.SPEC_VERSIONS.v1_1); // uncomment this to
-														// send the messages
-														// according to the v1_1
-														// spec.
+		Options clientOptions = new Options();
+		setUpOptions(clientOptions,acksToAddress);
 
 		serviceClient.setOptions(clientOptions);
 
@@ -157,7 +125,10 @@
 		}
 
 		SandeshaClient.terminateSequence(serviceClient);
-//		serviceClient.finalizeInvoke();
+		
+		Thread.sleep(3000);
+		
+		serviceClient.finalizeInvoke();
 	}
 
 	private static OMElement getPingOMBlock(String text) {
@@ -171,5 +142,84 @@
 		pingElem.addChild(textElem);
 
 		return pingElem;
+	}
+	
+	private void runStubBased () throws Exception {
+		String targetEndpoint = toEPR;
+		ConfigurationContext configurationContext = generateConfigContext();
+		
+		RMInteropServiceStub stub = new RMInteropServiceStub (configurationContext, targetEndpoint);
+		ServiceClient stubServiceClient = stub._getServiceClient();
+		
+		String acksToAddress = stubServiceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress();
+		
+		setUpOptions(stubServiceClient.getOptions(),acksToAddress);
+		
+		
+		Ping ping = new Ping ();
+		ping.setText("ping1");
+		stub.Ping(ping);
+		
+		ping = new Ping ();
+		ping.setText("ping2");
+		stub.Ping(ping);
+		
+		ping = new Ping ();
+		ping.setText("ping3");
+		stub.Ping(ping);
+		
+		SequenceReport sequenceReport = null;		
+		boolean complete = false;
+		while (!complete) {
+			sequenceReport = SandeshaClient.getOutgoingSequenceReport(stubServiceClient);
+			if (sequenceReport!=null && sequenceReport.getCompletedMessages().size()==3) 
+				complete = true;
+			else {
+				try {
+					Thread.sleep(1000);
+				} catch (InterruptedException e1) {
+					e1.printStackTrace();
+	    		}
+			}
+		} 		
+		
+		SandeshaClient.terminateSequence(stubServiceClient);
+		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.");
+			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);
+
+		return configContext;
+	}
+	
+	private void setUpOptions (Options clientOptions, String acksTo) {
+		clientOptions.setProperty(MessageContextConstants.TRANSPORT_URL,transportToEPR);
+//		clientOptions.setProperty(Options.COPY_PROPERTIES, new Boolean (true));
+		clientOptions.setTo(new EndpointReference (toEPR));
+		
+		String sequenceKey = "sequence1";
+		clientOptions.setProperty(SandeshaClientConstants.SEQUENCE_KEY,sequenceKey);
+	    
+//		clientOptions.setProperty(MessageContextConstants.CHUNKED,Constants.VALUE_FALSE);   //uncomment this to send messages without chunking.
+		
+		clientOptions.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);   //uncomment this to send messages in SOAP 1.2
+//		clientOptions.setProperty(AddressingConstants.WS_ADDRESSING_VERSION,AddressingConstants.Submission.WSA_NAMESPACE);
+		clientOptions.setProperty(SandeshaClientConstants.RM_SPEC_VERSION,Sandesha2Constants.SPEC_VERSIONS.v1_1);  //uncomment this to send the messages according to the v1_1 spec.
+		
+		clientOptions.setAction("urn:wsrm:Ping");
+		
+		clientOptions.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+		
+		clientOptions.setProperty(SandeshaClientConstants.AcksTo, acksTo);
+
+		
 	}
 }

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=453129&r1=453128&r2=453129
==============================================================================
--- 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 Thu Oct  5 00:56:36 2006
@@ -28,6 +28,7 @@
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.soap.SOAPBody;
+import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Options;
@@ -38,12 +39,18 @@
 import org.apache.axis2.context.ConfigurationContextFactory;
 import org.apache.axis2.context.MessageContextConstants;
 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.RMInteropServiceCallbackHandler;
+import org.apache.sandesha2.interop.RMInteropServiceCallbackHandlerImpl;
+import org.apache.sandesha2.interop.RMInteropServiceStub;
 import org.apache.sandesha2.storage.beanmanagers.SenderBeanMgr;
 import org.apache.sandesha2.storage.inmemory.InMemorySenderBeanMgr;
 import org.apache.sandesha2.util.SandeshaUtil;
+import org.tempuri.EchoString;
+import org.tempuri.EchoStringRequestBodyType;
 
 public class Scenario_2_1 {
 	
@@ -88,75 +95,42 @@
 			transportToEPR = properties.getProperty("transportTo");
 		}
 		
-		new Scenario_2_1 ().run();
+//		new Scenario_2_1 ().run();
+		new Scenario_2_1 ().runStubBased ();
 	}
 	
 	private void run () throws Exception {
 		
-		if ("<SANDESHA2_HOME>".equals(SANDESHA2_HOME)){
-			System.out.println("ERROR: Please set the directory you unzipped Sandesha2 as the first option.");
-			return;
-		}
-
-		String axis2_xml = AXIS2_CLIENT_PATH + "client_axis2.xml";
-     
-		ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(AXIS2_CLIENT_PATH,axis2_xml);
-
-		ServiceClient serviceClient = new ServiceClient (configContext,null);	
+		ConfigurationContext configurationContext = getConfigurationContext();
+		ServiceClient serviceClient = new ServiceClient (configurationContext,null);	
 		
 		Options clientOptions = new Options ();
+
+		String sequenceKey = "sequence4";
+		String acksTo = serviceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress();
 		
-//		clientOptions.setProperty(Options.COPY_PROPERTIES,new Boolean (true));
-		
-		EndpointReference toEPR = new EndpointReference (toAddress);
-		
+		setUpOptions(clientOptions, sequenceKey,acksTo);
+
 		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("true");
 		useOfferElem.setText("true");
-		
 //		toEPR.addReferenceParameter(acceptOfferElem);
 //		toEPR.addReferenceParameter(useOfferElem);
-		
 //		clientOptions.setManageSession(true); // without this reference params wont go.
-		serviceClient.setTargetEPR(toEPR);
 		
-		clientOptions.setTo(toEPR);
-		
-		String acksTo = serviceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress();
-		clientOptions.setProperty(SandeshaClientConstants.AcksTo,acksTo);
-		
-		String sequenceKey = "sequence4";
-		clientOptions.setProperty(SandeshaClientConstants.SEQUENCE_KEY,sequenceKey);
-		
-		clientOptions.setProperty(MessageContextConstants.TRANSPORT_URL,transportToEPR);
-		
-		clientOptions.setAction("urn:wsrm:EchoString");
-		
-//		clientOptions.setProperty(MessageContextConstants.CHUNKED,Constants.VALUE_FALSE);   //uncomment this to send messages without chunking.
-		
-//		clientOptions.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);   //uncomment this to send messages in SOAP 1.2
-		
-		clientOptions.setProperty(SandeshaClientConstants.RM_SPEC_VERSION,Sandesha2Constants.SPEC_VERSIONS.v1_1);  //uncomment this to send the messages according to the v1_1 spec.
-		
-//		clientOptions.setProperty(AddressingConstants.WS_ADDRESSING_VERSION,AddressingConstants.Submission.WSA_NAMESPACE);
-
-		clientOptions.setProperty(SandeshaClientConstants.OFFERED_SEQUENCE_ID,SandeshaUtil.getUUID());  //Uncomment this to offer a sequenceID for the incoming sequence.
-		
-		//You must set the following two properties in the request-reply case.
-		clientOptions.setTransportInProtocol(Constants.TRANSPORT_HTTP);
-		clientOptions.setUseSeparateListener(true);
+		EndpointReference toEPR = new EndpointReference (toAddress);
+		serviceClient.setTargetEPR(toEPR);
 		
 		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");
@@ -166,26 +140,7 @@
             Thread.sleep(1000);
         }
         
-    	SequenceReport sequenceReport = null;		
-		boolean complete = false;
-		while (!complete) {
-			sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
-			if (sequenceReport!=null && sequenceReport.getCompletedMessages().size()==1) 
-				complete = true;
-			else {
-				try {
-					Thread.sleep(1000);
-				} catch (InterruptedException e1) {
-					e1.printStackTrace();
-	    		}
-			}
-		} 	
-       
-		Thread.sleep(6000);
-        SandeshaClient.terminateSequence(serviceClient);
-		Thread.sleep(60000000);
-//        serviceClient.finalizeInvoke();
-        
+        terminateSequence(serviceClient);
 	}
 
 	private static OMElement getEchoOMBlock(String text, String sequenceKey) {
@@ -236,6 +191,110 @@
 			System.out.println("Error reported for test call back");
 			e.printStackTrace();
 		}
+	}
+	
+	private ConfigurationContext getConfigurationContext () throws AxisFault {
+
+		if ("<SANDESHA2_HOME>".equals(SANDESHA2_HOME)){
+			System.out.println("ERROR: Please set the directory you unzipped Sandesha2 as the first option.");
+			return null;
+		}
+
+		String axis2_xml = AXIS2_CLIENT_PATH + "client_axis2.xml";
+     
+		ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(AXIS2_CLIENT_PATH,axis2_xml);
+		return configContext;
+	}
+	
+	private void setUpOptions (Options clientOptions, String sequenceKey, String acksTo) {
+
+		EndpointReference toEPR = new EndpointReference (toAddress);
+		clientOptions.setTo(toEPR);
+		clientOptions.setProperty(SandeshaClientConstants.SEQUENCE_KEY,sequenceKey);
+		clientOptions.setProperty(MessageContextConstants.TRANSPORT_URL,transportToEPR);
+		clientOptions.setAction("urn:wsrm:EchoString");
+		clientOptions.setProperty(SandeshaClientConstants.AcksTo,acksTo);
+
+//		clientOptions.setProperty(MessageContextConstants.CHUNKED,Constants.VALUE_FALSE);   //uncomment this to send messages without chunking.
+//		clientOptions.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);   //uncomment this to send messages in SOAP 1.2
+//		clientOptions.setProperty(AddressingConstants.WS_ADDRESSING_VERSION,AddressingConstants.Submission.WSA_NAMESPACE);
+		
+		clientOptions.setProperty(SandeshaClientConstants.RM_SPEC_VERSION,Sandesha2Constants.SPEC_VERSIONS.v1_1);  //uncomment this to send the messages according to the v1_1 spec.
+		clientOptions.setProperty(SandeshaClientConstants.OFFERED_SEQUENCE_ID,SandeshaUtil.getUUID());  //Uncomment this to offer a sequenceID for the incoming sequence.
+		
+		//You must set the following two properties in the request-reply case.
+		clientOptions.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+		clientOptions.setUseSeparateListener(true);
+				
+	}
+	
+	
+	private void runStubBased () throws Exception {
+		ConfigurationContext configurationContext = getConfigurationContext();
+		
+		RMInteropServiceStub stub = new RMInteropServiceStub (configurationContext, toAddress);
+		ServiceClient stubServiceClient = stub._getServiceClient();
+		
+		String sequenceKey = "sequence4";
+		String acksTo = stubServiceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress();
+		
+		Options options = stubServiceClient.getOptions();
+		setUpOptions(options, sequenceKey, acksTo);
+		
+		EchoString echoString = new EchoString ();
+		echoString.setEchoString (new EchoStringRequestBodyType ());
+		echoString.getEchoString().setSequence(sequenceKey);
+		echoString.getEchoString().setText("echo1");
+		
+		RMInteropServiceCallbackHandlerImpl callback1 = new RMInteropServiceCallbackHandlerImpl ("callback1");
+		stub.startEchoString(echoString, callback1);
+		
+		echoString = new EchoString ();
+		echoString.setEchoString (new EchoStringRequestBodyType ());
+		echoString.getEchoString().setSequence(sequenceKey);
+		echoString.getEchoString().setText("echo2");
+		
+		RMInteropServiceCallbackHandlerImpl callback2 = new RMInteropServiceCallbackHandlerImpl ("callback2");
+		stub.startEchoString(echoString, callback2);
+		
+		echoString = new EchoString ();
+		echoString.setEchoString (new EchoStringRequestBodyType ());
+		echoString.getEchoString().setSequence(sequenceKey);
+		echoString.getEchoString().setText("echo3");
+		
+		RMInteropServiceCallbackHandlerImpl callback3 = new RMInteropServiceCallbackHandlerImpl ("callback3");
+		stub.startEchoString(echoString, callback3);
+		
+		while (!callback3.isCompleted()) {
+			Thread.sleep(2000);
+		}
+		
+		terminateSequence (stubServiceClient);
+		
+	}
+	
+	private void terminateSequence (ServiceClient serviceClient) throws Exception {
+		
+    	SequenceReport sequenceReport = null;		
+		boolean complete = false;
+		while (!complete) {
+			sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
+			if (sequenceReport!=null && sequenceReport.getCompletedMessages().size()==3) 
+				complete = true;
+			else {
+				try {
+					Thread.sleep(1000);
+				} catch (InterruptedException e1) {
+					e1.printStackTrace();
+	    		}
+			}
+		} 	
+       
+		Thread.sleep(6000);
+		
+        SandeshaClient.terminateSequence(serviceClient);
+//        serviceClient.finalizeInvoke();
+        		
 	}
 
 	



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