Author: rr
Date: Wed Feb 10 17:51:58 2010
New Revision: 908601
URL: http://svn.apache.org/viewvc?rev=908601&view=rev
Log:
ODE-676: ignoreMissingFromData doesn't seem to work when copying from an
optional element that has been omitted (test + fix)
Added:
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/TestIgnoreMissingFromData.bpel
(with props)
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/TestIgnoreMissingFromData.wsdl
(with props)
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/test1.properties
(with props)
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/test2.properties
(with props)
Removed:
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/test.properties
Modified:
ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath20/runtime/XPath20ExpressionRuntime.java
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/deploy.xml
Modified:
ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath20/runtime/XPath20ExpressionRuntime.java
URL:
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath20/runtime/XPath20ExpressionRuntime.java?rev=908601&r1=908600&r2=908601&view=diff
==============================================================================
---
ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath20/runtime/XPath20ExpressionRuntime.java
(original)
+++
ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath20/runtime/XPath20ExpressionRuntime.java
Wed Feb 10 17:51:58 2010
@@ -166,7 +166,7 @@
public Node evaluateNode(OExpression cexp, EvaluationContext ctx) throws
FaultException, EvaluationException {
List retVal = evaluate(cexp, ctx);
if (retVal.size() == 0)
- throw new
FaultException(cexp.getOwner().constants.qnSelectionFailure, "No results for
expression: " + cexp);
+ throw new
FaultException(cexp.getOwner().constants.qnSelectionFailure, "No results for
expression: " + cexp, new Throwable("ignoreMissingFromData"));
if (retVal.size() > 1)
throw new
FaultException(cexp.getOwner().constants.qnSelectionFailure, "Multiple results
for expression: " + cexp);
return (Node) retVal.get(0);
Added:
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/TestIgnoreMissingFromData.bpel
URL:
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/TestIgnoreMissingFromData.bpel?rev=908601&view=auto
==============================================================================
---
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/TestIgnoreMissingFromData.bpel
(added)
+++
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/TestIgnoreMissingFromData.bpel
Wed Feb 10 17:51:58 2010
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpel:process exitOnStandardFault="yes"
+ expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+ name="TestIgnoreMissingFromData"
+ queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+ suppressJoinFailure="yes" targetNamespace="test:test"
+ xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+ xmlns:ode="http://www.apache.org/ode/type/extension"
+ xmlns:tns="test:test" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <bpel:import importType="http://schemas.xmlsoap.org/wsdl/"
+ location="TestIgnoreMissingFromData.wsdl" namespace="test:test"/>
+ <bpel:partnerLinks>
+ <bpel:partnerLink myRole="ServiceProvider" name="client"
partnerLinkType="tns:ServicePartnerLinkType"/>
+ </bpel:partnerLinks>
+ <bpel:variables>
+ <bpel:variable messageType="tns:InputMessage" name="input"/>
+ <bpel:variable messageType="tns:OutputMessage" name="output"/>
+ <bpel:variable element="tns:TestElement" name="TestVar"/>
+ </bpel:variables>
+ <bpel:sequence name="process">
+ <bpel:receive createInstance="yes" name="ReceiveInput"
+ operation="process" partnerLink="client"
+ portType="tns:ServicePortType" variable="input"/>
+ <bpel:assign name="Assign" validate="no">
+ <bpel:copy>
+ <bpel:from>
+ <bpel:literal>
+ <tns:TestElement xmlns:tns="test:test"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="test:test TestIgnoreMissingFromData.wsdl ">
+ <!-- Omit the optional element. -->
+ </tns:TestElement>
+ </bpel:literal>
+ </bpel:from>
+ <bpel:to variable="TestVar"/>
+ </bpel:copy>
+ <bpel:copy ignoreMissingFromData="yes">
+ <bpel:from variable="TestVar">
+ <bpel:query
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"><![CDATA[tns:OptionalElement]]></bpel:query>
+ </bpel:from>
+ <bpel:to part="payload" variable="output"/>
+ </bpel:copy>
+ <bpel:copy>
+ <bpel:from
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"><![CDATA["Test
passed."]]></bpel:from>
+ <bpel:to part="payload" variable="output"/>
+ </bpel:copy>
+ </bpel:assign>
+ <bpel:reply name="ReplyWithOutput" operation="process"
+ partnerLink="client" portType="tns:ServicePortType"
variable="output"/>
+ </bpel:sequence>
+</bpel:process>
Propchange:
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/TestIgnoreMissingFromData.bpel
------------------------------------------------------------------------------
svn:eol-style = native
Added:
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/TestIgnoreMissingFromData.wsdl
URL:
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/TestIgnoreMissingFromData.wsdl?rev=908601&view=auto
==============================================================================
---
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/TestIgnoreMissingFromData.wsdl
(added)
+++
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/TestIgnoreMissingFromData.wsdl
Wed Feb 10 17:51:58 2010
@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+<definitions name="TestIgnoreMissingFromData"
+ targetNamespace="test:test"
+ xmlns:tns="test:test"
+ xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ >
+
+ <types>
+ <schema attributeFormDefault="unqualified"
elementFormDefault="qualified"
+ targetNamespace="test:test"
+ xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="Input" type="string" />
+ <element name="Output" type="string" />
+
+ <element name="TestElement">
+ <complexType>
+ <sequence>
+ <element name="OptionalElement" type="string"
minOccurs="0" maxOccurs="1"></element>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </types>
+
+ <message name="InputMessage">
+ <part name="payload" element="tns:Input"/>
+ </message>
+ <message name="OutputMessage">
+ <part name="payload" element="tns:Output"/>
+ </message>
+
+ <portType name="ServicePortType">
+ <operation name="process">
+ <input message="tns:InputMessage" />
+ <output message="tns:OutputMessage"/>
+ </operation>
+ </portType>
+
+ <plnk:partnerLinkType name="ServicePartnerLinkType">
+ <plnk:role name="ServiceProvider" portType="tns:ServicePortType"/>
+ </plnk:partnerLinkType>
+
+ <binding name="ServiceBinding" type="tns:ServicePortType">
+ <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="process">
+ <soap:operation soapAction="test:test/process" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+
+ <service name="TestIgnoreMissingFromDataService">
+ <port name="TestIgnoreMissingFromDataPort"
binding="tns:ServiceBinding">
+ <soap:address
location="http://[server]:[port]/ode/processes/TestIgnoreMissingFromData" />
+ </port>
+ </service>
+</definitions>
Propchange:
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/TestIgnoreMissingFromData.wsdl
------------------------------------------------------------------------------
svn:eol-style = native
Modified:
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/deploy.xml
URL:
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/deploy.xml?rev=908601&r1=908600&r2=908601&view=diff
==============================================================================
---
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/deploy.xml
(original)
+++
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/deploy.xml
Wed Feb 10 17:51:58 2010
@@ -19,7 +19,8 @@
<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
xmlns:pns="http://ode/bpel/unit-testAssign1"
- xmlns:wns="http://ode/bpel/unit-testAssign1.wsdl">
+ xmlns:wns="http://ode/bpel/unit-testAssign1.wsdl"
+ xmlns:ns1="test:test">
<process name="pns:TestAssign">
@@ -29,4 +30,12 @@
<service name="wns:TestAssignService"
port="TestAssignPort"/>
</provide>
</process>
+
+ <process name="ns1:TestIgnoreMissingFromData">
+ <active>true</active>
+ <provide partnerLink="client">
+ <service name="ns1:TestIgnoreMissingFromDataService"
port="TestIgnoreMissingFromDataPort"/>
+ </provide>
+ </process>
+
</deploy>
Added:
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/test1.properties
URL:
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/test1.properties?rev=908601&view=auto
==============================================================================
---
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/test1.properties
(added)
+++
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/test1.properties
Wed Feb 10 17:51:58 2010
@@ -0,0 +1,22 @@
+#
+# 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-testAssign1.wsdl
+service=TestAssignService
+operation=testAssign
+request1=<message><TestPart>Hello</TestPart></message>
+response1=.*Hello World.*
\ No newline at end of file
Propchange:
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/test1.properties
------------------------------------------------------------------------------
svn:eol-style = native
Added:
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/test2.properties
URL:
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/test2.properties?rev=908601&view=auto
==============================================================================
---
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/test2.properties
(added)
+++
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/test2.properties
Wed Feb 10 17:51:58 2010
@@ -0,0 +1,22 @@
+#
+# 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=test:test
+service=TestIgnoreMissingFromDataService
+operation=process
+request1=<message><payload><test:Input
xmlns:test="test:test">abc</test:Input></payload></message>
+response1=.*Test passed.*
Propchange:
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestAssignMissingData/test2.properties
------------------------------------------------------------------------------
svn:eol-style = native