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 th...@apache.org on 2006/05/16 03:24:19 UTC
svn commit: r406796 - in /webservices/kandula/trunk/java:
test-resources/KandulaDemoService/meta-inf/services.xml
test/org/apache/kandula/integration/CreateCoordinationContextTest.java
test/org/apache/kandula/integration/KandulaDemoServiceStub.java
Author: thilina
Date: Mon May 15 18:24:19 2006
New Revision: 406796
URL: http://svn.apache.org/viewcvs?rev=406796&view=rev
Log:
fixing the CreateCoordinationContextTest.java to test both sync and async registration
Modified:
webservices/kandula/trunk/java/test-resources/KandulaDemoService/meta-inf/services.xml
webservices/kandula/trunk/java/test/org/apache/kandula/integration/CreateCoordinationContextTest.java
webservices/kandula/trunk/java/test/org/apache/kandula/integration/KandulaDemoServiceStub.java
Modified: webservices/kandula/trunk/java/test-resources/KandulaDemoService/meta-inf/services.xml
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/test-resources/KandulaDemoService/meta-inf/services.xml?rev=406796&r1=406795&r2=406796&view=diff
==============================================================================
--- webservices/kandula/trunk/java/test-resources/KandulaDemoService/meta-inf/services.xml (original)
+++ webservices/kandula/trunk/java/test-resources/KandulaDemoService/meta-inf/services.xml Mon May 15 18:24:19 2006
@@ -1,11 +1,11 @@
<service name="KandulaDemoService">
<description>
- Participant 2PC Coordination service.
+ Sample service for Testing
</description>
<module ref="kandula-inflow"/>
<parameter name="ServiceClass" locked="xsd:false">org.apache.kandula.integration.KandulaDemoService</parameter>
- <parameter name="KandulaResource" locked="xsd:false">org.apache.kandula.integration.DummyResource</parameter>
<operation name="creditOperation">
+ <parameter name="KandulaResource" locked="xsd:false">org.apache.kandula.integration.DummyResource</parameter>
<messageReceiver class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
</operation>
</service>
Modified: webservices/kandula/trunk/java/test/org/apache/kandula/integration/CreateCoordinationContextTest.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/test/org/apache/kandula/integration/CreateCoordinationContextTest.java?rev=406796&r1=406795&r2=406796&view=diff
==============================================================================
--- webservices/kandula/trunk/java/test/org/apache/kandula/integration/CreateCoordinationContextTest.java (original)
+++ webservices/kandula/trunk/java/test/org/apache/kandula/integration/CreateCoordinationContextTest.java Mon May 15 18:24:19 2006
@@ -35,24 +35,16 @@
private String repository = "target/testing-repository";
- private KandulaDemoServiceStub stub;
+// private KandulaDemoServiceStub stub;
private SimpleHTTPServer server;
public CreateCoordinationContextTest() throws Exception {
super(CreateCoordinationContextTest.class.getName());
- stub = new KandulaDemoServiceStub(
- "target/initiator-repository",
- new EndpointReference(
- "http://localhost:8081/axis2/services/KandulaDemoService"));
}
public CreateCoordinationContextTest(String testName) throws Exception {
super(testName);
- stub = new KandulaDemoServiceStub(
- "target/initiator-repository",
- new EndpointReference(
- "http://localhost:8081/axis2/services/KandulaDemoService"));
}
protected void setUp() throws Exception {
@@ -81,6 +73,10 @@
}
public void testEchoXMLASync() throws Exception {
+ KandulaDemoServiceStub stub = new KandulaDemoServiceStub(
+ "target/initiator-repository",
+ new EndpointReference(
+ "http://localhost:8081/axis2/services/KandulaDemoService"));
TransactionManager tm = new TransactionManager(
Constants.WS_AT,
new EndpointReference(
@@ -95,18 +91,22 @@
tm.commit();
}
-// public void testEchoXMLSync() throws Exception {
-// TransactionManager tm = new TransactionManager(
-// Constants.WS_AT,
-// new EndpointReference(
-// "http://localhost:8082/axis2/services/ActivationCoordinator"));
-// tm.begin("target/initiator-repository",
-// "target/initiator-repository/axis2.xml", false);
-// try {
-// stub.creditOperation();
-// } catch (Exception e) {
-// tm.rollback();
-// }
-// tm.commit();
-// }
-}
\ No newline at end of file
+ public void testEchoXMLSync() throws Exception {
+ KandulaDemoServiceStub stub = new KandulaDemoServiceStub(
+ "target/initiator-repository",
+ new EndpointReference(
+ "http://localhost:8081/axis2/services/KandulaDemoService"));
+ TransactionManager tm = new TransactionManager(
+ Constants.WS_AT,
+ new EndpointReference(
+ "http://localhost:8081/axis2/services/ActivationCoordinator"));
+ tm.begin("target/initiator-repository",
+ "target/initiator-repository/axis2.xml", false);
+ try {
+ stub.creditOperation();
+ } catch (Exception e) {
+ tm.rollback();
+ }
+ tm.commit();
+ }
+}
Modified: webservices/kandula/trunk/java/test/org/apache/kandula/integration/KandulaDemoServiceStub.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/test/org/apache/kandula/integration/KandulaDemoServiceStub.java?rev=406796&r1=406795&r2=406796&view=diff
==============================================================================
--- webservices/kandula/trunk/java/test/org/apache/kandula/integration/KandulaDemoServiceStub.java (original)
+++ webservices/kandula/trunk/java/test/org/apache/kandula/integration/KandulaDemoServiceStub.java Mon May 15 18:24:19 2006
@@ -53,8 +53,12 @@
private static org.apache.axis2.description.AxisOperation[] operations;
- static {
+ /**
+ * Constructor
+ */
+ public KandulaDemoServiceStub(String axis2Home,
+ EndpointReference targetEndpoint) throws java.lang.Exception {
// creating the Service
_service = new AxisService("KandulaDemoService");
@@ -66,14 +70,6 @@
operationDesc.setName(new javax.xml.namespace.QName("creditOperation"));
operations[0] = operationDesc;
_service.addOperation(operationDesc);
-
- }
-
- /**
- * Constructor
- */
- public KandulaDemoServiceStub(String axis2Home,
- EndpointReference targetEndpoint) throws java.lang.Exception {
this.toEPR = targetEndpoint;
// creating the configuration
configurationContext = ConfigurationContextFactory
---------------------------------------------------------------------
To unsubscribe, e-mail: kandula-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: kandula-dev-help@ws.apache.org