Author: mriou
Date: Fri Aug 10 13:06:07 2007
New Revision: 564738
URL: http://svn.apache.org/viewvc?view=rev&rev=564738
Log:
Test for ODE-137 using a counter incrementation with XPath 1.0
Added:
ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/
ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/counter.bpel
ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/counter.cbp
(with props)
ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/counter.wsdl
ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/deploy.xml
ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/test.properties
Modified:
ode/trunk/bpel-test/src/test/java/org/apache/ode/test/DataHandling20Test.java
Modified:
ode/trunk/bpel-test/src/test/java/org/apache/ode/test/DataHandling20Test.java
URL:
http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/java/org/apache/ode/test/DataHandling20Test.java?view=diff&rev=564738&r1=564737&r2=564738
==============================================================================
---
ode/trunk/bpel-test/src/test/java/org/apache/ode/test/DataHandling20Test.java
(original)
+++
ode/trunk/bpel-test/src/test/java/org/apache/ode/test/DataHandling20Test.java
Fri Aug 10 13:06:07 2007
@@ -52,5 +52,8 @@
@Test public void testSplit() throws Throwable {
go("/bpel/2.0/TestSplit");
}
+ @Test public void testCounter() throws Throwable {
+ go("/bpel/2.0/TestCounter");
+ }
}
Added: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/counter.bpel
URL:
http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/counter.bpel?view=auto&rev=564738
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/counter.bpel
(added)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/counter.bpel
Fri Aug 10 13:06:07 2007
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<b:process xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xsi:schemaLocation="http://docs.oasis-open.org/wsbpel/2.0/process/executable
http://docs.oasis-open.org/wsbpel/2.0/CS01/process/executable/ws-bpel_executable.xsd"
+ xmlns:b="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ name="counter"
+ xmlns:t="http://example.com/bpel/counter"
+ targetNamespace="http://example.com/bpel/counter">
+
+ <b:import importType="http://schemas.xmlsoap.org/wsdl/"
+ location="counter.wsdl"
+ namespace="http://example.com/bpel/counter" />
+
+ <b:partnerLinks>
+ <b:partnerLink name="operations" partnerLinkType="t:plink" myRole="me"
/>
+ </b:partnerLinks>
+
+ <b:variables>
+ <b:variable name="counter" messageType="t:responseMessage" />
+ <b:variable name="initiation" messageType="t:requestMessage" />
+ </b:variables>
+
+ <b:sequence>
+ <b:receive partnerLink="operations" createInstance="yes"
operation="initialize" portType="t:port"
+ variable="initiation">
+ </b:receive>
+ <b:assign>
+ <b:copy>
+ <b:from>0</b:from>
+ <b:to variable="counter" part="value"></b:to>
+ </b:copy>
+ </b:assign>
+ <b:while>
+ <b:condition>10 > $counter.value</b:condition>
+ <b:sequence>
+ <b:assign>
+ <b:copy>
+ <b:from>$counter.value+1</b:from>
+ <b:to>$counter.value</b:to>
+ </b:copy>
+ </b:assign>
+ </b:sequence>
+ </b:while>
+ <b:reply partnerLink="operations" operation="initialize"
variable="counter"/>
+ </b:sequence>
+</b:process>
Added: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/counter.cbp
URL:
http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/counter.cbp?view=auto&rev=564738
==============================================================================
Binary file - no diff available.
Propchange:
ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/counter.cbp
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/counter.wsdl
URL:
http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/counter.wsdl?view=auto&rev=564738
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/counter.wsdl
(added)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/counter.wsdl
Fri Aug 10 13:06:07 2007
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions
+ targetNamespace="http://example.com/bpel/counter"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:p="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+ xmlns:v="http://docs.oasis-open.org/wsbpel/2.0/varprop"
+ xmlns:t="http://example.com/bpel/counter">
+
+ <wsdl:message name="requestMessage">
+ <wsdl:part name="counterName" type="xsd:string" />
+ </wsdl:message>
+
+ <wsdl:message name="responseMessage">
+ <wsdl:part name="value" type="xsd:int" />
+ </wsdl:message>
+
+ <wsdl:portType name="port">
+ <wsdl:operation name="initialize">
+ <wsdl:input message="t:requestMessage" />
+ <wsdl:output message="t:responseMessage" />
+ </wsdl:operation>
+ <wsdl:operation name="get">
+ <wsdl:input message="t:requestMessage" />
+ <wsdl:output message="t:responseMessage" />
+ </wsdl:operation>
+ <wsdl:operation name="getAndIncrement">
+ <wsdl:input message="t:requestMessage" />
+ <wsdl:output message="t:responseMessage" />
+ </wsdl:operation>
+ <wsdl:operation name="close">
+ <wsdl:input message="t:requestMessage" />
+ <wsdl:output message="t:responseMessage" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="binding" type="t:port">
+ <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="initialize">
+ <soap:operation soapAction="" style="rpc"/>
+ <wsdl:input>
+ <soap:body namespace="http://example.com/bpel/counter" use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body namespace="http://example.com/bpel/counter" use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="get">
+ <soap:operation soapAction="" style="rpc"/>
+ <wsdl:input>
+ <soap:body namespace="http://example.com/bpel/counter" use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body namespace="http://example.com/bpel/counter" use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getAndIncrement">
+ <soap:operation soapAction="" style="rpc"/>
+ <wsdl:input>
+ <soap:body namespace="http://example.com/bpel/counter" use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body namespace="http://example.com/bpel/counter" use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="close">
+ <soap:operation soapAction="" style="rpc"/>
+ <wsdl:input>
+ <soap:body namespace="http://example.com/bpel/counter" use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body namespace="http://example.com/bpel/counter" use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="counterService">
+ <wsdl:port name="port" binding="t:binding">
+ <soap:address location="http://localhost:8080/ode/processes/counter"/>
+ </wsdl:port>
+ </wsdl:service>
+
+ <p:partnerLinkType name="plink">
+ <p:role name="me" portType="t:port" />
+ <p:role name="you" portType="t:port" />
+ </p:partnerLinkType>
+
+</wsdl:definitions>
\ No newline at end of file
Added: ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/deploy.xml
URL:
http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/deploy.xml?view=auto&rev=564738
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/deploy.xml
(added)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/deploy.xml Fri
Aug 10 13:06:07 2007
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
xmlns:tns="http://example.com/bpel/counter">
+ <process name="tns:counter">
+ <active>true</active>
+ <provide partnerLink="operations">
+ <service name="tns:counterService" port="port"/>
+ </provide>
+ </process>
+</deploy>
\ No newline at end of file
Added:
ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/test.properties
URL:
http://svn.apache.org/viewvc/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/test.properties?view=auto&rev=564738
==============================================================================
--- ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/test.properties
(added)
+++ ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestCounter/test.properties
Fri Aug 10 13:06:07 2007
@@ -0,0 +1,23 @@
+#
+# 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.
+#
+
+namespace=http://example.com/bpel/counter
+service=counterService
+operation=initialize
+request1=<message><counterName>foo</counterName></message>
+response1=.*10.*
+