You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by bo...@apache.org on 2008/02/14 20:04:52 UTC
svn commit: r627841 - in
/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ExtVar2:
./ ExtVar2.bpel ExtVar2.wsdl ExtVar2.xsd deploy.xml test.properties
Author: boisvert
Date: Thu Feb 14 11:04:44 2008
New Revision: 627841
URL: http://svn.apache.org/viewvc?rev=627841&view=rev
Log:
Add missing test case resources
Added:
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ExtVar2/
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ExtVar2/ExtVar2.bpel
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ExtVar2/ExtVar2.wsdl
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ExtVar2/ExtVar2.xsd
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ExtVar2/deploy.xml
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ExtVar2/test.properties
Added: ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ExtVar2/ExtVar2.bpel
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ExtVar2/ExtVar2.bpel?rev=627841&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ExtVar2/ExtVar2.bpel (added)
+++ ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ExtVar2/ExtVar2.bpel Thu Feb 14 11:04:44 2008
@@ -0,0 +1,226 @@
+<?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.
+ -->
+<process name="ExtVar2" targetNamespace="http://ode/bpel/unit-test"
+ xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ 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:foo="http://foo/extvar"
+ xmlns:xvar="http://ode.apache.org/externalVariables"
+ queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+ expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
+
+ <import namespace="http://foo/extvar" location="ExtVar2.xsd" importType="http://www.w3.org/2001/XMLSchema"/>
+
+ <import location="ExtVar2.wsdl" namespace="http://ode/bpel/unit-test.wsdl" importType="http://schemas.xmlsoap.org/wsdl/" />
+
+
+ <partnerLinks>
+ <partnerLink name="ExtVarPartnerLink" partnerLinkType="test:ExtVarPartnerLinkType" myRole="me" />
+ </partnerLinks>
+
+ <variables>
+ <variable name="myVar" messageType="test:ExtVarMessage"/>
+ <variable name="costPerCustomer-keys" element="foo:costPerCustomer-keys"/>
+ <variable name="costPerCustomer" element="foo:costPerCustomer"
+ xvar:id="costPerCustomer" xvar:relates-to="costPerCustomer-keys"/>
+ </variables>
+
+ <sequence>
+ <receive name="start" partnerLink="ExtVarPartnerLink" portType="test:ExtVarPortType"
+ operation="extvar" variable="myVar" createInstance="yes"/>
+
+
+ <!-- insert new row by assigning directly into the external variable -->
+
+ <assign name="insertNewRow">
+ <copy>
+ <from>
+ <literal>
+ <foo:costPerCustomer>
+ <foo:key1>k1</foo:key1>
+ <foo:value0>v1</foo:value0>
+ </foo:costPerCustomer>
+ </literal>
+ </from>
+ <to>$costPerCustomer</to>
+ </copy>
+ </assign>
+
+ <if>
+ <condition>normalize-space($costPerCustomer-keys/foo:key1) = 'k1'</condition>
+ <empty/>
+ <else>
+ <throw faultName="foo:key1NotCreated"/>
+ </else>
+ </if>
+
+ <!-- assign into key just to confuse things -->
+
+ <assign name="changeKey1">
+ <copy>
+ <from>
+ <literal>k2</literal>
+ </from>
+ <to>$costPerCustomer-keys/foo:key1</to>
+ </copy>
+ </assign>
+
+ <if>
+ <condition>$costPerCustomer-keys/foo:key1 = 'k2'</condition>
+ <empty/>
+ <else>
+ <throw faultName="foo:changeKey1"/>
+ </else>
+ </if>
+
+ <assign name="changeKey2">
+ <copy>
+ <from>
+ <literal>k1</literal>
+ </from>
+ <to>$costPerCustomer-keys/foo:key1</to>
+ </copy>
+ </assign>
+
+ <if>
+ <condition>$costPerCustomer-keys/foo:key1 = 'k1'</condition>
+ <empty/>
+ <else>
+ <throw faultName="foo:changeKey1"/>
+ </else>
+ </if>
+
+ <!-- update row by assigning into extvar -->
+
+ <assign name="updateRow">
+ <copy>
+ <from>
+ <literal>v1-2</literal>
+ </from>
+ <to>$costPerCustomer/foo:value0</to>
+ </copy>
+ </assign>
+
+ <if>
+ <condition>$costPerCustomer/foo:value0 = 'v1-2'</condition>
+ <empty/>
+ <else>
+ <throw faultName="foo:rowNotUpdated"/>
+ </else>
+ </if>
+
+
+ <!-- create another row -->
+
+ <assign name="createAnotherRow">
+ <copy>
+ <from>
+ <literal>k2</literal>
+ </from>
+ <to>$costPerCustomer-keys/foo:key1</to>
+ </copy>
+ </assign>
+
+ <assign name="updateRow">
+ <copy>
+ <from>
+ <literal>
+ <foo:costPerCustomer>
+ <foo:value0>v2-1</foo:value0>
+ </foo:costPerCustomer>
+ </literal>
+ </from>
+ <to>$costPerCustomer</to>
+ </copy>
+ <copy>
+ <from>
+ <literal>v2-1</literal>
+ </from>
+ <to>$costPerCustomer/foo:value0</to>
+ </copy>
+ </assign>
+
+ <!-- go back to first row -->
+
+ <assign name="goBack1">
+ <copy>
+ <from>
+ <literal>k1</literal>
+ </from>
+ <to>$costPerCustomer-keys/foo:key1</to>
+ </copy>
+ </assign>
+
+ <if>
+ <condition>$costPerCustomer/foo:value0 = 'v1-2'</condition>
+ <empty/>
+ <else>
+ <throw faultName="foo:goBack1"/>
+ </else>
+ </if>
+
+ <!-- go back to 2nd row -->
+
+ <assign name="goBack2">
+ <copy>
+ <from>
+ <literal>k2</literal>
+ </from>
+ <to>$costPerCustomer-keys/foo:key1</to>
+ </copy>
+ </assign>
+
+ <if>
+ <condition>$costPerCustomer/foo:value0 = 'v2-1'</condition>
+ <empty/>
+ <else>
+ <throw faultName="foo:goBack2"/>
+ </else>
+ </if>
+
+ <!-- send back response -->
+
+ <assign name="assignResponse">
+ <copy>
+ <from>
+ <literal>
+ <foo:response>
+ <foo:keys/>
+ <foo:values/>
+ </foo:response>
+ </literal>
+ </from>
+ <to>$myVar.TestPart</to>
+ </copy>
+ <copy>
+ <from>$costPerCustomer-keys</from>
+ <to>$myVar.TestPart/foo:keys</to>
+ </copy>
+ <copy>
+ <from>$costPerCustomer</from>
+ <to>$myVar.TestPart/foo:values</to>
+ </copy>
+ </assign>
+
+ <reply name="end" partnerLink="ExtVarPartnerLink" portType="test:ExtVarPortType" operation="extvar" variable="myVar"/>
+ </sequence>
+</process>
Added: ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ExtVar2/ExtVar2.wsdl
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ExtVar2/ExtVar2.wsdl?rev=627841&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ExtVar2/ExtVar2.wsdl (added)
+++ ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ExtVar2/ExtVar2.wsdl Thu Feb 14 11:04:44 2008
@@ -0,0 +1,69 @@
+<?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:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
+
+
+ <wsdl:message name="ExtVarMessage">
+ <wsdl:part name="TestPart" type="xsd:string"/>
+ </wsdl:message>
+
+ <wsdl:portType name="ExtVarPortType">
+ <wsdl:operation name="extvar">
+ <wsdl:input message="tns:ExtVarMessage" name="TestIn"/>
+ <wsdl:output message="tns:ExtVarMessage" name="TestOut"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="ExtVarSoapBinding" type="tns:ExtVarPortType">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="extvar">
+ <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="ExtVarService">
+ <wsdl:port name="ExtVarPort" binding="tns:ExtVarSoapBinding">
+ <soap:address location="http://localhost:8080/ode/processes/extvar2"/>
+ </wsdl:port>
+ </wsdl:service>
+
+ <plnk:partnerLinkType name="ExtVarPartnerLinkType">
+ <plnk:role name="me" portType="tns:ExtVarPortType"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
+
Added: ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ExtVar2/ExtVar2.xsd
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ExtVar2/ExtVar2.xsd?rev=627841&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ExtVar2/ExtVar2.xsd (added)
+++ ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ExtVar2/ExtVar2.xsd Thu Feb 14 11:04:44 2008
@@ -0,0 +1,41 @@
+<?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.
+ -->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo/extvar"
+ xmlns:tns="http://foo/extvar"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified">
+
+ <element name="costPerCustomer">
+ <complexType>
+ <sequence>
+ <element name="value0" type="xs:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="costPerCustomer-keys">
+ <complexType>
+ <sequence>
+ <element name="key1" type="xs:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+</schema>
\ No newline at end of file
Added: ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ExtVar2/deploy.xml
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ExtVar2/deploy.xml?rev=627841&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ExtVar2/deploy.xml (added)
+++ ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ExtVar2/deploy.xml Thu Feb 14 11:04:44 2008
@@ -0,0 +1,44 @@
+<?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.
+ -->
+<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:xvar="http://ode.apache.org/externalVariables"
+ xmlns:jdbc="http://ode.apache.org/externalVariables/jdbc">
+
+ <process name="pns:ExtVar2">
+ <active>true</active>
+ <provide partnerLink="ExtVarPartnerLink">
+ <service name="wns:ExtVarService" port="ExtVarPort"/>
+ </provide>
+
+ <xvar:externalVariable id="costPerCustomer">
+ <jdbc:jdbc>
+ <jdbc:datasource-ref>testds</jdbc:datasource-ref>
+ <jdbc:table>costPerCustomer</jdbc:table>
+ <jdbc:column name="key1" key="yes" sql-type="VARCHAR" xsd-type="xs:string" />
+ <jdbc:column name="value0" key="no" sql-type="VARCHAR" xsd-type="xs:string" />
+ <jdbc:init mode="update-insert"></jdbc:init>
+ </jdbc:jdbc>
+ </xvar:externalVariable>
+
+ </process>
+</deploy>
+
Added: ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ExtVar2/test.properties
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ExtVar2/test.properties?rev=627841&view=auto
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ExtVar2/test.properties (added)
+++ ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/ExtVar2/test.properties Thu Feb 14 11:04:44 2008
@@ -0,0 +1,34 @@
+#
+# 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://ode/bpel/unit-test.wsdl
+service=ExtVarService
+operation=extvar
+request1=<message><TestPart>Hello</TestPart></message>
+response1=.*k2.*k2.*v2-1.*
+
+# Response should look something like:
+# <tns:response>
+# <keys xmlns="http://test.com/xvar/example">
+# <key1>k2</key1>
+# </keys>
+# <values xmlns="http://test.com/xvar/example">
+# <key1>k2</key1>
+# <value0>v2-1</value0>
+# </values>
+# </tns:response>
+#