You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by mr...@apache.org on 2008/07/16 19:33:53 UTC
svn commit: r677357 - in /ode/branches/APACHE_ODE_1.X:
axis2-war/src/test/java/org/apache/ode/axis2/
axis2-war/src/test/resources/TestFailureInInvoke/
axis2-war/src/test/resources/TestStructuredFault/
bpel-runtime/src/main/java/org/apache/ode/bpel/engine/
Author: mriou
Date: Wed Jul 16 10:33:53 2008
New Revision: 677357
URL: http://svn.apache.org/viewvc?rev=677357&view=rev
Log:
Tests that are skipped by default (too time sensitive) and a couple of fixes.
Added:
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/FailureInvokeTest.java
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestFailureInInvoke/
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestFailureInInvoke/FailureInvokeTest.bpel
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestFailureInInvoke/FailureInvokeTest.wsdl
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestFailureInInvoke/deploy.xml
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestFailureInInvoke/dummy-service.wsdl
- copied, changed from r677356, ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestStructuredFault/dummy-service.wsdl
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestFailureInInvoke/testRequest.soap
Modified:
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/DummyService.java
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestStructuredFault/dummy-service.wsdl
ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java
ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java
ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelRuntimeContextImpl.java
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/DummyService.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/DummyService.java?rev=677357&r1=677356&r2=677357&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/DummyService.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/DummyService.java Wed Jul 16 10:33:53 2008
@@ -12,9 +12,20 @@
*/
public class DummyService {
public String hello(String in) {
+ System.out.println("#### IN HELLO ####");
return in + " world";
}
+ public String longOperation(String in) {
+ System.out.println("#### IN LONG OP ####");
+ try {
+ Thread.sleep(5000);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ return "Went through " + in;
+ }
+
public String faultTest(String in) throws DummyException, AxisFault {
OMFactory factory = OMAbstractFactory.getOMFactory();
OMElement root = factory.createOMElement(new QName("http://axis2.ode.apache.org", "DummyException"));
Added: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/FailureInvokeTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/FailureInvokeTest.java?rev=677357&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/FailureInvokeTest.java (added)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/FailureInvokeTest.java Wed Jul 16 10:33:53 2008
@@ -0,0 +1,60 @@
+package org.apache.ode.axis2;
+
+import org.apache.axis2.AxisFault;
+import org.junit.Ignore;
+
+/**
+ * This test requires very specific timing values to work which is why it's set to ignored, it
+ * probably wouldn't work on most machines. BpelRuntimeContextImpl.scheduleInvokeCheck also has to
+ * use a timer value of 5s instead of 180s (a bit too long for testing).
+ */
+@Ignore
+public class FailureInvokeTest extends Axis2TestBase {
+
+ @Ignore
+ public void testSimpleFaultCatch() throws Exception {
+ String bundleName = "TestFailureInInvoke";
+ // deploy the required service
+ server.deployService(DummyService.class.getCanonicalName());
+ if (server.isDeployed(bundleName)) server.undeployProcess(bundleName);
+ server.deployProcess(bundleName);
+
+ try {
+ new Thread(new Killer(this)).start();
+ try {
+ String response = server.sendRequestFile("http://localhost:8080/processes/invokeFailureTest",
+ bundleName, "testRequest.soap");
+ System.out.println("=> " + response);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ startServer();
+ Thread.sleep(15000);
+ } finally {
+ server.undeployProcess(bundleName);
+ }
+ }
+
+ private class Killer implements Runnable {
+ private FailureInvokeTest test;
+
+ private Killer(FailureInvokeTest test) {
+ this.test = test;
+ }
+
+ public void run() {
+ try {
+ Thread.sleep(5000);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ try {
+ test.stopServer();
+ } catch (AxisFault axisFault) {
+ axisFault.printStackTrace();
+ }
+ }
+ }
+
+}
Added: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestFailureInInvoke/FailureInvokeTest.bpel
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestFailureInInvoke/FailureInvokeTest.bpel?rev=677357&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestFailureInInvoke/FailureInvokeTest.bpel (added)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestFailureInInvoke/FailureInvokeTest.bpel Wed Jul 16 10:33:53 2008
@@ -0,0 +1,71 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+<process name="HeaderTest"
+ targetNamespace="http://ode/bpel/unit-test"
+ xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ xmlns:tns="http://ode/bpel/unit-test"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:test="http://ode/bpel/unit-test.wsdl"
+ xmlns:dummy="http://axis2.ode.apache.org"
+ queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+ expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
+
+ <import location="FailureInvokeTest.wsdl"
+ namespace="http://ode/bpel/unit-test.wsdl"
+ importType="http://schemas.xmlsoap.org/wsdl/" />
+
+ <partnerLinks>
+ <partnerLink name="helloPartnerLink"
+ partnerLinkType="test:HeaderTestPartnerLinkType" myRole="me" />
+ <partnerLink name="dummyPartnerLink"
+ partnerLinkType="test:DummyPartnerLinkType" partnerRole="you" />
+ </partnerLinks>
+
+ <variables>
+ <variable name="myInVar" messageType="test:HeaderTestMessage"/>
+ <variable name="myOutVar" messageType="test:HeaderTestMessage"/>
+ <variable name="input" messageType="dummy:longOperationRequest"/>
+ <variable name="output" messageType="dummy:longOperationResponse"/>
+ </variables>
+
+ <sequence>
+ <receive name="start" partnerLink="helloPartnerLink" portType="test:HeaderTestPortType"
+ operation="hello" variable="myInVar" createInstance="yes"/>
+
+ <assign>
+ <copy>
+ <from><literal><dummy:faultTest><dummy:in>Hello</dummy:in></dummy:faultTest></literal></from>
+ <to>$input.parameters</to>
+ </copy>
+ </assign>
+
+ <invoke partnerLink="dummyPartnerLink" portType="test:DummyServicePortType"
+ operation="longOperation" inputVariable="input" outputVariable="output"/>
+
+ <assign>
+ <copy>
+ <from>$output.parameters/return</from>
+ <to>$myOutVar.TestPart</to>
+ </copy>
+ </assign>
+
+ <reply name="end" partnerLink="helloPartnerLink" portType="test:HeaderTestPortType"
+ operation="hello" variable="myOutVar"/>
+ </sequence>
+</process>
Added: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestFailureInInvoke/FailureInvokeTest.wsdl
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestFailureInInvoke/FailureInvokeTest.wsdl?rev=677357&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestFailureInInvoke/FailureInvokeTest.wsdl (added)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestFailureInInvoke/FailureInvokeTest.wsdl Wed Jul 16 10:33:53 2008
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+
+<wsdl:definitions
+ targetNamespace="http://ode/bpel/unit-test.wsdl"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://ode/bpel/unit-test.wsdl"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:dummy="http://axis2.ode.apache.org"
+ xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
+
+ <wsdl:import namespace="http://axis2.ode.apache.org" location="dummy-service.wsdl"/>
+
+ <wsdl:message name="HeaderTestMessage">
+ <wsdl:part name="TestPart" type="xsd:string"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HeaderTestPortType">
+ <wsdl:operation name="hello">
+ <wsdl:input message="tns:HeaderTestMessage" name="TestIn"/>
+ <wsdl:output message="tns:HeaderTestMessage" name="TestOut"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HeaderTestSoapBinding" type="tns:HeaderTestPortType">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="hello">
+ <soap:operation soapAction="" style="rpc"/>
+ <wsdl:input>
+ <soap:body namespace="http://ode/bpel/unit-test.wsdl" use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body namespace="http://ode/bpel/unit-test.wsdl" use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="HeaderTestService">
+ <wsdl:port name="HeaderTestPort" binding="tns:HeaderTestSoapBinding">
+ <soap:address location="http://localhost:8080/ode/processes/invokeFailureTest"/>
+ </wsdl:port>
+ </wsdl:service>
+
+ <plnk:partnerLinkType name="HeaderTestPartnerLinkType">
+ <plnk:role name="me" portType="tns:HeaderTestPortType"/>
+ <plnk:role name="you" portType="tns:HeaderTestPortType"/>
+ </plnk:partnerLinkType>
+ <plnk:partnerLinkType name="DummyPartnerLinkType">
+ <plnk:role name="you" portType="dummy:DummyServicePortType"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
+
Added: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestFailureInInvoke/deploy.xml
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestFailureInInvoke/deploy.xml?rev=677357&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestFailureInInvoke/deploy.xml (added)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestFailureInInvoke/deploy.xml Wed Jul 16 10:33:53 2008
@@ -0,0 +1,33 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
+ xmlns:pns="http://ode/bpel/unit-test"
+ xmlns:wns="http://ode/bpel/unit-test.wsdl" xmlns:dns="http://axis2.ode.apache.org">
+
+
+ <process name="pns:HeaderTest">
+ <active>true</active>
+ <provide partnerLink="helloPartnerLink">
+ <service name="wns:HeaderTestService" port="HeaderTestPort"/>
+ </provide>
+ <invoke partnerLink="dummyPartnerLink">
+ <service name="dns:DummyService" port="DummyServiceSOAP11port_http"/>
+ </invoke>
+ </process>
+</deploy>
Copied: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestFailureInInvoke/dummy-service.wsdl (from r677356, ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestStructuredFault/dummy-service.wsdl)
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestFailureInInvoke/dummy-service.wsdl?p2=ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestFailureInInvoke/dummy-service.wsdl&p1=ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestStructuredFault/dummy-service.wsdl&r1=677356&r2=677357&rev=677357&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestStructuredFault/dummy-service.wsdl (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestFailureInInvoke/dummy-service.wsdl Wed Jul 16 10:33:53 2008
@@ -48,6 +48,20 @@
</xs:sequence>
</xs:complexType>
</xs:element>
+ <xs:element name="longOperation">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="in" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="longOperationResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="faultTestRequest">
@@ -65,6 +79,12 @@
<wsdl:message name="helloResponse">
<wsdl:part name="parameters" element="ns1:helloResponse"/>
</wsdl:message>
+ <wsdl:message name="longOperationRequest">
+ <wsdl:part name="parameters" element="ns1:longOperation"/>
+ </wsdl:message>
+ <wsdl:message name="longOperationResponse">
+ <wsdl:part name="parameters" element="ns1:longOperationResponse"/>
+ </wsdl:message>
<wsdl:portType name="DummyServicePortType">
<wsdl:operation name="faultTest">
<wsdl:input message="ns1:faultTestRequest" wsaw:Action="urn:faultTest"/>
@@ -76,6 +96,10 @@
<wsdl:input message="ns1:helloRequest" wsaw:Action="urn:hello"/>
<wsdl:output message="ns1:helloResponse" wsaw:Action="urn:helloResponse"/>
</wsdl:operation>
+ <wsdl:operation name="longOperation">
+ <wsdl:input message="ns1:longOperationRequest" wsaw:Action="urn:longOperation"/>
+ <wsdl:output message="ns1:longOperationResponse" wsaw:Action="urn:longOperationResponse"/>
+ </wsdl:operation>
</wsdl:portType>
<wsdl:binding name="DummyServiceSOAP11Binding" type="ns1:DummyServicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
@@ -100,6 +124,15 @@
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
+ <wsdl:operation name="longOperation">
+ <soap:operation soapAction="urn:longOperation" style="document"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
</wsdl:binding>
<wsdl:binding name="DummyServiceSOAP12Binding" type="ns1:DummyServicePortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
@@ -124,6 +157,15 @@
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
+ <wsdl:operation name="longOperation">
+ <soap12:operation soapAction="urn:hello" style="document"/>
+ <wsdl:input>
+ <soap12:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
</wsdl:binding>
<wsdl:binding name="DummyServiceHttpBinding" type="ns1:DummyServicePortType">
<http:binding verb="POST"/>
@@ -145,6 +187,15 @@
<mime:content type="text/xml" part="hello"/>
</wsdl:output>
</wsdl:operation>
+ <wsdl:operation name="longOperation">
+ <http:operation location="DummyService/hello"/>
+ <wsdl:input>
+ <mime:content type="text/xml" part="hello"/>
+ </wsdl:input>
+ <wsdl:output>
+ <mime:content type="text/xml" part="hello"/>
+ </wsdl:output>
+ </wsdl:operation>
</wsdl:binding>
<wsdl:service name="DummyService">
<wsdl:port name="DummyServiceSOAP11port_http" binding="ns1:DummyServiceSOAP11Binding">
Added: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestFailureInInvoke/testRequest.soap
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestFailureInInvoke/testRequest.soap?rev=677357&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestFailureInInvoke/testRequest.soap (added)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestFailureInInvoke/testRequest.soap Wed Jul 16 10:33:53 2008
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
+ <SOAP-ENV:Header>
+ <myns:ConversationId xmlns:myns="http://my.company/super/protocol">ZZZXYZ</myns:ConversationId>
+ </SOAP-ENV:Header>
+ <!-- test soap message -->
+ <SOAP-ENV:Body>
+ <ns1:hello xmlns:ns1="http://ode/bpel/unit-test.wsdl">
+ <TestPart xmlns="">Hello</TestPart>
+ </ns1:hello>
+ </SOAP-ENV:Body>
+</SOAP-ENV:Envelope>
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestStructuredFault/dummy-service.wsdl
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestStructuredFault/dummy-service.wsdl?rev=677357&r1=677356&r2=677357&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestStructuredFault/dummy-service.wsdl (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestStructuredFault/dummy-service.wsdl Wed Jul 16 10:33:53 2008
@@ -48,6 +48,20 @@
</xs:sequence>
</xs:complexType>
</xs:element>
+ <xs:element name="longOperation">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="in" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="longOperationResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="faultTestRequest">
@@ -65,6 +79,12 @@
<wsdl:message name="helloResponse">
<wsdl:part name="parameters" element="ns1:helloResponse"/>
</wsdl:message>
+ <wsdl:message name="longOperationRequest">
+ <wsdl:part name="parameters" element="ns1:longOperation"/>
+ </wsdl:message>
+ <wsdl:message name="longOperationResponse">
+ <wsdl:part name="parameters" element="ns1:longOperationResponse"/>
+ </wsdl:message>
<wsdl:portType name="DummyServicePortType">
<wsdl:operation name="faultTest">
<wsdl:input message="ns1:faultTestRequest" wsaw:Action="urn:faultTest"/>
@@ -76,6 +96,10 @@
<wsdl:input message="ns1:helloRequest" wsaw:Action="urn:hello"/>
<wsdl:output message="ns1:helloResponse" wsaw:Action="urn:helloResponse"/>
</wsdl:operation>
+ <wsdl:operation name="longOperation">
+ <wsdl:input message="ns1:longOperationRequest" wsaw:Action="urn:longOperation"/>
+ <wsdl:output message="ns1:longOperationResponse" wsaw:Action="urn:longOperationResponse"/>
+ </wsdl:operation>
</wsdl:portType>
<wsdl:binding name="DummyServiceSOAP11Binding" type="ns1:DummyServicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
Modified: ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java?rev=677357&r1=677356&r2=677357&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java (original)
+++ ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java Wed Jul 16 10:33:53 2008
@@ -25,17 +25,10 @@
import org.apache.ode.bpel.dao.ProcessDAO;
import org.apache.ode.bpel.dao.ProcessInstanceDAO;
import org.apache.ode.bpel.evt.BpelEvent;
-import org.apache.ode.bpel.iapi.BpelEngine;
-import org.apache.ode.bpel.iapi.BpelEngineException;
-import org.apache.ode.bpel.iapi.ContextException;
-import org.apache.ode.bpel.iapi.Endpoint;
-import org.apache.ode.bpel.iapi.Message;
-import org.apache.ode.bpel.iapi.MessageExchange;
import org.apache.ode.bpel.iapi.MessageExchange.MessageExchangePattern;
import org.apache.ode.bpel.iapi.MessageExchange.Status;
-import org.apache.ode.bpel.iapi.MyRoleMessageExchange;
import org.apache.ode.bpel.iapi.MyRoleMessageExchange.CorrelationStatus;
-import org.apache.ode.bpel.iapi.Scheduler;
+import org.apache.ode.bpel.iapi.*;
import org.apache.ode.bpel.iapi.Scheduler.JobInfo;
import org.apache.ode.bpel.intercept.MessageExchangeInterceptor;
import org.apache.ode.bpel.o.OPartnerLink;
@@ -323,6 +316,18 @@
return;
}
+ if (we.getType().equals(WorkEvent.Type.INVOKE_CHECK)) {
+ if (__log.isDebugEnabled()) __log.debug("handleWorkEvent: InvokeCheck event for mexid " + we.getMexId());
+
+ PartnerRoleMessageExchange mex = (PartnerRoleMessageExchange) getMessageExchange(we.getMexId());
+ if (mex.getStatus() == MessageExchange.Status.ASYNC || mex.getStatus() == MessageExchange.Status.REQUEST) {
+ String msg = "Dangling invocation (mexId=" + we.getMexId() + "), forcing it into a failed state.";
+ if (__log.isDebugEnabled()) __log.debug(msg);
+ mex.replyWithFailure(MessageExchange.FailureType.COMMUNICATION_ERROR, msg, null);
+ }
+ return;
+ }
+
process.handleWorkEvent(jobInfo.jobDetail);
debuggingDelay();
} catch (BpelEngineException bee) {
Modified: ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java?rev=677357&r1=677356&r2=677357&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java (original)
+++ ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java Wed Jul 16 10:33:53 2008
@@ -365,14 +365,6 @@
}
MyRoleMessageExchangeImpl mex = (MyRoleMessageExchangeImpl) _engine.getMessageExchange(we.getMexId());
invokeProcess(mex);
- } else if (we.getType().equals(WorkEvent.Type.INVOKE_CHECK)) {
- if (__log.isDebugEnabled()) __log.debug("handleWorkEvent: InvokeCheck event for mexid " + we.getMexId());
-
- PartnerRoleMessageExchange mex = (PartnerRoleMessageExchange) _engine.getMessageExchange(we.getMexId());
- if (mex.getStatus() == MessageExchange.Status.ASYNC || mex.getStatus() == MessageExchange.Status.REQUEST) {
- mex.replyWithFailure(MessageExchange.FailureType.COMMUNICATION_ERROR,
- "Dangling invocation (mexId=" + we.getMexId() + "), forcing it into a failed state.", null);
- }
} else {
// Instance level events
ProcessInstanceDAO procInstance = getProcessDAO().getInstance(we.getIID());
Modified: ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelRuntimeContextImpl.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelRuntimeContextImpl.java?rev=677357&r1=677356&r2=677357&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelRuntimeContextImpl.java (original)
+++ ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelRuntimeContextImpl.java Wed Jul 16 10:33:53 2008
@@ -809,16 +809,17 @@
}
private void scheduleInvokeCheck(PartnerRoleMessageExchangeImpl mex) {
- boolean isTwoWay = mex.getMessageExchangePattern() == org.apache.ode.bpel.iapi.MessageExchange.MessageExchangePattern.REQUEST_RESPONSE;
+ boolean isTwoWay = mex.getMessageExchangePattern() ==
+ org.apache.ode.bpel.iapi.MessageExchange.MessageExchangePattern.REQUEST_RESPONSE;
if (!_bpelProcess.isInMemory() && isTwoWay) {
+ if (__log.isDebugEnabled()) __log.debug("Creating invocation check event for mexid " + mex.getMessageExchangeId());
WorkEvent event = new WorkEvent();
event.setMexId(mex.getMessageExchangeId());
event.setProcessId(_bpelProcess.getPID());
event.setInMem(false);
event.setType(WorkEvent.Type.INVOKE_CHECK);
- Calendar timer = Calendar.getInstance();
- timer.add(Calendar.SECOND, 65);
- _bpelProcess._engine._contexts.scheduler.schedulePersistedJob(event.getDetail(), timer.getTime());
+ Date future = new Date(System.currentTimeMillis() + (180 * 1000));
+ _bpelProcess._engine._contexts.scheduler.schedulePersistedJob(event.getDetail(), future);
}
}