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/04/21 18:11:49 UTC
svn commit: r395923 - in
/webservices/sandesha/trunk/test/src/org/apache/sandesha2: ./ scenarios/
versions/ wsrm/
Author: chamikara
Date: Fri Apr 21 09:11:47 2006
New Revision: 395923
URL: http://svn.apache.org/viewcvs?rev=395923&view=rev
Log:
Updated test cases
Added:
webservices/sandesha/trunk/test/src/org/apache/sandesha2/SandeshaClientTest.java
webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/AckRequestedTest.java
webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/CloseSequenceResponseTest.java
webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/CloseSequenceTest.java
webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/TerminateSequenceResponseTest.java
Modified:
webservices/sandesha/trunk/test/src/org/apache/sandesha2/MessageRetransmissionTest.java
webservices/sandesha/trunk/test/src/org/apache/sandesha2/SandeshaReportsTest.java
webservices/sandesha/trunk/test/src/org/apache/sandesha2/SandeshaTestCase.java
webservices/sandesha/trunk/test/src/org/apache/sandesha2/SquenceOfferTest.java
webservices/sandesha/trunk/test/src/org/apache/sandesha2/scenarios/AddressableEchoTest.java
webservices/sandesha/trunk/test/src/org/apache/sandesha2/scenarios/AddressablePingTest.java
webservices/sandesha/trunk/test/src/org/apache/sandesha2/scenarios/AnonymousAckEchoTest.java
webservices/sandesha/trunk/test/src/org/apache/sandesha2/scenarios/AnonymousPingTest.java
webservices/sandesha/trunk/test/src/org/apache/sandesha2/versions/AddressingVersionTest.java
webservices/sandesha/trunk/test/src/org/apache/sandesha2/versions/RMVersionTest.java
webservices/sandesha/trunk/test/src/org/apache/sandesha2/versions/SOAPVersionTest.java
Modified: webservices/sandesha/trunk/test/src/org/apache/sandesha2/MessageRetransmissionTest.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/test/src/org/apache/sandesha2/MessageRetransmissionTest.java?rev=395923&r1=395922&r2=395923&view=diff
==============================================================================
--- webservices/sandesha/trunk/test/src/org/apache/sandesha2/MessageRetransmissionTest.java (original)
+++ webservices/sandesha/trunk/test/src/org/apache/sandesha2/MessageRetransmissionTest.java Fri Apr 21 09:11:47 2006
@@ -70,8 +70,8 @@
public void testMessageRetransmission () throws AxisFault,InterruptedException {
- String to = "http://127.0.0.1:8060/axis2/services/RMInteropService";
- String transportTo = "http://127.0.0.1:8060/axis2/services/RMInteropService";
+ String to = "http://127.0.0.1:8060/axis2/services/RMSampleService";
+ String transportTo = "http://127.0.0.1:8060/axis2/services/RMSampleService";
String repoPath = "target" + File.separator + "repos" + File.separator + "client";
String axis2_xml = "target" + File.separator + "repos" + File.separator + "client" + File.separator + "client_axis2.xml";
Added: webservices/sandesha/trunk/test/src/org/apache/sandesha2/SandeshaClientTest.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/test/src/org/apache/sandesha2/SandeshaClientTest.java?rev=395923&view=auto
==============================================================================
--- webservices/sandesha/trunk/test/src/org/apache/sandesha2/SandeshaClientTest.java (added)
+++ webservices/sandesha/trunk/test/src/org/apache/sandesha2/SandeshaClientTest.java Fri Apr 21 09:11:47 2006
@@ -0,0 +1,139 @@
+/*
+ * 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;
+
+import java.io.File;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.axis2.context.MessageContextConstants;
+import org.apache.axis2.transport.http.SimpleHTTPServer;
+import org.apache.sandesha2.client.SandeshaClient;
+import org.apache.sandesha2.client.SandeshaClientConstants;
+import org.apache.sandesha2.client.SequenceReport;
+import org.apache.sandesha2.util.SandeshaUtil;
+
+import junit.framework.TestCase;
+
+public class SandeshaClientTest extends TestCase {
+
+ SimpleHTTPServer httpServer = null;
+
+ public void setUp () throws AxisFault {
+ String repoPath = "target" + File.separator + "repos" + File.separator + "server";
+ String axis2_xml = "target" + File.separator + "repos" + File.separator + "server" + File.separator + "server_axis2.xml";
+
+ ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(repoPath,axis2_xml);
+
+ httpServer = new SimpleHTTPServer (configContext,8060);
+
+ httpServer.start();
+ try {
+ Thread.sleep(300);
+ } catch (InterruptedException e) {
+ throw new SandeshaException ("sleep interupted");
+ }
+ }
+
+ public void tearDown () throws SandeshaException {
+ if (httpServer!=null)
+ httpServer.stop();
+
+ try {
+ Thread.sleep(300);
+ } catch (InterruptedException e) {
+ throw new SandeshaException ("sleep interupted");
+ }
+ }
+
+ public void testCreateSequenceWithOffer () throws AxisFault,InterruptedException {
+
+ String to = "http://127.0.0.1:8060/axis2/services/RMSampleService";
+ String transportTo = "http://127.0.0.1:8060/axis2/services/RMSampleService";
+ String acksToEPR = "http://127.0.0.1:6060/axis2/services/__ANONYMOUS_SERVICE__";
+
+ String repoPath = "target" + File.separator + "repos" + File.separator + "client";
+ String axis2_xml = "target" + File.separator + "repos" + File.separator + "client" + File.separator + "client_axis2.xml";
+
+ ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(repoPath,axis2_xml);
+
+ Options clientOptions = new Options ();
+
+ clientOptions.setTo(new EndpointReference (to));
+ clientOptions.setProperty(MessageContextConstants.TRANSPORT_URL,transportTo);
+
+ String sequenceKey = SandeshaUtil.getUUID();
+ clientOptions.setProperty(SandeshaClientConstants.SEQUENCE_KEY,sequenceKey);
+ clientOptions.setProperty(SandeshaClientConstants.AcksTo,acksToEPR);
+ clientOptions.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+ String offeredSequenceID = SandeshaUtil.getUUID();
+ clientOptions.setProperty(SandeshaClientConstants.OFFERED_SEQUENCE_ID,offeredSequenceID);
+
+ ServiceClient serviceClient = new ServiceClient (configContext,null);
+ serviceClient.setOptions(clientOptions);
+ //serviceClient.
+
+ clientOptions.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+ clientOptions.setUseSeparateListener(true);
+
+ serviceClient.setOptions(clientOptions);
+
+ SandeshaClient.createSequence(serviceClient,true);
+
+ Thread.sleep(3000);
+
+ SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
+
+ assertNotNull(sequenceReport.getSequenceID());
+ }
+
+// public void testCreateSequenceWithoutOffer () {
+//// SandeshaClient.createSequence(serviceClient,true);
+//
+//
+// }
+
+// public void testCreateSequenceWithSequenceKey () {
+//
+// }
+//
+// public void testTerminateSequence () {
+//
+// }
+//
+// public void testCloseSequence () {
+//
+// }
+//
+// public void testAckRequest () {
+//
+// }
+//
+// public void getSequenceIDTest () {
+//
+// }
+
+
+}
Modified: webservices/sandesha/trunk/test/src/org/apache/sandesha2/SandeshaReportsTest.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/test/src/org/apache/sandesha2/SandeshaReportsTest.java?rev=395923&r1=395922&r2=395923&view=diff
==============================================================================
--- webservices/sandesha/trunk/test/src/org/apache/sandesha2/SandeshaReportsTest.java (original)
+++ webservices/sandesha/trunk/test/src/org/apache/sandesha2/SandeshaReportsTest.java Fri Apr 21 09:11:47 2006
@@ -94,8 +94,8 @@
public void testSequenceReports () throws AxisFault,InterruptedException {
- String to = "http://127.0.0.1:8060/axis2/services/RMInteropService";
- String transportTo = "http://127.0.0.1:8060/axis2/services/RMInteropService";
+ String to = "http://127.0.0.1:8060/axis2/services/RMSampleService";
+ String transportTo = "http://127.0.0.1:8060/axis2/services/RMSampleService";
String acksToEPR = "http://127.0.0.1:6060/axis2/services/__ANONYMOUS_SERVICE__";
String repoPath = "target" + File.separator + "repos" + File.separator + "client";
@@ -155,8 +155,8 @@
public void testRMReport () throws AxisFault,InterruptedException {
- String to = "http://127.0.0.1:8060/axis2/services/RMInteropService";
- String transportTo = "http://127.0.0.1:8060/axis2/services/RMInteropService";
+ String to = "http://127.0.0.1:8060/axis2/services/RMSampleService";
+ String transportTo = "http://127.0.0.1:8060/axis2/services/RMSampleService";
String repoPath = "target" + File.separator + "repos" + File.separator + "client";
String axis2_xml = "target" + File.separator + "repos" + File.separator + "client" + File.separator + "client_axis2.xml";
@@ -165,8 +165,7 @@
//clientOptions.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
Options clientOptions = new Options ();
- clientOptions.setProperty(Options.COPY_PROPERTIES,new Boolean (true));
- clientOptions.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
+// clientOptions.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
clientOptions.setTo(new EndpointReference (to));
clientOptions.setProperty(MessageContextConstants.TRANSPORT_URL,transportTo);
@@ -191,7 +190,7 @@
try {
//waiting till the messages exchange finishes.
- Thread.sleep(7000);
+ Thread.sleep(12000);
} catch (InterruptedException e) {
throw new SandeshaException ("sleep interupted");
}
@@ -302,77 +301,77 @@
return pingElem;
}
- public void testSequenceTermination () throws AxisFault,InterruptedException {
-
- String to = "http://127.0.0.1:8060/axis2/services/RMInteropService";
- String transportTo = "http://127.0.0.1:8060/axis2/services/RMInteropService";
-
- String repoPath = "target" + File.separator + "repos" + File.separator + "client";
- String axis2_xml = "target" + File.separator + "repos" + File.separator + "client" + File.separator + "client_axis2.xml";
-
- ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(repoPath,axis2_xml);
-
- //clientOptions.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
- Options clientOptions = new Options ();
- clientOptions.setProperty(Options.COPY_PROPERTIES,new Boolean (true));
- clientOptions.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
-
- clientOptions.setTo(new EndpointReference (to));
- clientOptions.setProperty(MessageContextConstants.TRANSPORT_URL,transportTo);
-
- String sequenceKey1 = "sequence1";
- clientOptions.setProperty(SandeshaClientConstants.SEQUENCE_KEY,sequenceKey1);
-
- ServiceClient serviceClient = new ServiceClient (configContext,null);
-
- serviceClient.setOptions(clientOptions);
-
- serviceClient.fireAndForget(getPingOMBlock("ping11"));
- serviceClient.fireAndForget(getPingOMBlock("ping12"));
-
- String sequenceKey2 = "sequence2";
- clientOptions.setProperty(SandeshaClientConstants.SEQUENCE_KEY,sequenceKey2);
-
- serviceClient.fireAndForget(getPingOMBlock("ping21"));
-
- SandeshaClient.terminateSequence(serviceClient,sequenceKey1);
-
- clientOptions.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
- serviceClient.fireAndForget(getPingOMBlock("ping22"));
- try {
- //waiting till the messages exchange finishes.
- Thread.sleep(10000);
- } catch (InterruptedException e) {
- throw new SandeshaException ("sleep interupted");
- }
-
-
- SandeshaReport rmReport = SandeshaClient.getSandeshaReport(configContext);
-
- SequenceReport sequence1Report = null;
- SequenceReport sequence2Report = null;
-
- Iterator iterator = rmReport.getOutgoingSequenceList().iterator();
- while (iterator.hasNext()) {
- String sequenceID = (String) iterator.next();
-
- String internalSequenceID = rmReport.getInternalSequenceIdOfOutSequence(sequenceID);
-
- if (internalSequenceID.indexOf(sequenceKey1)>=0) {
- sequence1Report = SandeshaClient.getOutgoingSequenceReport(to,sequenceKey1,configContext);
- } else if (internalSequenceID.indexOf(sequenceKey2)>=0){
- sequence2Report = SandeshaClient.getOutgoingSequenceReport(to,sequenceKey2,configContext);
- }
- }
-
- assertNotNull(sequence1Report);
- assertNotNull(sequence2Report);
-
- assertEquals(sequence1Report.getCompletedMessages().size(),2);
- assertEquals(sequence2Report.getCompletedMessages().size(),2);
-
- assertEquals(sequence1Report.getSequenceStatus(),SequenceReport.SEQUENCE_STATUS_TERMINATED);
- assertEquals(sequence2Report.getSequenceStatus(),SequenceReport.SEQUENCE_STATUS_TERMINATED);
- }
+// public void testSequenceTermination () throws AxisFault,InterruptedException {
+//
+// String to = "http://127.0.0.1:8060/axis2/services/RMSampleService";
+// String transportTo = "http://127.0.0.1:8060/axis2/services/RMSampleService";
+//
+// String repoPath = "target" + File.separator + "repos" + File.separator + "client";
+// String axis2_xml = "target" + File.separator + "repos" + File.separator + "client" + File.separator + "client_axis2.xml";
+//
+// ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(repoPath,axis2_xml);
+//
+// //clientOptions.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
+// Options clientOptions = new Options ();
+// clientOptions.setProperty(Options.COPY_PROPERTIES,new Boolean (true));
+// clientOptions.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
+//
+// clientOptions.setTo(new EndpointReference (to));
+// clientOptions.setProperty(MessageContextConstants.TRANSPORT_URL,transportTo);
+//
+// String sequenceKey1 = "sequence1";
+// clientOptions.setProperty(SandeshaClientConstants.SEQUENCE_KEY,sequenceKey1);
+//
+// ServiceClient serviceClient = new ServiceClient (configContext,null);
+//
+// serviceClient.setOptions(clientOptions);
+//
+// serviceClient.fireAndForget(getPingOMBlock("ping11"));
+// serviceClient.fireAndForget(getPingOMBlock("ping12"));
+//
+// String sequenceKey2 = "sequence2";
+// clientOptions.setProperty(SandeshaClientConstants.SEQUENCE_KEY,sequenceKey2);
+//
+// serviceClient.fireAndForget(getPingOMBlock("ping21"));
+//
+// SandeshaClient.terminateSequence(serviceClient,sequenceKey1);
+//
+// clientOptions.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
+// serviceClient.fireAndForget(getPingOMBlock("ping22"));
+// try {
+// //waiting till the messages exchange finishes.
+// Thread.sleep(10000);
+// } catch (InterruptedException e) {
+// throw new SandeshaException ("sleep interupted");
+// }
+//
+//
+// SandeshaReport rmReport = SandeshaClient.getSandeshaReport(configContext);
+//
+// SequenceReport sequence1Report = null;
+// SequenceReport sequence2Report = null;
+//
+// Iterator iterator = rmReport.getOutgoingSequenceList().iterator();
+// while (iterator.hasNext()) {
+// String sequenceID = (String) iterator.next();
+//
+// String internalSequenceID = rmReport.getInternalSequenceIdOfOutSequence(sequenceID);
+//
+// if (internalSequenceID.indexOf(sequenceKey1)>=0) {
+// sequence1Report = SandeshaClient.getOutgoingSequenceReport(to,sequenceKey1,configContext);
+// } else if (internalSequenceID.indexOf(sequenceKey2)>=0){
+// sequence2Report = SandeshaClient.getOutgoingSequenceReport(to,sequenceKey2,configContext);
+// }
+// }
+//
+// assertNotNull(sequence1Report);
+// assertNotNull(sequence2Report);
+//
+// assertEquals(sequence1Report.getCompletedMessages().size(),2);
+// assertEquals(sequence2Report.getCompletedMessages().size(),2);
+//
+// assertEquals(sequence1Report.getSequenceStatus(),SequenceReport.SEQUENCE_STATUS_TERMINATED);
+// assertEquals(sequence2Report.getSequenceStatus(),SequenceReport.SEQUENCE_STATUS_TERMINATED);
+// }
}
Modified: webservices/sandesha/trunk/test/src/org/apache/sandesha2/SandeshaTestCase.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/test/src/org/apache/sandesha2/SandeshaTestCase.java?rev=395923&r1=395922&r2=395923&view=diff
==============================================================================
--- webservices/sandesha/trunk/test/src/org/apache/sandesha2/SandeshaTestCase.java (original)
+++ webservices/sandesha/trunk/test/src/org/apache/sandesha2/SandeshaTestCase.java Fri Apr 21 09:11:47 2006
@@ -42,8 +42,6 @@
protected InputStreamReader getResource(String relativePath, String resourceName) {
String resourceFile = resourceDir + relativePath + File.separator + resourceName;
- String file = new File("/home/sanka/sandesha2-src/trunk/test-resources/CreateSequence.xml").getPath();
-
try {
FileReader reader = new FileReader(resourceFile);
return reader;
Modified: webservices/sandesha/trunk/test/src/org/apache/sandesha2/SquenceOfferTest.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/test/src/org/apache/sandesha2/SquenceOfferTest.java?rev=395923&r1=395922&r2=395923&view=diff
==============================================================================
--- webservices/sandesha/trunk/test/src/org/apache/sandesha2/SquenceOfferTest.java (original)
+++ webservices/sandesha/trunk/test/src/org/apache/sandesha2/SquenceOfferTest.java Fri Apr 21 09:11:47 2006
@@ -89,8 +89,8 @@
public void testSequenceOffer () throws AxisFault, InterruptedException {
- String to = "http://127.0.0.1:8060/axis2/services/RMInteropService";
- String transportTo = "http://127.0.0.1:8060/axis2/services/RMInteropService";
+ String to = "http://127.0.0.1:8060/axis2/services/RMSampleService";
+ String transportTo = "http://127.0.0.1:8060/axis2/services/RMSampleService";
String acksToEPR = "http://127.0.0.1:6060/axis2/services/__ANONYMOUS_SERVICE__";
String repoPath = "target" + File.separator + "repos" + File.separator + "client";
Modified: webservices/sandesha/trunk/test/src/org/apache/sandesha2/scenarios/AddressableEchoTest.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/test/src/org/apache/sandesha2/scenarios/AddressableEchoTest.java?rev=395923&r1=395922&r2=395923&view=diff
==============================================================================
--- webservices/sandesha/trunk/test/src/org/apache/sandesha2/scenarios/AddressableEchoTest.java (original)
+++ webservices/sandesha/trunk/test/src/org/apache/sandesha2/scenarios/AddressableEchoTest.java Fri Apr 21 09:11:47 2006
@@ -70,8 +70,8 @@
public void testAsyncEcho () throws AxisFault, InterruptedException {
- String to = "http://127.0.0.1:8060/axis2/services/RMInteropService";
- String transportTo = "http://127.0.0.1:8060/axis2/services/RMInteropService";
+ String to = "http://127.0.0.1:8060/axis2/services/RMSampleService";
+ String transportTo = "http://127.0.0.1:8060/axis2/services/RMSampleService";
String acksToEPR = "http://127.0.0.1:6060/axis2/services/__ANONYMOUS_SERVICE__";
String repoPath = "target" + File.separator + "repos" + File.separator + "client";
@@ -88,6 +88,63 @@
clientOptions.setProperty(SandeshaClientConstants.SEQUENCE_KEY,sequenceKey);
clientOptions.setProperty(SandeshaClientConstants.AcksTo,acksToEPR);
clientOptions.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+ ServiceClient serviceClient = new ServiceClient (configContext,null);
+ serviceClient.setOptions(clientOptions);
+ //serviceClient.
+
+ clientOptions.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+ clientOptions.setUseSeparateListener(true);
+
+ serviceClient.setOptions(clientOptions);
+
+ TestCallback callback1 = new TestCallback ("Callback 1");
+ serviceClient.sendReceiveNonBlocking(getEchoOMBlock("echo1",sequenceKey),callback1);
+
+ clientOptions.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
+ TestCallback callback2 = new TestCallback ("Callback 2");
+ serviceClient.sendReceiveNonBlocking (getEchoOMBlock("echo2",sequenceKey),callback2);
+
+
+ Thread.sleep(12000);
+ serviceClient.finalizeInvoke();
+
+ //assertions for the out sequence.
+ SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
+ assertTrue(sequenceReport.getCompletedMessages().contains(new Long(1)));
+ assertTrue(sequenceReport.getCompletedMessages().contains(new Long(2)));
+ assertEquals(sequenceReport.getSequenceStatus(),SequenceReport.SEQUENCE_STATUS_TERMINATED);
+ assertEquals(sequenceReport.getSequenceDirection(),SequenceReport.SEQUENCE_DIRECTION_OUT);
+
+ assertTrue(callback1.isComplete());
+ assertTrue(callback2.isComplete());
+ assertEquals(callback1.getResult(),"echo1");
+ assertEquals(callback2.getResult(),"echo1echo2");
+ }
+
+ public void testAsyncEchoWithOffer () throws AxisFault, InterruptedException {
+
+ String to = "http://127.0.0.1:8060/axis2/services/RMSampleService";
+ String transportTo = "http://127.0.0.1:8060/axis2/services/RMSampleService";
+ String acksToEPR = "http://127.0.0.1:6060/axis2/services/__ANONYMOUS_SERVICE__";
+
+ String repoPath = "target" + File.separator + "repos" + File.separator + "client";
+ String axis2_xml = "target" + File.separator + "repos" + File.separator + "client" + File.separator + "client_axis2.xml";
+
+ ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(repoPath,axis2_xml);
+
+ Options clientOptions = new Options ();
+
+ clientOptions.setTo(new EndpointReference (to));
+ clientOptions.setProperty(MessageContextConstants.TRANSPORT_URL,transportTo);
+
+ String sequenceKey = SandeshaUtil.getUUID();
+ clientOptions.setProperty(SandeshaClientConstants.SEQUENCE_KEY,sequenceKey);
+ clientOptions.setProperty(SandeshaClientConstants.AcksTo,acksToEPR);
+ clientOptions.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+ String offeredSequeiceId = SandeshaUtil.getUUID();
+ clientOptions.setProperty(SandeshaClientConstants.OFFERED_SEQUENCE_ID,offeredSequeiceId);
ServiceClient serviceClient = new ServiceClient (configContext,null);
serviceClient.setOptions(clientOptions);
Modified: webservices/sandesha/trunk/test/src/org/apache/sandesha2/scenarios/AddressablePingTest.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/test/src/org/apache/sandesha2/scenarios/AddressablePingTest.java?rev=395923&r1=395922&r2=395923&view=diff
==============================================================================
--- webservices/sandesha/trunk/test/src/org/apache/sandesha2/scenarios/AddressablePingTest.java (original)
+++ webservices/sandesha/trunk/test/src/org/apache/sandesha2/scenarios/AddressablePingTest.java Fri Apr 21 09:11:47 2006
@@ -85,8 +85,8 @@
public void testAsyncPing () throws AxisFault,IOException {
- String to = "http://127.0.0.1:8060/axis2/services/RMInteropService";
- String transportTo = "http://127.0.0.1:8060/axis2/services/RMInteropService";
+ String to = "http://127.0.0.1:8060/axis2/services/RMSampleService";
+ String transportTo = "http://127.0.0.1:8060/axis2/services/RMSampleService";
String acksToEPR = "http://127.0.0.1:6060/axis2/services/__ANONYMOUS_SERVICE__";
String repoPath = "target" + File.separator + "repos" + File.separator + "client";
Modified: webservices/sandesha/trunk/test/src/org/apache/sandesha2/scenarios/AnonymousAckEchoTest.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/test/src/org/apache/sandesha2/scenarios/AnonymousAckEchoTest.java?rev=395923&r1=395922&r2=395923&view=diff
==============================================================================
--- webservices/sandesha/trunk/test/src/org/apache/sandesha2/scenarios/AnonymousAckEchoTest.java (original)
+++ webservices/sandesha/trunk/test/src/org/apache/sandesha2/scenarios/AnonymousAckEchoTest.java Fri Apr 21 09:11:47 2006
@@ -68,8 +68,8 @@
public void testSyncEcho () throws AxisFault, InterruptedException {
- String to = "http://127.0.0.1:8060/axis2/services/RMInteropService";
- String transportTo = "http://127.0.0.1:8060/axis2/services/RMInteropService";
+ String to = "http://127.0.0.1:8060/axis2/services/RMSampleService";
+ String transportTo = "http://127.0.0.1:8060/axis2/services/RMSampleService";
String repoPath = "target" + File.separator + "repos" + File.separator + "client";
String axis2_xml = "target" + File.separator + "repos" + File.separator + "client" + File.separator + "client_axis2.xml";
Modified: webservices/sandesha/trunk/test/src/org/apache/sandesha2/scenarios/AnonymousPingTest.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/test/src/org/apache/sandesha2/scenarios/AnonymousPingTest.java?rev=395923&r1=395922&r2=395923&view=diff
==============================================================================
--- webservices/sandesha/trunk/test/src/org/apache/sandesha2/scenarios/AnonymousPingTest.java (original)
+++ webservices/sandesha/trunk/test/src/org/apache/sandesha2/scenarios/AnonymousPingTest.java Fri Apr 21 09:11:47 2006
@@ -81,8 +81,8 @@
public void testSyncPing () throws AxisFault,InterruptedException {
- String to = "http://127.0.0.1:8060/axis2/services/RMInteropService";
- String transportTo = "http://127.0.0.1:8060/axis2/services/RMInteropService";
+ String to = "http://127.0.0.1:8060/axis2/services/RMSampleService";
+ String transportTo = "http://127.0.0.1:8060/axis2/services/RMSampleService";
String repoPath = "target" + File.separator + "repos" + File.separator + "client";
String axis2_xml = "target" + File.separator + "repos" + File.separator + "client" + File.separator + "client_axis2.xml";
Modified: webservices/sandesha/trunk/test/src/org/apache/sandesha2/versions/AddressingVersionTest.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/test/src/org/apache/sandesha2/versions/AddressingVersionTest.java?rev=395923&r1=395922&r2=395923&view=diff
==============================================================================
--- webservices/sandesha/trunk/test/src/org/apache/sandesha2/versions/AddressingVersionTest.java (original)
+++ webservices/sandesha/trunk/test/src/org/apache/sandesha2/versions/AddressingVersionTest.java Fri Apr 21 09:11:47 2006
@@ -63,8 +63,8 @@
public void testAddressingFinal () throws AxisFault,InterruptedException {
- String to = "http://127.0.0.1:8060/axis2/services/RMInteropService";
- String transportTo = "http://127.0.0.1:8060/axis2/services/RMInteropService";
+ String to = "http://127.0.0.1:8060/axis2/services/RMSampleService";
+ String transportTo = "http://127.0.0.1:8060/axis2/services/RMSampleService";
String repoPath = "target" + File.separator + "repos" + File.separator + "client";
String axis2_xml = "target" + File.separator + "repos" + File.separator + "client" + File.separator + "client_axis2.xml";
@@ -92,7 +92,7 @@
clientOptions.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
serviceClient.fireAndForget(getPingOMBlock("ping3"));
- Thread.sleep(5000);
+ Thread.sleep(7000);
serviceClient.finalizeInvoke();
SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
@@ -104,8 +104,8 @@
public void testAddressingSubmission () throws AxisFault,InterruptedException {
- String to = "http://127.0.0.1:8060/axis2/services/RMInteropService";
- String transportTo = "http://127.0.0.1:8060/axis2/services/RMInteropService";
+ String to = "http://127.0.0.1:8060/axis2/services/RMSampleService";
+ String transportTo = "http://127.0.0.1:8060/axis2/services/RMSampleService";
String repoPath = "target" + File.separator + "repos" + File.separator + "client";
String axis2_xml = "target" + File.separator + "repos" + File.separator + "client" + File.separator + "client_axis2.xml";
@@ -133,7 +133,7 @@
clientOptions.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
serviceClient.fireAndForget(getPingOMBlock("ping3"));
- Thread.sleep(5000);
+ Thread.sleep(7000);
serviceClient.finalizeInvoke();
SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
Modified: webservices/sandesha/trunk/test/src/org/apache/sandesha2/versions/RMVersionTest.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/test/src/org/apache/sandesha2/versions/RMVersionTest.java?rev=395923&r1=395922&r2=395923&view=diff
==============================================================================
--- webservices/sandesha/trunk/test/src/org/apache/sandesha2/versions/RMVersionTest.java (original)
+++ webservices/sandesha/trunk/test/src/org/apache/sandesha2/versions/RMVersionTest.java Fri Apr 21 09:11:47 2006
@@ -41,7 +41,6 @@
ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(repoPath,axis2_xml);
-
httpServer = new SimpleHTTPServer (configContext,8060);
httpServer.start();
try {
@@ -64,8 +63,8 @@
public void testRMSubmission () throws AxisFault,InterruptedException {
- String to = "http://127.0.0.1:8060/axis2/services/RMInteropService";
- String transportTo = "http://127.0.0.1:8060/axis2/services/RMInteropService";
+ String to = "http://127.0.0.1:8060/axis2/services/RMSampleService";
+ String transportTo = "http://127.0.0.1:8060/axis2/services/RMSampleService";
String repoPath = "target" + File.separator + "repos" + File.separator + "client";
String axis2_xml = "target" + File.separator + "repos" + File.separator + "client" + File.separator + "client_axis2.xml";
@@ -105,8 +104,8 @@
public void testRMOASIS () throws AxisFault,InterruptedException {
- String to = "http://127.0.0.1:8060/axis2/services/RMInteropService";
- String transportTo = "http://127.0.0.1:8060/axis2/services/RMInteropService";
+ String to = "http://127.0.0.1:8060/axis2/services/RMSampleService";
+ String transportTo = "http://127.0.0.1:8060/axis2/services/RMSampleService";
String repoPath = "target" + File.separator + "repos" + File.separator + "client";
String axis2_xml = "target" + File.separator + "repos" + File.separator + "client" + File.separator + "client_axis2.xml";
Modified: webservices/sandesha/trunk/test/src/org/apache/sandesha2/versions/SOAPVersionTest.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/test/src/org/apache/sandesha2/versions/SOAPVersionTest.java?rev=395923&r1=395922&r2=395923&view=diff
==============================================================================
--- webservices/sandesha/trunk/test/src/org/apache/sandesha2/versions/SOAPVersionTest.java (original)
+++ webservices/sandesha/trunk/test/src/org/apache/sandesha2/versions/SOAPVersionTest.java Fri Apr 21 09:11:47 2006
@@ -64,8 +64,8 @@
public void testSOAP11 () throws AxisFault,InterruptedException {
- String to = "http://127.0.0.1:8060/axis2/services/RMInteropService";
- String transportTo = "http://127.0.0.1:8060/axis2/services/RMInteropService";
+ String to = "http://127.0.0.1:8060/axis2/services/RMSampleService";
+ String transportTo = "http://127.0.0.1:8060/axis2/services/RMSampleService";
String repoPath = "target" + File.separator + "repos" + File.separator + "client";
String axis2_xml = "target" + File.separator + "repos" + File.separator + "client" + File.separator + "client_axis2.xml";
@@ -103,8 +103,8 @@
public void testSOAP12 () throws AxisFault,InterruptedException {
- String to = "http://127.0.0.1:8060/axis2/services/RMInteropService";
- String transportTo = "http://127.0.0.1:8060/axis2/services/RMInteropService";
+ String to = "http://127.0.0.1:8060/axis2/services/RMSampleService";
+ String transportTo = "http://127.0.0.1:8060/axis2/services/RMSampleService";
String repoPath = "target" + File.separator + "repos" + File.separator + "client";
String axis2_xml = "target" + File.separator + "repos" + File.separator + "client" + File.separator + "client_axis2.xml";
Added: webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/AckRequestedTest.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/AckRequestedTest.java?rev=395923&view=auto
==============================================================================
--- webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/AckRequestedTest.java (added)
+++ webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/AckRequestedTest.java Fri Apr 21 09:11:47 2006
@@ -0,0 +1,32 @@
+package org.apache.sandesha2.wsrm;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.soap.SOAPEnvelope;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axis2.addressing.AddressingConstants;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.sandesha2.Sandesha2Constants;
+import org.apache.sandesha2.SandeshaException;
+
+import junit.framework.TestCase;
+
+public class AckRequestedTest extends TestCase {
+
+ SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
+ String rmNamespaceValue = Sandesha2Constants.SPEC_2005_02.NS_URI;
+ String addressingNamespaceValue = AddressingConstants.Final.WSA_NAMESPACE;
+
+ public AckRequestedTest() {
+// super("CreateSequenceResponseTest");
+
+ }
+
+ public void testFromOMElement() throws SandeshaException {
+
+ }
+
+ public void testToSOAPEnvelope() throws SandeshaException {}
+}
Added: webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/CloseSequenceResponseTest.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/CloseSequenceResponseTest.java?rev=395923&view=auto
==============================================================================
--- webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/CloseSequenceResponseTest.java (added)
+++ webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/CloseSequenceResponseTest.java Fri Apr 21 09:11:47 2006
@@ -0,0 +1,27 @@
+package org.apache.sandesha2.wsrm;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axis2.addressing.AddressingConstants;
+import org.apache.sandesha2.Sandesha2Constants;
+import org.apache.sandesha2.SandeshaException;
+
+import junit.framework.TestCase;
+
+public class CloseSequenceResponseTest extends TestCase {
+
+ SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
+ String rmNamespaceValue = Sandesha2Constants.SPEC_2005_02.NS_URI;
+ String addressingNamespaceValue = AddressingConstants.Final.WSA_NAMESPACE;
+
+ public CloseSequenceResponseTest() {
+// super("CreateSequenceResponseTest");
+
+ }
+
+ public void testFromOMElement() throws SandeshaException {
+
+ }
+
+ public void testToSOAPEnvelope() throws SandeshaException {}
+}
Added: webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/CloseSequenceTest.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/CloseSequenceTest.java?rev=395923&view=auto
==============================================================================
--- webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/CloseSequenceTest.java (added)
+++ webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/CloseSequenceTest.java Fri Apr 21 09:11:47 2006
@@ -0,0 +1,27 @@
+package org.apache.sandesha2.wsrm;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axis2.addressing.AddressingConstants;
+import org.apache.sandesha2.Sandesha2Constants;
+import org.apache.sandesha2.SandeshaException;
+
+import junit.framework.TestCase;
+
+public class CloseSequenceTest extends TestCase {
+
+ SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
+ String rmNamespaceValue = Sandesha2Constants.SPEC_2005_02.NS_URI;
+ String addressingNamespaceValue = AddressingConstants.Final.WSA_NAMESPACE;
+
+ public CloseSequenceTest() {
+// super("CreateSequenceResponseTest");
+
+ }
+
+ public void testFromOMElement() throws SandeshaException {
+
+ }
+
+ public void testToSOAPEnvelope() throws SandeshaException {}
+}
Added: webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/TerminateSequenceResponseTest.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/TerminateSequenceResponseTest.java?rev=395923&view=auto
==============================================================================
--- webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/TerminateSequenceResponseTest.java (added)
+++ webservices/sandesha/trunk/test/src/org/apache/sandesha2/wsrm/TerminateSequenceResponseTest.java Fri Apr 21 09:11:47 2006
@@ -0,0 +1,27 @@
+package org.apache.sandesha2.wsrm;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axis2.addressing.AddressingConstants;
+import org.apache.sandesha2.Sandesha2Constants;
+import org.apache.sandesha2.SandeshaException;
+
+import junit.framework.TestCase;
+
+public class TerminateSequenceResponseTest extends TestCase {
+
+ SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
+ String rmNamespaceValue = Sandesha2Constants.SPEC_2005_02.NS_URI;
+ String addressingNamespaceValue = AddressingConstants.Final.WSA_NAMESPACE;
+
+ public TerminateSequenceResponseTest() {
+// super("CreateSequenceResponseTest");
+
+ }
+
+ public void testFromOMElement() throws SandeshaException {
+
+ }
+
+ public void testToSOAPEnvelope() throws SandeshaException {}
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org