Author: mriou
Date: Thu Mar 6 14:54:27 2008
New Revision: 634439
URL: http://svn.apache.org/viewvc?rev=634439&view=rev
Log:
Fix on durations when assigned around.
Added:
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/BugCastDayTimeDurationToDuration-Pool.bpel
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/BugCastDayTimeDurationToDuration-Pool.deploy
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/BugCastDayTimeDurationToDuration-Pool.wsdl
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/BugCastDayTimeDurationToDuration.wsdl
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/deploy.xml
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/duration.xsd
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/test.properties
Modified:
ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath20/runtime/XPath20ExpressionRuntime.java
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/java/org/apache/ode/test/DataHandling20Test.java
Modified:
ode/branches/APACHE_ODE_1.1/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.1/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath20/runtime/XPath20ExpressionRuntime.java?rev=634439&r1=634438&r2=634439&view=diff
==============================================================================
---
ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath20/runtime/XPath20ExpressionRuntime.java
(original)
+++
ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath20/runtime/XPath20ExpressionRuntime.java
Thu Mar 6 14:54:27 2008
@@ -19,6 +19,7 @@
package org.apache.ode.bpel.elang.xpath20.runtime;
import net.sf.saxon.trans.DynamicError;
+import net.sf.saxon.value.DurationValue;
import net.sf.saxon.xpath.XPathEvaluator;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -35,11 +36,7 @@
import org.apache.ode.utils.ISO8601DateParser;
import org.apache.ode.utils.xsd.Duration;
import org.apache.ode.utils.xsl.XslTransformHandler;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
+import org.w3c.dom.*;
import javax.xml.namespace.QName;
import javax.xml.transform.TransformerFactory;
@@ -105,6 +102,8 @@
String textVal;
if (simpleType instanceof Date)
textVal = ISO8601DateParser.format((Date) simpleType);
+ else if (simpleType instanceof DurationValue)
+ textVal = ((DurationValue)simpleType).getStringValue();
else
textVal = simpleType.toString();
Modified:
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/java/org/apache/ode/test/DataHandling20Test.java
URL:
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/java/org/apache/ode/test/DataHandling20Test.java?rev=634439&r1=634438&r2=634439&view=diff
==============================================================================
---
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/java/org/apache/ode/test/DataHandling20Test.java
(original)
+++
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/java/org/apache/ode/test/DataHandling20Test.java
Thu Mar 6 14:54:27 2008
@@ -61,5 +61,8 @@
@Test public void testMsgDate() throws Throwable {
go("/bpel/2.0/TestMsgDate");
}
+ @Test public void testDuration() throws Throwable {
+ go("/bpel/2.0/TestDuration");
+ }
}
Added:
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/BugCastDayTimeDurationToDuration-Pool.bpel
URL:
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/BugCastDayTimeDurationToDuration-Pool.bpel?rev=634439&view=auto
==============================================================================
---
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/BugCastDayTimeDurationToDuration-Pool.bpel
(added)
+++
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/BugCastDayTimeDurationToDuration-Pool.bpel
Thu Mar 6 14:54:27 2008
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpel:process
xmlns:bpel="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
xmlns:pnlk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:diag="http://example.com/BugCastDayTimeDurationToDuration"
xmlns:Pool0="http://example.com/BugCastDayTimeDurationToDuration/Pool0"
xmlns:tns="http://www.example.org/duration"
xmlns:this="http://example.com/BugCastDayTimeDurationToDuration/Pool"
xmlns:bpmn="http://www.intalio.com/bpms"
xmlns:atomic="http://ode.apache.org/atomicScope"
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
bpmn:label="Pool" bpmn:id="_S2O9UOskEdyAk8HLE80VlA" name="Pool"
targetNamespace="http://example.com/BugCastDayTimeDurationToDuration/Pool">
+ <bpel:import namespace="http://example.com/BugCastDayTimeDurationToDuration"
location="BugCastDayTimeDurationToDuration.wsdl"
importType="http://schemas.xmlsoap.org/wsdl/"/>
+ <bpel:import
namespace="http://example.com/BugCastDayTimeDurationToDuration/Pool"
location="BugCastDayTimeDurationToDuration-Pool.wsdl"
importType="http://schemas.xmlsoap.org/wsdl/"/>
+ <bpel:partnerLinks>
+ <bpel:partnerLink name="pool0AndPoolPlkVar"
partnerLinkType="diag:Pool0AndPool" myRole="Pool_for_Pool0"/>
+ </bpel:partnerLinks>
+ <bpel:variables>
+ <bpel:variable name="thisTaskRequestMsg" messageType="this:TaskRequest"/>
+ <bpel:variable name="thisTaskResponseMsg" messageType="this:TaskResponse"/>
+ </bpel:variables>
+ <bpel:sequence>
+ <bpel:receive partnerLink="pool0AndPoolPlkVar" portType="this:ForPool0"
operation="Task" variable="thisTaskRequestMsg" createInstance="yes"/>
+ <bpel:assign name="init-variables-Pool">
+ <bpel:copy bpmn:label="$thisTaskResponseMsg">
+ <bpel:from>
+
<bpel:literal><this:TaskResponse>OK</this:TaskResponse></bpel:literal>
+ </bpel:from>
+ <bpel:to>$thisTaskResponseMsg.body</bpel:to>
+ </bpel:copy>
+ </bpel:assign>
+ <bpel:assign bpmn:label="Task" bpmn:id="_6_3QwOu1EdyUWbG-WWtMzg">
+ <bpel:copy>
+ <bpel:from
xmlns:xdt="http://www.w3.org/2003/11/xpath-datatypes">xdt:dayTimeDuration
("PT2S")</bpel:from>
+ <bpel:to>$thisTaskRequestMsg.body/tns:duration</bpel:to>
+ </bpel:copy>
+ </bpel:assign>
+ <bpel:wait>
+ <bpel:for>$thisTaskRequestMsg.body/tns:duration</bpel:for>
+ </bpel:wait>
+ <bpel:reply partnerLink="pool0AndPoolPlkVar" portType="this:ForPool0"
operation="Task" variable="thisTaskResponseMsg"/>
+ </bpel:sequence>
+</bpel:process>
\ No newline at end of file
Added:
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/BugCastDayTimeDurationToDuration-Pool.deploy
URL:
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/BugCastDayTimeDurationToDuration-Pool.deploy?rev=634439&view=auto
==============================================================================
---
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/BugCastDayTimeDurationToDuration-Pool.deploy
(added)
+++
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/BugCastDayTimeDurationToDuration-Pool.deploy
Thu Mar 6 14:54:27 2008
@@ -0,0 +1,8 @@
+<?xml version='1.0' encoding='utf-8'?>
+<dd:process xmlns:dd="http://ode.fivesight.com/schemas/2006/06/27/dd"
xmlns:tns="http://www.example.org/duration"
xmlns:diag="http://example.com/BugCastDayTimeDurationToDuration"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:this="http://example.com/BugCastDayTimeDurationToDuration/Pool"
xmlns:Pool0="http://example.com/BugCastDayTimeDurationToDuration/Pool0"
name="this:Pool" fileName="BugCastDayTimeDurationToDuration-Pool.bpel">
+ <dd:property name="PATH">BugCastDayTimeDurationToDuration</dd:property>
+ <dd:property name="SVG">BugCastDayTimeDurationToDuration.svg</dd:property>
+ <dd:provide partnerLink="pool0AndPoolPlkVar">
+ <dd:service name="this:CanonicServiceForPool0" port="canonicPort"/>
+ </dd:provide>
+</dd:process>
\ No newline at end of file
Added:
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/BugCastDayTimeDurationToDuration-Pool.wsdl
URL:
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/BugCastDayTimeDurationToDuration-Pool.wsdl?rev=634439&view=auto
==============================================================================
---
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/BugCastDayTimeDurationToDuration-Pool.wsdl
(added)
+++
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/BugCastDayTimeDurationToDuration-Pool.wsdl
Thu Mar 6 14:54:27 2008
@@ -0,0 +1,39 @@
+<?xml version='1.0' encoding='utf-8'?>
+<wsdl:definitions xmlns:tns="http://www.example.org/duration"
xmlns:diag="http://example.com/BugCastDayTimeDurationToDuration"
xmlns:bpel="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
xmlns:pnlk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:this="http://example.com/BugCastDayTimeDurationToDuration/Pool"
xmlns:Pool0="http://example.com/BugCastDayTimeDurationToDuration/Pool0"
targetNamespace="http://example.com/BugCastDayTimeDurationToDuration/Pool">
+ <wsdl:types>
+ <xs:schema elementFormDefault="qualified"
targetNamespace="http://example.com/BugCastDayTimeDurationToDuration/Pool">
+ <xs:import namespace="http://www.example.org/duration"
schemaLocation="duration.xsd"/>
+ <xs:element name="TaskRequest" type="tns:Complext"/>
+ <xs:element name="TaskResponse" type="xs:string"/>
+ </xs:schema>
+ </wsdl:types>
+ <wsdl:message name="TaskRequest">
+ <wsdl:part name="body" element="this:TaskRequest"/>
+ </wsdl:message>
+ <wsdl:message name="TaskResponse">
+ <wsdl:part name="body" element="this:TaskResponse"/>
+ </wsdl:message>
+ <wsdl:portType name="ForPool0">
+ <wsdl:operation name="Task">
+ <wsdl:input message="this:TaskRequest" name="Task"/>
+ <wsdl:output message="this:TaskResponse" name="TaskResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="CanonicBindingForPool0" type="this:ForPool0">
+ <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="Task">
+ <soap:operation style="document"
soapAction="http://example.com/BugCastDayTimeDurationToDuration/Pool/ForPool0/Task"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="CanonicServiceForPool0">
+ <wsdl:port name="canonicPort" binding="this:CanonicBindingForPool0">
+ <soap:address
location="http://localhost:8080/ode/processes/BugcastDayTimeDurationToDuration/BugCastDayTimeDurationToDuration/Pool/Pool0"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file
Added:
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/BugCastDayTimeDurationToDuration.wsdl
URL:
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/BugCastDayTimeDurationToDuration.wsdl?rev=634439&view=auto
==============================================================================
---
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/BugCastDayTimeDurationToDuration.wsdl
(added)
+++
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/BugCastDayTimeDurationToDuration.wsdl
Thu Mar 6 14:54:27 2008
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<wsdl:definitions xmlns:tns="http://www.example.org/duration"
xmlns:bpdm="http://www.intalio/designer/business-process-data-modeling"
xmlns:Pool="http://example.com/BugCastDayTimeDurationToDuration/Pool"
xmlns:diag="http://example.com/BugCastDayTimeDurationToDuration"
xmlns:bpel="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
xmlns:pnlk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:Pool0="http://example.com/BugCastDayTimeDurationToDuration/Pool0"
targetNamespace="http://example.com/BugCastDayTimeDurationToDuration">
+ <wsdl:import
namespace="http://example.com/BugCastDayTimeDurationToDuration/Pool"
location="BugCastDayTimeDurationToDuration-Pool.wsdl"/>
+ <pnlk:partnerLinkType name="Pool0AndPool">
+ <pnlk:role name="Pool_for_Pool0" portType="Pool:ForPool0"/>
+ </pnlk:partnerLinkType>
+</wsdl:definitions>
\ No newline at end of file
Added:
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/deploy.xml
URL:
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/deploy.xml?rev=634439&view=auto
==============================================================================
---
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/deploy.xml
(added)
+++
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/deploy.xml
Thu Mar 6 14:54:27 2008
@@ -0,0 +1,8 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<dd:deploy
xmlns:dd="http://ode.fivesight.com/schemas/2006/06/27/dd"><dd:process
xmlns:dd="http://ode.fivesight.com/schemas/2006/06/27/dd"
xmlns:tns="http://www.example.org/duration"
xmlns:diag="http://example.com/BugCastDayTimeDurationToDuration"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:this="http://example.com/BugCastDayTimeDurationToDuration/Pool"
xmlns:Pool0="http://example.com/BugCastDayTimeDurationToDuration/Pool0"
name="this:Pool" fileName="BugCastDayTimeDurationToDuration-Pool.bpel">
+ <dd:property name="PATH">BugCastDayTimeDurationToDuration</dd:property>
+ <dd:property name="SVG">BugCastDayTimeDurationToDuration.svg</dd:property>
+ <dd:provide partnerLink="pool0AndPoolPlkVar">
+ <dd:service name="this:CanonicServiceForPool0" port="canonicPort" />
+ </dd:provide>
+</dd:process></dd:deploy>
\ No newline at end of file
Added:
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/duration.xsd
URL:
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/duration.xsd?rev=634439&view=auto
==============================================================================
---
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/duration.xsd
(added)
+++
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/duration.xsd
Thu Mar 6 14:54:27 2008
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.example.org/duration"
+ xmlns:tns="http://www.example.org/duration"
elementFormDefault="qualified">
+
+ <complexType name="Complext">
+ <sequence>
+ <element name="duration" type="duration"></element>
+ </sequence>
+ </complexType>
+</schema>
\ No newline at end of file
Added:
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/test.properties
URL:
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/test.properties?rev=634439&view=auto
==============================================================================
---
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/test.properties
(added)
+++
ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestDuration/test.properties
Thu Mar 6 14:54:27 2008
@@ -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://example.com/BugCastDayTimeDurationToDuration/Pool
+service=CanonicServiceForPool0
+operation=Task
+request1=<message><body><ns1:TaskRequest
xmlns:ns1="http://example.com/BugCastDayTimeDurationToDuration/Pool"><ns2:duration
xmlns:ns2="http://www.example.org/duration">PT1S</ns2:duration></ns1:TaskRequest></body></message>
+response1=.*OK.*
\ No newline at end of file