Repository: ode
Updated Branches:
  refs/heads/master 93c915501 -> 0a73a9e24


http://git-wip-us.apache.org/repos/asf/ode/blob/28503b88/bpel-test/src/test/java/org/apache/ode/test/ExtensibilityTest.java
----------------------------------------------------------------------
diff --git a/bpel-test/src/test/java/org/apache/ode/test/ExtensibilityTest.java 
b/bpel-test/src/test/java/org/apache/ode/test/ExtensibilityTest.java
new file mode 100644
index 0000000..5fc5e97
--- /dev/null
+++ b/bpel-test/src/test/java/org/apache/ode/test/ExtensibilityTest.java
@@ -0,0 +1,146 @@
+/*
+ * 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.
+ */
+package org.apache.ode.test;
+
+import org.apache.ode.bpel.common.FaultException;
+import org.apache.ode.bpel.compiler.api.CompilationException;
+import org.apache.ode.bpel.eapi.AbstractExtensionBundle;
+import org.apache.ode.bpel.eapi.ExtensionContext;
+import org.apache.ode.bpel.eapi.ExtensionOperation;
+import org.apache.ode.bpel.iapi.ContextException;
+import org.apache.ode.utils.DOMUtils;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.w3c.dom.Element;
+
+/**
+ * Test ODE's extensibility
+ * @author Tammo van Lessen (University of Stuttgart)
+ */
+public class ExtensibilityTest extends BPELTestAbstract {
+    
+    private TestExtensionBundle teb;
+    
+    @Before
+    public void setUp() throws Exception {
+        super.setUp();
+        teb = new TestExtensionBundle();
+        //BasicConfigurator.configure();
+    }
+    
+    @Test public void testExtensionActivityWOMustUnderstandWOBundle() throws 
Throwable {
+        go("/bpel/2.0/TestExtensionActivity");
+    }
+
+    @Test public void testExtensionActivityWithMustUnderstandWOBundle() throws 
Throwable {
+        Deployment deployment = new 
Deployment(makeDeployDir("/bpel/2.0/TestExtensionActivityMustUnderstand"));
+        deployment.expectedException = ContextException.class;
+        doDeployment(deployment);
+    }
+
+    @Test public void testExtensionActivityWOMustUnderstandWithBundle() throws 
Throwable {
+        _server.registerExtensionBundle(teb);
+        Assert.assertFalse(teb.wasExecuted());
+        go("/bpel/2.0/TestExtensionActivity");
+        Assert.assertTrue(teb.wasExecuted());
+        _server.unregisterExtensionBundle(teb.getNamespaceURI());
+        teb.recycle();
+    }
+    
+    @Test public void testExtensionActivityWithMustUnderstandWithBundle() 
throws Throwable {
+        _server.registerExtensionBundle(teb);
+        Assert.assertFalse(teb.wasExecuted());
+        go("/bpel/2.0/TestExtensionActivityMustUnderstand");
+        Assert.assertTrue("ExtensionActivity has not been executed", 
teb.wasExecuted());
+        _server.unregisterExtensionBundle(teb.getNamespaceURI());
+        teb.recycle();
+    }
+
+    @Test public void testExtensionAssignOperation() throws Throwable {
+        _server.registerExtensionBundle(teb);
+        go("/bpel/2.0/TestExtensionAssignOperation");
+        _server.unregisterExtensionBundle(teb.getNamespaceURI());
+        teb.recycle();
+    }
+
+    @Test public void testExtensionActivityCompilerError() throws Throwable {
+        _server.registerExtensionBundle(teb);
+        TestExtensionBundle.cmpString = "error";
+        go("/bpel/2.0/TestExtensionActivity");
+        Deployment deployment = new 
Deployment(makeDeployDir("/bpel/2.0/TestExtensionActivityMustUnderstand"));
+        deployment.expectedException = CompilationException.class;
+        doDeployment(deployment);
+        _server.unregisterExtensionBundle(teb.getNamespaceURI());
+        teb.recycle();
+    }
+    
+    private static class TestExtensionBundle extends AbstractExtensionBundle {
+        private static boolean wasExecuted = false;
+        private static String cmpString = "test";
+        
+        public String getNamespaceURI() {
+            return "urn:ode:test-extension-bundle";
+        }
+
+        public void registerExtensionActivities() {
+            registerExtensionOperation("doIt", TestExtensionActivity.class);
+            registerExtensionOperation("doAssign", 
TestExtensionAssignOperation.class);
+        }
+        
+        public boolean wasExecuted() {
+            return wasExecuted;
+        }
+        
+        public void recycle() {
+            wasExecuted = false;
+            cmpString = "test";
+        }
+    }
+
+    public static class TestExtensionActivity implements ExtensionOperation {
+        private static final long serialVersionUID = 1L;
+
+        public void run(ExtensionContext context,
+                Element element) throws FaultException {
+            TestExtensionBundle.wasExecuted = true;
+            context.complete();
+        }
+    }
+    
+    public static class TestExtensionAssignOperation implements 
ExtensionOperation {
+        private static final long serialVersionUID = 1L;
+
+        public void run(ExtensionContext context, Element element)
+                throws FaultException {
+            //Node val = context.readVariable("myVar");
+            StringBuffer sb = new StringBuffer("<?xml version=\"1.0\" 
encoding=\"UTF-8\"?>\n");
+            sb.append("<message><TestPart>Small</TestPart></message>");
+            try {
+                context.writeVariable("tmpVar", 
DOMUtils.stringToDOM(sb.toString()));
+            } catch (Exception e) {
+                e.printStackTrace();
+                Assert.fail();
+            } finally {
+                context.complete();
+            }
+        }
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ode/blob/28503b88/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/ExtensionActivity.bpel
----------------------------------------------------------------------
diff --git 
a/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/ExtensionActivity.bpel
 
b/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/ExtensionActivity.bpel
new file mode 100644
index 0000000..5fec847
--- /dev/null
+++ 
b/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/ExtensionActivity.bpel
@@ -0,0 +1,82 @@
+<!--
+  ~ 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="ExtensionActivity"
+    targetNamespace="http://ode/bpel/unit-test"; 
+    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:ext="urn:ode:test-extension-bundle">
+
+  <import location="ExtensionActivity.wsdl"
+     namespace="http://ode/bpel/unit-test.wsdl";
+     importType="http://schemas.xmlsoap.org/wsdl/"; />
+
+   <partnerLinks>
+      <partnerLink name="helloPartnerLink" 
+         partnerLinkType="test:HelloPartnerLinkType" 
+         myRole="me" />
+   </partnerLinks>
+
+   <extensions>
+      <extension namespace="urn:ode:test-extension-bundle" 
mustUnderstand="no"/>
+   </extensions>
+
+   <variables>
+     <variable name="myVar" messageType="test:HelloMessage"/>
+     <variable name="tmpVar" type="xsd:string"/>
+   </variables>
+        
+   <sequence>   
+       <receive 
+          name="start"
+          partnerLink="helloPartnerLink"
+          portType="test:HelloPortType"
+          operation="hello"
+          variable="myVar"
+          createInstance="yes"/>
+
+      <assign name="assign1">
+         <copy>
+            <from variable="myVar" part="TestPart"/>
+            <to variable="tmpVar"/>
+         </copy>
+         <copy>
+             <from>concat($tmpVar,' World')"</from>
+             <to variable="myVar" part="TestPart"/>
+         </copy>
+      </assign>
+         <flow>
+
+      <extensionActivity>
+       <ext:doIt/>
+      </extensionActivity>
+
+      <extensionActivity>
+       <ext:doIt2>test</ext:doIt2>
+      </extensionActivity>
+
+         </flow>
+       <reply name="end"  
+              partnerLink="helloPartnerLink"
+              portType="test:HelloPortType" 
+              operation="hello"
+              variable="myVar"/>
+   </sequence>
+</process>

http://git-wip-us.apache.org/repos/asf/ode/blob/28503b88/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/ExtensionActivity.wsdl
----------------------------------------------------------------------
diff --git 
a/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/ExtensionActivity.wsdl
 
b/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/ExtensionActivity.wsdl
new file mode 100644
index 0000000..b54f59d
--- /dev/null
+++ 
b/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/ExtensionActivity.wsdl
@@ -0,0 +1,67 @@
+<?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:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype";>
+    
+    <wsdl:message name="HelloMessage">
+        <wsdl:part name="TestPart" type="xsd:string"/>
+    </wsdl:message>
+    
+    <wsdl:portType name="HelloPortType">
+        <wsdl:operation name="hello">
+            <wsdl:input message="tns:HelloMessage" name="TestIn"/>
+            <wsdl:output message="tns:HelloMessage" name="TestOut"/>
+        </wsdl:operation>    
+    </wsdl:portType>
+    
+     <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType">
+        <soap:binding style="rpc" 
transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="hello">
+            <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="HelloService">
+               <wsdl:port name="HelloPort" binding="tns:HelloSoapBinding">
+               <soap:address 
location="http://localhost:8080/ode/processes/helloWorld"/>
+               </wsdl:port>
+    </wsdl:service>
+    
+   <plnk:partnerLinkType name="HelloPartnerLinkType">
+       <plnk:role name="me" portType="tns:HelloPortType"/>
+       <plnk:role name="you" portType="tns:HelloPortType"/>
+   </plnk:partnerLinkType>
+</wsdl:definitions>
+

http://git-wip-us.apache.org/repos/asf/ode/blob/28503b88/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/deploy.xml
----------------------------------------------------------------------
diff --git 
a/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/deploy.xml 
b/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/deploy.xml
new file mode 100644
index 0000000..0d8dce0
--- /dev/null
+++ b/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/deploy.xml
@@ -0,0 +1,12 @@
+<deploy xmlns="http://ode.fivesight.com/schemas/2006/06/27/dd"; 
+       xmlns:pns="http://ode/bpel/unit-test"; 
+       xmlns:wns="http://ode/bpel/unit-test.wsdl";>
+
+
+       <process name="pns:ExtensionActivity">
+               <active>true</active>
+               <provide partnerLink="helloPartnerLink">
+                       <service name="wns:HelloService" port="HelloPort"/>
+               </provide>
+       </process>
+</deploy>

http://git-wip-us.apache.org/repos/asf/ode/blob/28503b88/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/test.properties
----------------------------------------------------------------------
diff --git 
a/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/test.properties 
b/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/test.properties
new file mode 100644
index 0000000..a3fc416
--- /dev/null
+++ 
b/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivity/test.properties
@@ -0,0 +1,6 @@
+namespace=http://ode/bpel/unit-test.wsdl
+service=HelloService
+operation=hello
+request1=<message><TestPart>Hello</TestPart></message>
+response1=.*Hello World.*
+

http://git-wip-us.apache.org/repos/asf/ode/blob/28503b88/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/ExtensionActivity.bpel
----------------------------------------------------------------------
diff --git 
a/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/ExtensionActivity.bpel
 
b/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/ExtensionActivity.bpel
new file mode 100644
index 0000000..9998b87
--- /dev/null
+++ 
b/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/ExtensionActivity.bpel
@@ -0,0 +1,75 @@
+<!--
+  ~ 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="ExtensionActivityMustUnderstand"
+    targetNamespace="http://ode/bpel/unit-test"; 
+       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:ext="urn:ode:test-extension-bundle">
+
+  <import location="ExtensionActivity.wsdl"
+     namespace="http://ode/bpel/unit-test.wsdl";
+     importType="http://schemas.xmlsoap.org/wsdl/"; />
+
+   <partnerLinks>
+      <partnerLink name="helloPartnerLink" 
+         partnerLinkType="test:HelloPartnerLinkType" 
+         myRole="me" />
+   </partnerLinks>
+
+   <extensions>
+      <extension namespace="urn:ode:test-extension-bundle" 
mustUnderstand="yes"/>
+   </extensions>
+
+   <variables>
+     <variable name="myVar" messageType="test:HelloMessage"/>
+     <variable name="tmpVar" type="xsd:string"/>
+   </variables>
+        
+   <sequence>   
+       <receive 
+          name="start"
+          partnerLink="helloPartnerLink"
+          portType="test:HelloPortType"
+          operation="hello"
+          variable="myVar"
+          createInstance="yes"/>
+
+      <assign name="assign1">
+         <copy>
+            <from variable="myVar" part="TestPart"/>
+            <to variable="tmpVar"/>
+         </copy>
+         <copy>
+             <from>concat($tmpVar,' World')"</from>
+             <to variable="myVar" part="TestPart"/>
+         </copy>
+      </assign>
+      <extensionActivity>
+       <ext:doIt/>
+      </extensionActivity>
+       <reply name="end"  
+              partnerLink="helloPartnerLink"
+              portType="test:HelloPortType" 
+              operation="hello"
+              variable="myVar"/>
+   </sequence>
+</process>

http://git-wip-us.apache.org/repos/asf/ode/blob/28503b88/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/ExtensionActivity.wsdl
----------------------------------------------------------------------
diff --git 
a/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/ExtensionActivity.wsdl
 
b/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/ExtensionActivity.wsdl
new file mode 100644
index 0000000..47ecbe4
--- /dev/null
+++ 
b/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/ExtensionActivity.wsdl
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8" ?>
+
+<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:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype";>
+    
+    <wsdl:message name="HelloMessage">
+        <wsdl:part name="TestPart" type="xsd:string"/>
+    </wsdl:message>
+    
+    <wsdl:portType name="HelloPortType">
+        <wsdl:operation name="hello">
+            <wsdl:input message="tns:HelloMessage" name="TestIn"/>
+            <wsdl:output message="tns:HelloMessage" name="TestOut"/>
+        </wsdl:operation>    
+    </wsdl:portType>
+    
+     <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType">
+        <soap:binding style="rpc" 
transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="hello">
+            <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="HelloService">
+               <wsdl:port name="HelloPort" binding="tns:HelloSoapBinding">
+               <soap:address 
location="http://localhost:8080/ode/processes/helloWorld"/>
+               </wsdl:port>
+    </wsdl:service>
+    
+   <plnk:partnerLinkType name="HelloPartnerLinkType">
+       <plnk:role name="me" portType="tns:HelloPortType"/>
+       <plnk:role name="you" portType="tns:HelloPortType"/>
+   </plnk:partnerLinkType>
+</wsdl:definitions>
+

http://git-wip-us.apache.org/repos/asf/ode/blob/28503b88/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/deploy.xml
----------------------------------------------------------------------
diff --git 
a/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/deploy.xml
 
b/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/deploy.xml
new file mode 100644
index 0000000..17065ee
--- /dev/null
+++ 
b/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/deploy.xml
@@ -0,0 +1,12 @@
+<deploy xmlns="http://ode.fivesight.com/schemas/2006/06/27/dd"; 
+       xmlns:pns="http://ode/bpel/unit-test"; 
+       xmlns:wns="http://ode/bpel/unit-test.wsdl";>
+
+
+       <process name="pns:ExtensionActivityMustUnderstand">
+               <active>true</active>
+               <provide partnerLink="helloPartnerLink">
+                       <service name="wns:HelloService" port="HelloPort"/>
+               </provide>
+       </process>
+</deploy>

http://git-wip-us.apache.org/repos/asf/ode/blob/28503b88/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/test.properties
----------------------------------------------------------------------
diff --git 
a/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/test.properties
 
b/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/test.properties
new file mode 100644
index 0000000..a3fc416
--- /dev/null
+++ 
b/bpel-test/src/test/resources/bpel/2.0/TestExtensionActivityMustUnderstand/test.properties
@@ -0,0 +1,6 @@
+namespace=http://ode/bpel/unit-test.wsdl
+service=HelloService
+operation=hello
+request1=<message><TestPart>Hello</TestPart></message>
+response1=.*Hello World.*
+

http://git-wip-us.apache.org/repos/asf/ode/blob/28503b88/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/ExtensionAssign.bpel
----------------------------------------------------------------------
diff --git 
a/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/ExtensionAssign.bpel
 
b/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/ExtensionAssign.bpel
new file mode 100644
index 0000000..a3624ba
--- /dev/null
+++ 
b/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/ExtensionAssign.bpel
@@ -0,0 +1,56 @@
+<process name="ExtensionAssign"
+    targetNamespace="http://ode/bpel/unit-test"; 
+    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:ext="urn:ode:test-extension-bundle">
+
+  <import location="ExtensionAssign.wsdl"
+     namespace="http://ode/bpel/unit-test.wsdl";
+     importType="http://schemas.xmlsoap.org/wsdl/"; />
+
+   <partnerLinks>
+      <partnerLink name="helloPartnerLink" 
+         partnerLinkType="test:HelloPartnerLinkType" 
+         myRole="me" />
+   </partnerLinks>
+
+   <extensions>
+      <extension namespace="urn:ode:test-extension-bundle" 
mustUnderstand="yes"/>
+   </extensions>
+
+   <variables>
+     <variable name="myVar" messageType="test:HelloMessage"/>
+     <variable name="tmpVar" type="xsd:string"/>
+   </variables>
+        
+   <sequence>   
+       <receive 
+          name="start"
+          partnerLink="helloPartnerLink"
+          portType="test:HelloPortType"
+          operation="hello"
+          variable="myVar"
+          createInstance="yes"/>
+
+      <assign name="assign1">
+         <copy>
+            <from variable="myVar" part="TestPart"/>
+            <to variable="tmpVar"/>
+         </copy>
+                <extensionAssignOperation>
+               <ext:doAssign/> <!-- assigns 'Small' to tmpVar -->
+            </extensionAssignOperation>
+         <copy>
+             <from>concat($tmpVar,' World')"</from>
+             <to variable="myVar" part="TestPart"/>
+         </copy>
+      </assign>
+       <reply name="end"  
+              partnerLink="helloPartnerLink"
+              portType="test:HelloPortType" 
+              operation="hello"
+              variable="myVar"/>
+   </sequence>
+</process>

http://git-wip-us.apache.org/repos/asf/ode/blob/28503b88/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/ExtensionAssign.wsdl
----------------------------------------------------------------------
diff --git 
a/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/ExtensionAssign.wsdl
 
b/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/ExtensionAssign.wsdl
new file mode 100644
index 0000000..5c268b8
--- /dev/null
+++ 
b/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/ExtensionAssign.wsdl
@@ -0,0 +1,68 @@
+<?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:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype";>
+    
+    <wsdl:message name="HelloMessage">
+        <wsdl:part name="TestPart" type="xsd:string"/>
+    </wsdl:message>
+    
+    <wsdl:portType name="HelloPortType">
+        <wsdl:operation name="hello">
+            <wsdl:input message="tns:HelloMessage" name="TestIn"/>
+            <wsdl:output message="tns:HelloMessage" name="TestOut"/>
+        </wsdl:operation>    
+    </wsdl:portType>
+    
+     <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType">
+        <soap:binding style="rpc" 
transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="hello">
+            <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="HelloService">
+               <wsdl:port name="HelloPort" binding="tns:HelloSoapBinding">
+               <soap:address 
location="http://localhost:8080/ode/processes/helloWorld"/>
+               </wsdl:port>
+    </wsdl:service>
+    
+   <plnk:partnerLinkType name="HelloPartnerLinkType">
+       <plnk:role name="me" portType="tns:HelloPortType"/>
+       <plnk:role name="you" portType="tns:HelloPortType"/>
+   </plnk:partnerLinkType>
+</wsdl:definitions>
+

http://git-wip-us.apache.org/repos/asf/ode/blob/28503b88/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/deploy.xml
----------------------------------------------------------------------
diff --git 
a/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/deploy.xml 
b/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/deploy.xml
new file mode 100644
index 0000000..cf13758
--- /dev/null
+++ 
b/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/deploy.xml
@@ -0,0 +1,12 @@
+<deploy xmlns="http://ode.fivesight.com/schemas/2006/06/27/dd"; 
+       xmlns:pns="http://ode/bpel/unit-test"; 
+       xmlns:wns="http://ode/bpel/unit-test.wsdl";>
+
+
+       <process name="pns:ExtensionAssign">
+               <active>true</active>
+               <provide partnerLink="helloPartnerLink">
+                       <service name="wns:HelloService" port="HelloPort"/>
+               </provide>
+       </process>
+</deploy>

http://git-wip-us.apache.org/repos/asf/ode/blob/28503b88/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/test.properties
----------------------------------------------------------------------
diff --git 
a/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/test.properties
 
b/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/test.properties
new file mode 100644
index 0000000..9dea7eb
--- /dev/null
+++ 
b/bpel-test/src/test/resources/bpel/2.0/TestExtensionAssignOperation/test.properties
@@ -0,0 +1,6 @@
+namespace=http://ode/bpel/unit-test.wsdl
+service=HelloService
+operation=hello
+request1=<message><TestPart>Hello</TestPart></message>
+response1=.*Small World.*
+

Reply via email to