Author: lwaterman
Date: Tue Oct 17 23:36:09 2006
New Revision: 465158
URL: http://svn.apache.org/viewvc?view=rev&rev=465158
Log:
Added new unit-test "TestSubTreeAssign"
Added:
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestSubTreeAssign/
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestSubTreeAssign/TestSubTreeAssign.bpel
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestSubTreeAssign/TestSubTreeAssign.wsdl
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestSubTreeAssign/deploy.xml
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestSubTreeAssign/test1.properties
Modified:
incubator/ode/trunk/bpel-test/src/test/java/org/apache/ode/test/BPELTest.java
Modified:
incubator/ode/trunk/bpel-test/src/test/java/org/apache/ode/test/BPELTest.java
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-test/src/test/java/org/apache/ode/test/BPELTest.java?view=diff&rev=465158&r1=465157&r2=465158
==============================================================================
---
incubator/ode/trunk/bpel-test/src/test/java/org/apache/ode/test/BPELTest.java
(original)
+++
incubator/ode/trunk/bpel-test/src/test/java/org/apache/ode/test/BPELTest.java
Tue Oct 17 23:36:09 2006
@@ -304,6 +304,10 @@
*/
negative("target/test-classes/bpel/2.0/NegativeInitializationTest");
}
+
+ public void testSubTreeAssign() throws Exception {
+ go("target/test-classes/bpel/2.0/TestSubTreeAssign");
+ }
/** These tests compile however they fail at runtime */
Added:
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestSubTreeAssign/TestSubTreeAssign.bpel
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestSubTreeAssign/TestSubTreeAssign.bpel?view=auto&rev=465158
==============================================================================
---
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestSubTreeAssign/TestSubTreeAssign.bpel
(added)
+++
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestSubTreeAssign/TestSubTreeAssign.bpel
Tue Oct 17 23:36:09 2006
@@ -0,0 +1,102 @@
+<!--
+ ~ 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 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://schemas.xmlsoap.org/ws/2004/03/business-process/
../../../../../../../bpel-schemas/src/main/resources/wsbpel_main-draft-Apr-29-2006.xsd"
+ xmlns:tns="http://ode/bpel/unit-test/TestSubTreeAssign"
+ xmlns:prb="http://ode/bpel/unit-test/ProbeService.wsdl"
+ xmlns:types="http://ode/bpel/unit-test/TestSubTreeAssign.wsdl.types"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:wns="http://ode/bpel/unit-test/TestSubTreeAssign.wsdl"
+ xmlns="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
+ targetNamespace="http://ode/bpel/unit-test/TestSubTreeAssign"
+ name="TestSubTreeAssign"
+ queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+ expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+ suppressJoinFailure="yes">
+
+ <import location="TestSubTreeAssign.wsdl"
+ namespace="http://ode/bpel/unit-test/TestSubTreeAssign.wsdl"
+ importType="http://schemas.xmlsoap.org/wsdl/" />
+ <import location="../ProbeService/probeService.wsdl"
+ namespace="http://ode/bpel/unit-test/ProbeService.wsdl"
+ importType="http://schemas.xmlsoap.org/wsdl/"/>
+
+
+ <partnerLinks>
+ <partnerLink name="request"
partnerLinkType="wns:TestSubTreeAssignRequest"
myRole="TestSubTreeAssignService"/>
+ </partnerLinks>
+ <variables>
+ <variable name="request" messageType="wns:requestMessage"/>
+ <variable name="testType1" element="types:aTestMessage"/>
+ <variable name="testType2" element="types:aTestMessage"/>
+ <variable name="testType3" type="xsd:string"/>
+ <variable name="testType4" type="xsd:string"/>
+ <variable name="reply" messageType="wns:replyMessage"/>
+ </variables>
+ <sequence>
+ <receive name="receive1" partnerLink="request"
portType="wns:TestSubTreeAssignPT" operation="request" variable="request"
createInstance="yes"/>
+
+ <assign name="assign1">
+ <!-- copy a tree to a tree -->
+ <copy>
+
<from>$request.requestMessageData/typeIndicators/types:indicatorTwo</from>
+ <to variable="testType3"/>
+ </copy>
+ <copy>
+ <from variable="request"
property="wns:testPath"/>
+ <to variable="testType4"/>
+ </copy>
+ <copy>
+ <from variable="request"
part="requestMessageData"/>
+ <to variable="testType1"/>
+ </copy>
+ <copy>
+ <from variable="testType1"/>
+ <to variable="testType2"/>
+ </copy>
+ <!-- copy value into tree -->
+ <copy>
+ <from>
+ <literal><![CDATA[pass]]></literal>
+ </from>
+
<to>$testType1/testMessage/typeIndicators/types:indicatorTwo</to>
+ </copy>
+ </assign>
+
+ <assign name="assignG">
+ <!-- copy subtree to tree -->
+ <copy>
+
<from>$testType1/testMessage/typeIndicators</from>
+ <to>$testType2/testMessage/typeIndicators</to>
+ </copy>
+ </assign>
+ <assign name="assign3">
+ <copy>
+ <from>$testType2/testMessage/requestID</from>
+ <to variable="reply" part="replyID"/>
+ </copy>
+ <copy>
+
<from>$testType2/testMessage/typeIndicators/types:indicatorTwo</from>
+ <to>$reply.replyText</to>
+ </copy>
+ </assign>
+
+ <reply name="reply" partnerLink="request"
portType="wns:TestSubTreeAssignPT" operation="request" variable="reply"/>
+ </sequence>
+</process>
Added:
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestSubTreeAssign/TestSubTreeAssign.wsdl
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestSubTreeAssign/TestSubTreeAssign.wsdl?view=auto&rev=465158
==============================================================================
---
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestSubTreeAssign/TestSubTreeAssign.wsdl
(added)
+++
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestSubTreeAssign/TestSubTreeAssign.wsdl
Tue Oct 17 23:36:09 2006
@@ -0,0 +1,101 @@
+<!--
+ ~ 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/TestSubTreeAssign.wsdl"
+ xmlns:tns="http://ode/bpel/unit-test/TestSubTreeAssign.wsdl"
+ xmlns:typens="http://ode/bpel/unit-test/TestSubTreeAssign.wsdl.types"
+ xmlns="http://ode/bpel/unit-test/TestSubTreeAssign.wsdl"
+ xmlns:prb="http://ode/bpel/unit-test/ProbeService.wsdl"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/">
+
+ <wsdl:types>
+
+ <xsd:schema
+ targetNamespace="http://ode/bpel/unit-test/TestSubTreeAssign.wsdl.types"
+ xmlns="http://ode/bpel/unit-test/TestSubTreeAssign.wsdl.types"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:element name="aTestMessage" type="testMessage"></xsd:element>
+
+ <xsd:complexType name="typeIndicator">
+ <xsd:sequence>
+ <xsd:element name="indicatorOne" type="xsd:string"/>
+ <xsd:element name="indicatorTwo" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="testMessage">
+ <xsd:sequence>
+ <xsd:element name="requestID" type="xsd:string"/>
+ <xsd:element name="requestText" type="xsd:string"/>
+ <xsd:element name="typeIndicators" type="typeIndicator"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ </xsd:schema>
+ </wsdl:types>
+
+ <wsdl:message name="requestMessage">
+ <wsdl:part name="requestMessageData" type="typens:testMessage"/>
+ </wsdl:message>
+
+ <wsdl:message name="replyMessage">
+ <wsdl:part name="replyID" type="xsd:string"/>
+ <wsdl:part name="replyText" type="xsd:string"/>
+ </wsdl:message>
+
+ <wsdl:portType name="TestSubTreeAssignPT">
+ <wsdl:operation name="request">
+ <wsdl:input message="requestMessage"/>
+ <wsdl:output message="replyMessage"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="TestSubTreeAssignBinding" type="tns:TestSubTreeAssignPT">
+ <wsdl:operation name="request">
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="TestSubTreeAssignService">
+ <wsdl:port name="TestSubTreeAssignPort"
binding="tns:TestSubTreeAssignBinding">
+ </wsdl:port>
+ </wsdl:service>
+
+ <plnk:partnerLinkType name="TestSubTreeAssignRequest">
+ <plnk:role name="TestSubTreeAssignService" portType="TestSubTreeAssignPT"/>
+ </plnk:partnerLinkType>
+
+ <plnk:partnerLinkType name="probeRequest">
+ <plnk:role name="probeService" portType="prb:probeMessagePT"/>
+ </plnk:partnerLinkType>
+
+ <bpws:property name="testProbeID" type="xsd:string"/>
+ <bpws:propertyAlias propertyName="tns:testProbeID"
messageType="tns:requestMessage" part="requestID"/>
+
+ <bpws:property name="testPath" type="xsd:string"/>
+ <bpws:propertyAlias propertyName="tns:testPath"
messageType="tns:requestMessage" part="requestMessageData">
+ <bpws:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
+ testMessage/typeIndicators/typens:indicatorTwo
+ </bpws:query>
+ </bpws:propertyAlias>
+
+
+</wsdl:definitions>
Added:
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestSubTreeAssign/deploy.xml
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestSubTreeAssign/deploy.xml?view=auto&rev=465158
==============================================================================
---
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestSubTreeAssign/deploy.xml
(added)
+++
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestSubTreeAssign/deploy.xml
Tue Oct 17 23:36:09 2006
@@ -0,0 +1,31 @@
+<!--
+ ~ 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://ode.fivesight.com/schemas/2006/06/27/dd"
+ xmlns:pns="http://ode/bpel/unit-test/TestSubTreeAssign"
+ xmlns:wns="http://ode/bpel/unit-test/TestSubTreeAssign.wsdl">
+
+
+ <process name="pns:TestSubTreeAssign">
+ <active>true</active>
+ <provide partnerLink="request">
+ <service name="wns:TestSubTreeAssignService"
port="wns:TestSubTreeAssignPort"/>
+ </provide>
+ </process>
+</deploy>
Added:
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestSubTreeAssign/test1.properties
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestSubTreeAssign/test1.properties?view=auto&rev=465158
==============================================================================
---
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestSubTreeAssign/test1.properties
(added)
+++
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/TestSubTreeAssign/test1.properties
Tue Oct 17 23:36:09 2006
@@ -0,0 +1,5 @@
+namespace=http://ode/bpel/unit-test/TestSubTreeAssign.wsdl
+service=TestSubTreeAssignService
+operation=request
+request1=<message><requestMessageData><testMessage><requestID>Start
SubTreeAssign</requestID><requestText>Event
SubTreeAssign</requestText><typeIndicators
xmlns:foo="http://ode/bpel/unit-test/TestSubTreeAssign.wsdl.types"><foo:indicatorOne>fail</foo:indicatorOne><foo:indicatorTwo>fail</foo:indicatorTwo></typeIndicators></testMessage></requestMessageData></message>
+response1=.*new.*