Author: seanahn
Date: Tue Feb 10 21:57:39 2009
New Revision: 743120

URL: http://svn.apache.org/viewvc?rev=743120&view=rev
Log:
ODE-511, Hibernate DAO + OnEvent + Correlation error

Added:
    ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/
    
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/OnEventCorrelation.bpel
    
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/OnEventCorrelation.wsdl
    
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/OnEventCorrelation.xsd
    
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/OnEventCorrelationArtifacts.wsdl
    
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/deploy.xml
    
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/testRequest.soap
Removed:
    
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEventNoCatch/
Modified:
    
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/BpelActivityTest.java

Modified: 
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/BpelActivityTest.java
URL: 
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/BpelActivityTest.java?rev=743120&r1=743119&r2=743120&view=diff
==============================================================================
--- 
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/BpelActivityTest.java
 (original)
+++ 
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/BpelActivityTest.java
 Tue Feb 10 21:57:39 2009
@@ -11,8 +11,8 @@
        }
 
 //     @Test(dataProvider="configs")
-    public void testSimpleFaultCatch() throws Exception {
-               final String bundleName = "TestThrowOnEventNoCatch";
+    public void testThrowOnEvent() throws Exception {
+               final String bundleName = "TestThrowOnEvent";
         // deploy the required service
         server.deployService(DummyService.class.getCanonicalName());
         if (server.isDeployed(bundleName)) server.undeployProcess(bundleName);
@@ -21,33 +21,33 @@
         new Thread() {
                public void run() {
                        try {
-                               Thread.sleep(3000);
-                               String response = 
server.sendRequestFile("http://localhost:8888/ode/processes/NPG072408_4/test4/process/Pool";,
-                            bundleName, "testRequest2.soap");
-                               
Logger.getLogger(BpelActivityTest.class).debug("!!!SEAN : " + response);
+                               Thread.sleep(2000);
+                               String response = 
server.sendRequestFile("http://localhost:8888/ode/processes/OnEventCorrelation/";,
+                            bundleName, "testRequest.soap");
+                               
Logger.getLogger(BpelActivityTest.class).debug("!!! : " + response);
                        } catch( Exception e ) {
                                fail(e.getMessage());
                        }
                }
         }.start();
 
-        new Thread() {
-               public void run() {
-                       try {
-                               Thread.sleep(6000);
-                               String response = 
server.sendRequestFile("http://localhost:8888/ode/processes/NPG072408_4/test4/process/Pool";,
-                            bundleName, "testRequest3.soap");
-                               
Logger.getLogger(BpelActivityTest.class).debug("!!!SEAN : " + response);
-                       } catch( Exception e ) {
-                               fail(e.getMessage());
-                       }
-               }
-        }.start();
+//        new Thread() {
+//             public void run() {
+//                     try {
+//                             Thread.sleep(6000);
+//                             String response = 
server.sendRequestFile("http://localhost:8888/ode/processes/OnEventCorrelation/";,
+//                            bundleName, "testRequest.soap");
+//                             
Logger.getLogger(BpelActivityTest.class).debug("!!!SEAN : " + response);
+//                     } catch( Exception e ) {
+//                             fail(e.getMessage());
+//                     }
+//             }
+//        }.start();
 
         try {
-            String response = 
server.sendRequestFile("http://localhost:8888/ode/processes/NPG072408_4/test4/process/Pool";,
+            String response = 
server.sendRequestFile("http://localhost:8888/ode/processes/OnEventCorrelation/";,
                     bundleName, "testRequest.soap");
-            Logger.getLogger(BpelActivityTest.class).debug("!!!SEAN : " + 
response);
+            Logger.getLogger(BpelActivityTest.class).debug("!!! : " + 
response);
             
 //            assertTrue(response.contains("helloResponse") && 
response.contains("Something went wrong. Fortunately, it was meant to be."));
         } finally {

Added: 
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/OnEventCorrelation.bpel
URL: 
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/OnEventCorrelation.bpel?rev=743120&view=auto
==============================================================================
--- 
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/OnEventCorrelation.bpel
 (added)
+++ 
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/OnEventCorrelation.bpel
 Tue Feb 10 21:57:39 2009
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpws:process exitOnStandardFault="yes" name="OnEventCorrelation"
+    suppressJoinFailure="yes"
+    targetNamespace="http://sample.bpel.org/bpel/sample";
+    xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable";
+    xmlns:ns="http://sample.bpel.org/bpel/sampleArtifacts"; 
xmlns:tns="http://sample.bpel.org/bpel/sample";>
+    <bpws:import importType="http://schemas.xmlsoap.org/wsdl/";
+        location="OnEventCorrelation.wsdl" 
namespace="http://sample.bpel.org/bpel/sample"/>
+    <bpws:import importType="http://schemas.xmlsoap.org/wsdl/";
+        location="OnEventCorrelationArtifacts.wsdl" 
namespace="http://sample.bpel.org/bpel/sampleArtifacts"/>
+    <bpws:import importType="http://www.w3.org/2001/XMLSchema";
+        location="OnEventCorrelation.xsd" 
namespace="http://sample.bpel.org/bpel/sample"/>
+    <bpws:partnerLinks>
+        <bpws:partnerLink myRole="OnEventCorrelationProvider"
+            name="client" partnerLinkType="tns:OnEventCorrelation"/>
+    </bpws:partnerLinks>
+    <bpws:variables>
+        <bpws:variable
+            messageType="tns:OnEventCorrelationRequestMessage" name="input"/>
+    </bpws:variables>
+    <bpws:correlationSets>
+        <bpws:correlationSet name="CorrelationSet" properties="ns:input"/>
+    </bpws:correlationSets>
+    <bpws:sequence name="main">
+        <bpws:receive createInstance="yes" operation="initiate"
+            partnerLink="client" portType="tns:OnEventCorrelation" 
variable="input">
+            <bpws:correlations>
+                <bpws:correlation initiate="yes" set="CorrelationSet"/>
+            </bpws:correlations>
+        </bpws:receive>
+        <bpws:scope>
+            <bpws:faultHandlers>
+                <bpws:catch faultName="Repeated">
+                    <bpws:empty/>
+                </bpws:catch>
+            </bpws:faultHandlers>
+            <bpws:scope>
+                <bpws:eventHandlers>
+                    <bpws:onEvent operation="initiate"
+                        partnerLink="client"
+                        portType="tns:OnEventCorrelation" variable="input" 
messageType="tns:OnEventCorrelationRequestMessage">
+                        <bpws:correlations>
+                            <bpws:correlation initiate="no" 
set="CorrelationSet"/>
+                        </bpws:correlations>
+                        <bpws:scope>
+                            <bpws:sequence>
+                                <bpws:throw faultName="Repeated"/>
+                            </bpws:sequence>
+                        </bpws:scope>
+                    </bpws:onEvent>
+                </bpws:eventHandlers>
+                <bpws:wait>
+                    <bpws:for><![CDATA['PT4S']]></bpws:for>
+                </bpws:wait>
+            </bpws:scope>
+        </bpws:scope>
+        <bpws:receive operation="initiate" partnerLink="client"
+            portType="tns:OnEventCorrelation" variable="input">
+            <bpws:correlations>
+                <bpws:correlation initiate="no" set="CorrelationSet"/>
+            </bpws:correlations>
+        </bpws:receive>
+    </bpws:sequence>
+</bpws:process>

Added: 
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/OnEventCorrelation.wsdl
URL: 
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/OnEventCorrelation.wsdl?rev=743120&view=auto
==============================================================================
--- 
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/OnEventCorrelation.wsdl
 (added)
+++ 
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/OnEventCorrelation.wsdl
 Tue Feb 10 21:57:39 2009
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"; 
xmlns:tns="http://sample.bpel.org/bpel/sample"; 
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; 
name="OnEventCorrelation" targetNamespace="http://sample.bpel.org/bpel/sample";>
+  <types>
+    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
+            <xsd:import namespace="http://sample.bpel.org/bpel/sample"; 
schemaLocation="OnEventCorrelation.xsd"/>
+        </xsd:schema>
+  </types>
+  <message name="OnEventCorrelationRequestMessage">
+    <part element="tns:OnEventCorrelationRequest" name="payload">
+    </part>
+  </message>
+  <message name="OnEventCorrelationResponseMessage">
+    <part element="tns:OnEventCorrelationResponse" name="payload">
+    </part>
+  </message>
+  <portType name="OnEventCorrelation">
+    <operation name="initiate">
+      <input message="tns:OnEventCorrelationRequestMessage">
+    </input>
+    </operation>
+  </portType>
+  <binding name="OnEventCorrelationBinding" type="tns:OnEventCorrelation">
+    <wsdlsoap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"/>
+    <operation name="initiate">
+      <wsdlsoap:operation soapAction=""/>
+      <input>
+        <wsdlsoap:body use="literal"/>
+      </input>
+    </operation>
+  </binding>
+  <service name="OnEventCorrelation">
+    <port binding="tns:OnEventCorrelationBinding" name="OnEventCorrelation">
+      <wsdlsoap:address 
location="http://localhost:8888/ode/processes/OnEventCorrelation/"/>
+    </port>
+  </service>
+    <plnk:partnerLinkType name="OnEventCorrelation">
+        <plnk:role name="OnEventCorrelationProvider" 
portType="tns:OnEventCorrelation"/>
+    </plnk:partnerLinkType>
+</definitions>
\ No newline at end of file

Added: 
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/OnEventCorrelation.xsd
URL: 
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/OnEventCorrelation.xsd?rev=743120&view=auto
==============================================================================
--- 
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/OnEventCorrelation.xsd
 (added)
+++ 
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/OnEventCorrelation.xsd
 Tue Feb 10 21:57:39 2009
@@ -0,0 +1,23 @@
+<schema attributeFormDefault="unqualified" 
+        elementFormDefault="qualified" 
+        targetNamespace="http://sample.bpel.org/bpel/sample"; 
+        xmlns="http://www.w3.org/2001/XMLSchema";
+        >
+        
+    <element name="OnEventCorrelationRequest">
+        <complexType>
+            <sequence>
+                <element name="input" type="string" />
+            </sequence>
+        </complexType>
+    </element>
+          
+    <element name="OnEventCorrelationResponse">
+        <complexType>
+            <sequence>
+                <element name="result" type="string"/>
+            </sequence>
+        </complexType>
+    </element>
+    
+</schema>

Added: 
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/OnEventCorrelationArtifacts.wsdl
URL: 
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/OnEventCorrelationArtifacts.wsdl?rev=743120&view=auto
==============================================================================
--- 
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/OnEventCorrelationArtifacts.wsdl
 (added)
+++ 
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/OnEventCorrelationArtifacts.wsdl
 Tue Feb 10 21:57:39 2009
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions 
+       xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"; 
+       xmlns:tns="http://sample.bpel.org/bpel/sampleArtifacts"; 
+       xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop"; 
+       xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
+       xmlns:bpel="http://sample.bpel.org/bpel/sample"; 
+       name="OnEventCorrelationArtifacts" 
+       targetNamespace="http://sample.bpel.org/bpel/sampleArtifacts"; 
+       xmlns="http://schemas.xmlsoap.org/wsdl/";
+       >
+<vprop:property name="input" type="xs:string"/>
+<vprop:propertyAlias messageType="bpel:OnEventCorrelationRequestMessage" 
part="payload" propertyName="tns:input">
+<vprop:query><![CDATA[bpel:input]]></vprop:query>
+</vprop:propertyAlias>
+<import location="OnEventCorrelation.wsdl" 
namespace="http://sample.bpel.org/bpel/sample"/>
+</definitions>

Added: 
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/deploy.xml
URL: 
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/deploy.xml?rev=743120&view=auto
==============================================================================
--- 
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/deploy.xml
 (added)
+++ 
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/deploy.xml
 Tue Feb 10 21:57:39 2009
@@ -0,0 +1,13 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<dd:deploy xmlns:dd="http://www.apache.org/ode/schemas/dd/2007/03";
+       xmlns:bpel="http://sample.bpel.org/bpel/sample";
+       >
+
+       <dd:process
+               name="bpel:OnEventCorrelation" 
fileName="OnEventCorrelation.bpel">
+               <!--dd:process-events generate="none"/-->
+               <dd:provide partnerLink="client">
+                       <dd:service name="bpel:OnEventCorrelation" 
port="OnEventCorrelation" />
+               </dd:provide>
+       </dd:process>
+</dd:deploy>

Added: 
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/testRequest.soap
URL: 
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/testRequest.soap?rev=743120&view=auto
==============================================================================
--- 
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/testRequest.soap
 (added)
+++ 
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestThrowOnEvent/testRequest.soap
 Tue Feb 10 21:57:39 2009
@@ -0,0 +1,8 @@
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:sam="http://sample.bpel.org/bpel/sample";>
+   <soapenv:Header/>
+   <soapenv:Body>
+      <sam:OnEventCorrelationRequest>
+         <sam:input>101</sam:input>
+      </sam:OnEventCorrelationRequest>
+   </soapenv:Body>
+</soapenv:Envelope>
\ No newline at end of file


Reply via email to