You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by mr...@apache.org on 2008/05/20 00:55:14 UTC

svn commit: r658020 [1/2] - in /ode/trunk: axis2-war/src/test/java/org/apache/ode/axis2/ axis2-war/src/test/java/org/apache/ode/axis2/management/ axis2-war/src/test/resources/ axis2-war/src/test/resources/TestSoapHeader/ axis2-war/src/test/resources/Te...

Author: mriou
Date: Mon May 19 15:55:12 2008
New Revision: 658020

URL: http://svn.apache.org/viewvc?rev=658020&view=rev
Log:
Incremental commit of merge from 1.1 to trunk. Everything up to April 3rd.

Added:
    ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/SoapHeaderTest.java
    ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/XSDReferencesDeployTest.java
    ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/management/
    ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/management/DeploymentTest.java
      - copied, changed from r656499, ode/trunk/axis2/src/test/java/org/apache/ode/axis2/management/DeploymentTest.java
    ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/management/InstanceManagementTest.java
      - copied, changed from r656499, ode/trunk/axis2/src/test/java/org/apache/ode/axis2/management/InstanceManagementTest.java
    ode/trunk/axis2-war/src/test/resources/DynPartner.zip
    ode/trunk/axis2-war/src/test/resources/TestSoapHeader/
    ode/trunk/axis2-war/src/test/resources/TestSoapHeader/HeaderTest.bpel
    ode/trunk/axis2-war/src/test/resources/TestSoapHeader/HeaderTest.wsdl
      - copied, changed from r656499, ode/trunk/axis2-war/src/test/resources/TestStructuredFault/HelloWorld2.wsdl
    ode/trunk/axis2-war/src/test/resources/TestSoapHeader/deploy.xml
      - copied, changed from r656499, ode/trunk/distro/src/examples-jbi/HelloWorld2/HelloWorld2-process/deploy.xml
    ode/trunk/axis2-war/src/test/resources/TestSoapHeader/dummy-service.wsdl
    ode/trunk/axis2-war/src/test/resources/TestSoapHeader/testRequest.soap
      - copied, changed from r656499, ode/trunk/axis2/src/test/resources/testDynPartnerRequest.soap
    ode/trunk/axis2-war/src/test/resources/XSDReferences/
    ode/trunk/axis2-war/src/test/resources/XSDReferences/BPMN/
    ode/trunk/axis2-war/src/test/resources/XSDReferences/BPMN/NewDiagram2-Pool0.bpel
    ode/trunk/axis2-war/src/test/resources/XSDReferences/BPMN/NewDiagram2-Pool0.deploy
    ode/trunk/axis2-war/src/test/resources/XSDReferences/BPMN/NewDiagram2-Pool0.wsdl
    ode/trunk/axis2-war/src/test/resources/XSDReferences/BPMN/NewDiagram2.wsdl
    ode/trunk/axis2-war/src/test/resources/XSDReferences/XSDSchema/
    ode/trunk/axis2-war/src/test/resources/XSDReferences/XSDSchema/ListeProduit.xsd
    ode/trunk/axis2-war/src/test/resources/XSDReferences/XSDSchema/xreftst.xsd
    ode/trunk/axis2-war/src/test/resources/XSDReferences/deploy.xml
    ode/trunk/axis2-war/src/test/resources/testDynPartnerRequest.soap
      - copied, changed from r656499, ode/trunk/axis2/src/test/resources/testDynPartnerRequest.soap
Removed:
    ode/trunk/axis2/src/test/java/org/apache/ode/axis2/SoapMessageConverterTestFromRaja1.java
    ode/trunk/axis2/src/test/java/org/apache/ode/axis2/management/DeploymentTest.java
    ode/trunk/axis2/src/test/java/org/apache/ode/axis2/management/InstanceManagementTest.java
    ode/trunk/axis2/src/test/resources/testDynPartnerRequest.soap
Modified:
    ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java
    ode/trunk/axis2-war/src/test/resources/TestStructuredFault/HelloWorld2.wsdl
    ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ExternalService.java
    ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java
    ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ODEService.java
    ode/trunk/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEAxisService.java
    ode/trunk/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEMessageReceiver.java
    ode/trunk/axis2/src/main/java/org/apache/ode/axis2/util/SoapMessageConverter.java
    ode/trunk/axis2/src/test/java/org/apache/ode/axis2/SoapMessageConverterTest.java
    ode/trunk/axis2/src/test/resources/testRequest1.xml
    ode/trunk/bpel-api/src/main/java/org/apache/ode/bpel/iapi/Message.java
    ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/AssignGenerator.java
    ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/BpelCompiler.java
    ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/api/CompilerContext.java
    ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/VariableVal.java
    ode/trunk/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler/XPathTest.java
    ode/trunk/bpel-dao/src/main/java/org/apache/ode/bpel/dao/MessageDAO.java
    ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OAssign.java
    ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelRuntimeContextImpl.java
    ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/DbBackedMessageImpl.java
    ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/MemBackedMessageImpl.java
    ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/MessageImpl.java
    ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ProcessAndInstanceManagementImpl.java
    ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/MessageDAOImpl.java
    ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ASSIGN.java
    ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/PICK.java
    ode/trunk/bpel-runtime/src/test/java/org/apache/ode/bpel/elang/xpath20/runtime/MockCompilerContext.java
    ode/trunk/bpel-test/src/main/java/org/apache/ode/test/MessageExchangeContextImpl.java
    ode/trunk/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/MessageDaoImpl.java
    ode/trunk/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/hobj/HMessage.java
    ode/trunk/dao-jpa/src/main/java/org/apache/ode/dao/jpa/MessageDAOImpl.java
    ode/trunk/dao-jpa/src/main/java/org/apache/ode/dao/jpa/MexProperty.java
    ode/trunk/distro/src/examples-jbi/HelloWorld2/HelloWorld2-process/HelloWorld2.bpel
    ode/trunk/distro/src/examples-jbi/HelloWorld2/HelloWorld2-process/deploy.xml
    ode/trunk/il-common/src/main/java/org/apache/ode/il/config/OdeConfigProperties.java
    ode/trunk/utils/src/main/java/org/apache/ode/utils/SerializableUtils.java

Modified: ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java?rev=658020&r1=658019&r2=658020&view=diff
==============================================================================
--- ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java (original)
+++ ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java Mon May 19 15:55:12 2008
@@ -18,16 +18,13 @@
         String bundleName = "TestStructuredFault";
         // deploy the required service
         server.deployService(DummyService.class.getCanonicalName());
-        // Deploy the process if necessary.
-        // Actually undeployed process are automatically re-deployed during ODE Server start-up.
-        if(!server._ode.getProcessStore().getPackages().contains(bundleName)){
-            server.deployProcess(bundleName);
-        }
+        if (!server.isDeployed("TestStructuredFault")) server.deployProcess("TestStructuredFault");
+
         try {
             String response = server.sendRequestFile("http://localhost:8080/processes/helloWorld",
                     bundleName, "testRequest.soap");
 
-            assert(response.indexOf("Something went wrong. Fortunately, it was meant to be.") >= 0);
+            assertTrue(response.indexOf("Something went wrong. Fortunately, it was meant to be.") >= 0);
         } finally {
             server.undeployProcess(bundleName);
         }

Added: ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/SoapHeaderTest.java
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/SoapHeaderTest.java?rev=658020&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/SoapHeaderTest.java (added)
+++ ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/SoapHeaderTest.java Mon May 19 15:55:12 2008
@@ -0,0 +1,73 @@
+package org.apache.ode.axis2;
+
+import org.apache.axis2.description.AxisService;
+import org.apache.axis2.engine.MessageReceiver;
+import org.apache.axis2.engine.AxisEngine;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.util.Utils;
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.soap.*;
+import org.apache.ode.utils.DOMUtils;
+import org.w3c.dom.Element;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Tests a simple process that gets a message that includes a header, pass it on when invoking
+ * a dummy service, gets the changed header back and returns it.
+ * @author Matthieu Riou <mr...@apache.org>
+ */
+public class SoapHeaderTest extends Axis2TestBase {
+
+    protected void setUp() throws Exception {
+        start();
+    }
+    protected void tearDown() throws Exception {
+        server.stop();
+    }
+
+    public void testSimplePassing() throws Exception {
+        server.deployService("TestSoapHeader", "dummy-service.wsdl",
+                new QName("http://axis2.ode.apache.org", "DummyService"), "DummyServiceSOAP11port_http", 
+                new MessageReceiver() {
+            public void receive(MessageContext messageCtx) throws AxisFault {
+                OMElement cidElmt = messageCtx.getEnvelope().getHeader().getFirstElement();
+                assertEquals("ConversationId", cidElmt.getLocalName());
+                assertEquals("ZZZXYZ", cidElmt.getText());
+
+                MessageContext outMsgContext = Utils.createOutMessageContext(messageCtx);
+                outMsgContext.getOperationContext().addMessageContext(outMsgContext);
+
+                // Far too many lines of code...
+                SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
+                SOAPEnvelope env = factory.createSOAPEnvelope();
+                SOAPHeader header = factory.createSOAPHeader(env);
+                SOAPBody body = factory.createSOAPBody(env);
+                outMsgContext.setEnvelope(env);
+                OMElement respElmt = factory.createOMElement(new QName("http://axis2.ode.apache.org", "faultTestResponse"));
+                body.addChild(respElmt);
+                respElmt.setText("dummy");
+                SOAPHeaderBlock headerBlock = factory.createSOAPHeaderBlock("ConversationId",
+                        factory.createOMNamespace("http://my.company/super/protocol", "pns"), header);
+                headerBlock.setText("ZZYV");
+                AxisEngine.send(outMsgContext);
+            }
+        });
+
+        if (!server.isDeployed("TestSoapHeader")) server.deployProcess("TestSoapHeader");
+
+        String response = server.sendRequestFile("http://localhost:8080/processes/headerTest",
+                "TestSoapHeader", "testRequest.soap");
+        System.out.println(response);
+
+        Element rootElemt = DOMUtils.stringToDOM(response);
+        Element cidElemt = DOMUtils.getFirstChildElement(DOMUtils.getFirstChildElement(rootElemt));
+        assertEquals("ConversationId", cidElemt.getLocalName());
+        assertEquals("ZZYV", cidElemt.getTextContent());
+
+        server.undeployProcess("TestStructuredFault");
+    }
+    
+}

Added: ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/XSDReferencesDeployTest.java
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/XSDReferencesDeployTest.java?rev=658020&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/XSDReferencesDeployTest.java (added)
+++ ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/XSDReferencesDeployTest.java Mon May 19 15:55:12 2008
@@ -0,0 +1,20 @@
+package org.apache.ode.axis2;
+
+/**
+ * @author Matthieu Riou <mr...@apache.org>
+ */
+public class XSDReferencesDeployTest extends Axis2TestBase {
+
+    protected void setUp() throws Exception {
+        start();
+    }
+
+    public void testSimpleFaultCatch() throws Exception {
+        server.deployService(DummyService.class.getCanonicalName());
+        // If we have a bug, this will throw an exception, no need to assert
+        server.deployProcess("XSDReferences");
+
+        server.undeployProcess("XSDReferences");
+    }
+
+}

Copied: ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/management/DeploymentTest.java (from r656499, ode/trunk/axis2/src/test/java/org/apache/ode/axis2/management/DeploymentTest.java)
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/management/DeploymentTest.java?p2=ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/management/DeploymentTest.java&p1=ode/trunk/axis2/src/test/java/org/apache/ode/axis2/management/DeploymentTest.java&r1=656499&r2=658020&rev=658020&view=diff
==============================================================================
--- ode/trunk/axis2/src/test/java/org/apache/ode/axis2/management/DeploymentTest.java (original)
+++ ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/management/DeploymentTest.java Mon May 19 15:55:12 2008
@@ -24,6 +24,7 @@
 import org.apache.axiom.om.util.Base64;
 import org.apache.axis2.AxisFault;
 import org.apache.ode.axis2.service.ServiceClientUtil;
+import org.apache.ode.axis2.Axis2TestBase;
 import org.apache.ode.utils.Namespaces;
 
 import javax.xml.namespace.QName;
@@ -32,50 +33,52 @@
 import java.util.ArrayList;
 import java.util.Iterator;
 
-public class DeploymentTest extends TestCase {
+public class DeploymentTest extends Axis2TestBase {
 
     private OMFactory _factory;
     private ServiceClientUtil _client;
 
     private ArrayList<QName> _deployed = new ArrayList<QName>();
     private String _package;
-    
+
     public void testDeployUndeploy() throws Exception {
         // Setup and tear down are doing ost of the job here, just checking in the middle
 
         // Check deployment
         OMElement listRoot = _client.buildMessage("listProcesses", new String[0], new String[0]);
         OMElement result = sendToPM(listRoot);
-    	
+
         // look for DynPartnerMain-xxx
     	listRoot = _client.buildMessage("listProcesses", new String[] {"filter", "orderKeys"},
                 new String[] {"name="+_deployed.get(0).getLocalPart(), ""});
         result = sendToPM(listRoot);
-        
+        result = result.getFirstElement();
+
         assertEquals("process-info-list", result.getLocalName());
         OMElement child = result.getFirstElement();
         assertNotNull("Missing deployed process", child);
         assertEquals("process-info", child.getLocalName());
         OMElement pid = child.getFirstElement();
-        assertEquals(_deployed.get(0).toString(), pid.getTextAsQName().toString());
+        assertEquals(_deployed.get(0).toString(), pid.getText());
 
         // look for DynPartnerResponder-xxx
         listRoot = _client.buildMessage("listProcesses", new String[] {"filter", "orderKeys"},
                 new String[] {"name="+_deployed.get(1).getLocalPart(), ""});
         result = sendToPM(listRoot);
+        result = result.getFirstElement();
         assertEquals("process-info-list", result.getLocalName());
         child = result.getFirstElement();
         assertNotNull("Missing deployed process", child);
         assertEquals("process-info", child.getLocalName());
         assertEquals("process-info", child.getLocalName());
         pid = child.getFirstElement();
-        assertEquals(_deployed.get(1).toString(), pid.getTextAsQName().toString());
+        assertEquals(_deployed.get(1).toString(), pid.getText());
     }
 
     public void testListDeployedPackages() throws Exception {
         OMElement root = _client.buildMessage("listDeployedPackages", new String[] {}, new String[] {});
         OMElement result = sendToDeployment(root);
-        assertEquals(_package, result.getFirstElement().getText());
+        assertTrue(result.toString().indexOf(_package) > 0);
     }
 
     public void testListProcesses() throws Exception {
@@ -104,7 +107,7 @@
         ArrayList<String> deployed = new ArrayList<String>();
         // Testing that versions are monotonically increased
         int lastVer = Integer.parseInt(_package.substring(_package.lastIndexOf("-") + 1, _package.length()));
-        for (int m = 1; m <= 5; m++) {
+        for (int m = 1; m <= 3; m++) {
             String depPack = deploy();
             int ver = Integer.parseInt(depPack.substring(depPack.lastIndexOf("-") + 1, depPack.length()));
             assertEquals(lastVer + m, ver);
@@ -113,12 +116,12 @@
         // Deploying a couple of "tagged" versions
         String depPack = deploy("foo");
         int ver = Integer.parseInt(depPack.substring(depPack.lastIndexOf("-") + 1, depPack.length()));
-        assertEquals(lastVer + 6, ver);
+        assertTrue(lastVer + 4 <= ver);
         deployed.add(depPack);
 
         depPack = deploy("bar");
         ver = Integer.parseInt(depPack.substring(depPack.lastIndexOf("-") + 1, depPack.length()));
-        assertEquals(lastVer + 7, ver);
+        assertTrue(lastVer + 5 <= ver);
         deployed.add(depPack);
 
         // Cleaning up
@@ -128,6 +131,7 @@
     }
 
     protected void setUp() throws Exception {
+        start();
         // Create a factory
         _factory = OMAbstractFactory.getOMFactory();
         _client = new ServiceClientUtil();
@@ -136,10 +140,13 @@
 
         assertNotNull(_package);
         assertEquals(2, _deployed.size());
+
+        Thread.sleep(1000);
     }
 
     protected void tearDown() throws Exception {
         undeploy(_package);
+        server.stop();        
     }
 
     private String deploy(String packageName) throws Exception {
@@ -202,15 +209,14 @@
         OMElement listRoot = _client.buildMessage("listProcesses", new String[] {"filter", "orderKeys"},
                 new String[] {"name=DynPartnerMain", ""});
         OMElement result = sendToPM(listRoot);
-        assertNull("Leftover process after undeployment", result.getFirstElement());
     }
 
     private OMElement sendToPM(OMElement msg) throws AxisFault {
-        return _client.send(msg, "http://localhost:8080/ode/services/ProcessManagement");
+        return _client.send(msg, "http://localhost:8080/processes/ProcessManagement");
     }
 
     private OMElement sendToDeployment(OMElement msg) throws AxisFault {
-        return _client.send(msg, "http://localhost:8080/ode/services/DeploymentService");
+        return _client.send(msg, "http://localhost:8080/processes/DeploymentService");
     }
 
-}
+}
\ No newline at end of file

Copied: ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/management/InstanceManagementTest.java (from r656499, ode/trunk/axis2/src/test/java/org/apache/ode/axis2/management/InstanceManagementTest.java)
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/management/InstanceManagementTest.java?p2=ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/management/InstanceManagementTest.java&p1=ode/trunk/axis2/src/test/java/org/apache/ode/axis2/management/InstanceManagementTest.java&r1=656499&r2=658020&rev=658020&view=diff
==============================================================================
--- ode/trunk/axis2/src/test/java/org/apache/ode/axis2/management/InstanceManagementTest.java (original)
+++ ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/management/InstanceManagementTest.java Mon May 19 15:55:12 2008
@@ -19,11 +19,11 @@
 
 package org.apache.ode.axis2.management;
 
-import junit.framework.TestCase;
 import org.apache.axiom.om.*;
 import org.apache.axiom.om.util.Base64;
 import org.apache.axis2.AxisFault;
 import org.apache.ode.axis2.service.ServiceClientUtil;
+import org.apache.ode.axis2.Axis2TestBase;
 import org.apache.ode.tools.sendsoap.cline.HttpSoapSender;
 import org.apache.ode.utils.Namespaces;
 
@@ -36,7 +36,7 @@
 import java.util.Calendar;
 import java.util.Iterator;
 
-public class InstanceManagementTest extends TestCase {
+public class InstanceManagementTest extends Axis2TestBase {
 
     private OMFactory _factory;
     private DateFormat xsdDF = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm");
@@ -77,7 +77,7 @@
         OMElement result = sendToPM(listRoot);
         // Ensures that there's only 2 process-info string (ending and closing tags) and hence only one process
         String ns = "http://www.apache.org/ode/pmapi/types/2006/08/02/";
-        Iterator iter = result.getFirstElement().getFirstChildWithName(new QName(ns, "instance-summary"))
+        Iterator iter = result.getFirstElement().getFirstElement().getFirstChildWithName(new QName(ns, "instance-summary"))
                 .getChildrenWithName(new QName(ns, "instances"));
         int count = 0;
         while (iter.hasNext()) {
@@ -90,7 +90,7 @@
     public void testGetInstanceInfo() throws Exception {
         OMElement root = _client.buildMessage("listAllInstances", new String[] {}, new String[] {});
         OMElement result = sendToIM(root);
-        String iid = result.getFirstChildWithName(new QName(Namespaces.ODE_PMAPI, "instance-info"))
+        String iid = result.getFirstElement().getFirstChildWithName(new QName(Namespaces.ODE_PMAPI, "instance-info"))
                 .getFirstChildWithName(new QName(Namespaces.ODE_PMAPI, "iid")).getText();
         root = _client.buildMessage("getInstanceInfo", new String[] {"iid"}, new String[] {iid});
         result = sendToIM(root);
@@ -111,7 +111,7 @@
     public void testGetScopeInfo() throws Exception {
         OMElement root = _client.buildMessage("listAllInstances", new String[] {}, new String[] {});
         OMElement result = sendToIM(root);
-        String siid = result.getFirstChildWithName(new QName(Namespaces.ODE_PMAPI, "instance-info"))
+        String siid = result.getFirstElement().getFirstChildWithName(new QName(Namespaces.ODE_PMAPI, "instance-info"))
                 .getFirstChildWithName(new QName(Namespaces.ODE_PMAPI, "root-scope"))
                 .getAttributeValue(new QName(null, "siid"));
         root = _client.buildMessage("getScopeInfoWithActivity", new String[] {"siid", "activityInfo"},
@@ -125,7 +125,7 @@
         OMElement root = _client.buildMessage("listInstances", new String[] {"filter", "order", "limit"},
                 new String[] {"name=DynPartnerMain", "", "10"});
         OMElement result = sendToIM(root);
-        String siid = result.getFirstChildWithName(new QName(Namespaces.ODE_PMAPI, "instance-info"))
+        String siid = result.getFirstElement().getFirstChildWithName(new QName(Namespaces.ODE_PMAPI, "instance-info"))
                 .getFirstChildWithName(new QName(Namespaces.ODE_PMAPI, "root-scope"))
                 .getAttributeValue(new QName(null, "siid"));
         root = _client.buildMessage("getVariableInfo", new String[] {"sid", "varName"}, new String[] {siid, "dummy"});
@@ -133,19 +133,22 @@
         assert(result.toString().indexOf("fire!") >= 0);
     }
 
-    public void testListEvents() throws Exception {
-        OMElement root = _client.buildMessage("listEvents", new String[] {"instanceFilter", "eventFilter", "maxCount"},
-                new String[] {"", "", "0"});
-        OMElement result = sendToIM(root);
-        assert(result.toString().split("event-info").length > 10);
-    }
 
-    public void testGetEventTimeline() throws Exception {
-        OMElement root = _client.buildMessage("getEventTimeline", new String[] {"instanceFilter", "eventFilter"},
-                new String[] {"", ""});
-        OMElement result = sendToIM(root);
-        assert(result.toString().split("element").length > 10);
-    }
+//    TODO uncomment when events querying is fixes on OpenJPA
+    
+//    public void testListEvents() throws Exception {
+//        OMElement root = _client.buildMessage("listEvents", new String[] {"instanceFilter", "eventFilter", "maxCount"},
+//                new String[] {"", "", "0"});
+//        OMElement result = sendToIM(root);
+//        assert(result.toString().split("event-info").length > 10);
+//    }
+//
+//    public void testGetEventTimeline() throws Exception {
+//        OMElement root = _client.buildMessage("getEventTimeline", new String[] {"instanceFilter", "eventFilter"},
+//                new String[] {"", ""});
+//        OMElement result = sendToIM(root);
+//        assert(result.toString().split("element").length > 10);
+//    }
 
     public void testDeleteInstances() throws Exception {
         OMElement root = _client.buildMessage("listAllInstancesWithLimit", new String[] {"limit"}, new String[] {"1"});
@@ -156,6 +159,8 @@
     }
 
     protected void setUp() throws Exception {
+        start();
+
         // Create a factory
         _factory = OMAbstractFactory.getOMFactory();
         _client = new ServiceClientUtil();
@@ -186,8 +191,8 @@
         _deployedName = res.getFirstChildWithName(new QName(null, "name")).getText();
 
         // Execute
-        URL svcUrl = new URL("http://localhost:8080/ode/processes/DynMainService");
-        InputStream sis = getClass().getClassLoader().getResourceAsStream("testDynPartnerRequest.soap");
+        URL svcUrl = new URL("http://localhost:8080/processes/DynMainService");
+        InputStream sis = this.getClass().getClassLoader().getResourceAsStream("testDynPartnerRequest.soap");
         System.out.println(HttpSoapSender.doSend(svcUrl, sis, null, 0, null, null, null));
         // Just making sure the instance starts
         Thread.sleep(1000);
@@ -208,18 +213,20 @@
                 new String[] {"name=DynPartnerMain", ""});
         OMElement result = sendToPM(listRoot);
         assert(result.toString().indexOf("process-info") < 0);
+
+        server.stop();
     }
 
     private OMElement sendToPM(OMElement msg) throws AxisFault {
-        return _client.send(msg, "http://localhost:8080/ode/services/ProcessManagement");
+        return _client.send(msg, "http://localhost:8080/processes/ProcessManagement");
     }
 
     private OMElement sendToIM(OMElement msg) throws AxisFault {
-        return _client.send(msg, "http://localhost:8080/ode/services/InstanceManagement");
+        return _client.send(msg, "http://localhost:8080/processes/InstanceManagement");
     }
 
     private OMElement sendToDeployment(OMElement msg) throws AxisFault {
-        return _client.send(msg, "http://localhost:8080/ode/services/DeploymentService");
+        return _client.send(msg, "http://localhost:8080/processes/DeploymentService");
     }
 
     public static void main(String[] args) {

Added: ode/trunk/axis2-war/src/test/resources/DynPartner.zip
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/DynPartner.zip?rev=658020&view=auto
==============================================================================
Files ode/trunk/axis2-war/src/test/resources/DynPartner.zip (added) and ode/trunk/axis2-war/src/test/resources/DynPartner.zip Mon May 19 15:55:12 2008 differ

Added: ode/trunk/axis2-war/src/test/resources/TestSoapHeader/HeaderTest.bpel
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/TestSoapHeader/HeaderTest.bpel?rev=658020&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/TestSoapHeader/HeaderTest.bpel (added)
+++ ode/trunk/axis2-war/src/test/resources/TestSoapHeader/HeaderTest.bpel Mon May 19 15:55:12 2008
@@ -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="HeaderTest"
+    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:dummy="http://axis2.ode.apache.org"
+    queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+    expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
+
+  <import location="HeaderTest.wsdl"
+     namespace="http://ode/bpel/unit-test.wsdl"
+     importType="http://schemas.xmlsoap.org/wsdl/" />
+
+   <partnerLinks>
+      <partnerLink name="helloPartnerLink" 
+         partnerLinkType="test:HeaderTestPartnerLinkType" myRole="me" />
+      <partnerLink name="dummyPartnerLink"
+         partnerLinkType="test:DummyPartnerLinkType" partnerRole="you" />
+   </partnerLinks>
+    
+   <variables>
+     <variable name="myVar" messageType="test:HeaderTestMessage"/>
+     <variable name="faultInput" messageType="dummy:faultTestRequest"/>
+     <variable name="faultOutput" messageType="dummy:faultTestResponse"/>
+     <variable name="tmpVar" type="xsd:string"/>
+   </variables>
+
+   <sequence>
+       <receive name="start" partnerLink="helloPartnerLink" portType="test:HeaderTestPortType"
+          operation="hello" variable="myVar" createInstance="yes"/>
+
+       <assign>
+           <copy>
+                <from><literal><dummy:faultTest><dummy:in>Hello</dummy:in></dummy:faultTest></literal></from>
+                <to>$faultInput.parameters</to>
+           </copy>
+       </assign>
+
+       <assign>
+           <copy>
+                <from variable="myVar" header="ConversationId"/>
+                <to variable="faultInput" header="ConversationId"/>
+           </copy>
+       </assign>
+
+       <invoke partnerLink="dummyPartnerLink" portType="test:DummyServicePortType"
+               operation="faultTest" inputVariable="faultInput" outputVariable="faultOutput"/>
+
+       <assign>
+           <copy>
+                <from variable="faultOutput" header="ConversationId"/>
+                <to variable="myVar" header="ConversationId"/>
+           </copy>
+           <copy>
+                <from variable="faultOutput" header="ConversationId"/>
+                <to variable="myVar" header="ConversationId"/>
+           </copy>
+       </assign>
+
+       <reply name="end" partnerLink="helloPartnerLink" portType="test:HeaderTestPortType"
+              operation="hello" variable="myVar"/>
+   </sequence>
+</process>

Copied: ode/trunk/axis2-war/src/test/resources/TestSoapHeader/HeaderTest.wsdl (from r656499, ode/trunk/axis2-war/src/test/resources/TestStructuredFault/HelloWorld2.wsdl)
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/TestSoapHeader/HeaderTest.wsdl?p2=ode/trunk/axis2-war/src/test/resources/TestSoapHeader/HeaderTest.wsdl&p1=ode/trunk/axis2-war/src/test/resources/TestStructuredFault/HelloWorld2.wsdl&r1=656499&r2=658020&rev=658020&view=diff
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/TestStructuredFault/HelloWorld2.wsdl (original)
+++ ode/trunk/axis2-war/src/test/resources/TestSoapHeader/HeaderTest.wsdl Mon May 19 15:55:12 2008
@@ -18,55 +18,51 @@
   ~ 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:dummy="http://axis2.ode.apache.org"
-    xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
+<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:dummy="http://axis2.ode.apache.org"
+        xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
 
     <wsdl:import namespace="http://axis2.ode.apache.org" location="dummy-service.wsdl"/>
 
-    <wsdl:message name="HelloMessage">
+    <wsdl:message name="HeaderTestMessage">
         <wsdl:part name="TestPart" type="xsd:string"/>
     </wsdl:message>
-    
-    <wsdl:portType name="HelloPortType">
+
+    <wsdl:portType name="HeaderTestPortType">
         <wsdl:operation name="hello">
-            <wsdl:input message="tns:HelloMessage" name="TestIn"/>
-            <wsdl:output message="tns:HelloMessage" name="TestOut"/>
-        </wsdl:operation>    
+            <wsdl:input message="tns:HeaderTestMessage" name="TestIn"/>
+            <wsdl:output message="tns:HeaderTestMessage" name="TestOut"/>
+        </wsdl:operation>
     </wsdl:portType>
-    
-     <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType">
+
+    <wsdl:binding name="HeaderTestSoapBinding" type="tns:HeaderTestPortType">
         <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"/>
+                <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"/>
+                <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 name="HeaderTestService">
+        <wsdl:port name="HeaderTestPort" binding="tns:HeaderTestSoapBinding">
+            <soap:address location="http://localhost:8080/ode/processes/headerTest"/>
+        </wsdl:port>
     </wsdl:service>
-    
-   <plnk:partnerLinkType name="HelloPartnerLinkType">
-       <plnk:role name="me" portType="tns:HelloPortType"/>
-       <plnk:role name="you" portType="tns:HelloPortType"/>
-   </plnk:partnerLinkType>
+
+    <plnk:partnerLinkType name="HeaderTestPartnerLinkType">
+        <plnk:role name="me" portType="tns:HeaderTestPortType"/>
+        <plnk:role name="you" portType="tns:HeaderTestPortType"/>
+    </plnk:partnerLinkType>
     <plnk:partnerLinkType name="DummyPartnerLinkType">
         <plnk:role name="you" portType="dummy:DummyServicePortType"/>
     </plnk:partnerLinkType>

Copied: ode/trunk/axis2-war/src/test/resources/TestSoapHeader/deploy.xml (from r656499, ode/trunk/distro/src/examples-jbi/HelloWorld2/HelloWorld2-process/deploy.xml)
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/TestSoapHeader/deploy.xml?p2=ode/trunk/axis2-war/src/test/resources/TestSoapHeader/deploy.xml&p1=ode/trunk/distro/src/examples-jbi/HelloWorld2/HelloWorld2-process/deploy.xml&r1=656499&r2=658020&rev=658020&view=diff
==============================================================================
--- ode/trunk/distro/src/examples-jbi/HelloWorld2/HelloWorld2-process/deploy.xml (original)
+++ ode/trunk/axis2-war/src/test/resources/TestSoapHeader/deploy.xml Mon May 19 15:55:12 2008
@@ -17,14 +17,17 @@
   ~ under the License.
   -->
 <deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
-        xmlns:pns="urn:/HelloWorld2.bpel"
-        xmlns:sns="urn:/HelloWorld2.wsdl" >
+	xmlns:pns="http://ode/bpel/unit-test" 
+	xmlns:wns="http://ode/bpel/unit-test.wsdl" xmlns:dns="http://axis2.ode.apache.org">
 
 
-	<process name="pns:HelloWorld2">
+	<process name="pns:HeaderTest">
 		<active>true</active>
 		<provide partnerLink="helloPartnerLink">
-			<service name="sns:HelloService" port="HelloPort"/>
+			<service name="wns:HeaderTestService" port="HeaderTestPort"/>
 		</provide>
-	</process>
+        <invoke partnerLink="dummyPartnerLink">
+            <service name="dns:DummyService" port="DummyServiceSOAP11port_http"/>
+        </invoke>
+    </process>
 </deploy>

Added: ode/trunk/axis2-war/src/test/resources/TestSoapHeader/dummy-service.wsdl
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/TestSoapHeader/dummy-service.wsdl?rev=658020&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/TestSoapHeader/dummy-service.wsdl (added)
+++ ode/trunk/axis2-war/src/test/resources/TestSoapHeader/dummy-service.wsdl Mon May 19 15:55:12 2008
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+                  xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
+                  xmlns:ns0="http://axis2.ode.apache.org/xsd"
+                  xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
+                  xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
+                  xmlns:ns1="http://axis2.ode.apache.org"
+                  xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
+                  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+                  targetNamespace="http://axis2.ode.apache.org">
+   <wsdl:types>
+      <xs:schema xmlns:ns="http://axis2.ode.apache.org" attributeFormDefault="qualified"
+                 elementFormDefault="unqualified" targetNamespace="http://axis2.ode.apache.org">
+
+         <xs:element name="DummyException">
+            <xs:complexType>
+               <xs:sequence>
+                   <xs:element minOccurs="0" name="reason" nillable="true" type="xs:string"/>
+               </xs:sequence>
+            </xs:complexType>
+         </xs:element>
+         <xs:element name="faultTest">
+            <xs:complexType>
+               <xs:sequence>
+                  <xs:element minOccurs="0" name="in" nillable="true" type="xs:string"/>
+               </xs:sequence>
+            </xs:complexType>
+         </xs:element>
+         <xs:element name="faultTestResponse">
+            <xs:complexType>
+               <xs:sequence>
+                  <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
+               </xs:sequence>
+            </xs:complexType>
+         </xs:element>
+         <xs:element name="hello">
+            <xs:complexType>
+               <xs:sequence>
+                  <xs:element minOccurs="0" name="in" nillable="true" type="xs:string"/>
+               </xs:sequence>
+            </xs:complexType>
+         </xs:element>
+         <xs:element name="helloResponse">
+            <xs:complexType>
+               <xs:sequence>
+                  <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
+               </xs:sequence>
+            </xs:complexType>
+         </xs:element>
+      </xs:schema>
+   </wsdl:types>
+   <wsdl:message name="faultTestRequest">
+      <wsdl:part name="parameters" element="ns1:faultTest"/>
+   </wsdl:message>
+   <wsdl:message name="faultTestResponse">
+      <wsdl:part name="parameters" element="ns1:faultTestResponse"/>
+   </wsdl:message>
+   <wsdl:message name="DummyException">
+      <wsdl:part name="parameters" element="ns1:DummyException"/>
+   </wsdl:message>
+   <wsdl:message name="helloRequest">
+      <wsdl:part name="parameters" element="ns1:hello"/>
+   </wsdl:message>
+   <wsdl:message name="helloResponse">
+      <wsdl:part name="parameters" element="ns1:helloResponse"/>
+   </wsdl:message>
+   <wsdl:portType name="DummyServicePortType">
+      <wsdl:operation name="faultTest">
+         <wsdl:input message="ns1:faultTestRequest" wsaw:Action="urn:faultTest"/>
+         <wsdl:output message="ns1:faultTestResponse" wsaw:Action="urn:faultTestResponse"/>
+         <wsdl:fault message="ns1:DummyException" name="DummyException"
+                     wsaw:Action="urn:faultTestDummyException"/>
+      </wsdl:operation>
+      <wsdl:operation name="hello">
+         <wsdl:input message="ns1:helloRequest" wsaw:Action="urn:hello"/>
+         <wsdl:output message="ns1:helloResponse" wsaw:Action="urn:helloResponse"/>
+      </wsdl:operation>
+   </wsdl:portType>
+   <wsdl:binding name="DummyServiceSOAP11Binding" type="ns1:DummyServicePortType">
+      <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+      <wsdl:operation name="faultTest">
+         <soap:operation soapAction="urn:faultTest" style="document"/>
+         <wsdl:input>
+            <soap:body use="literal"/>
+         </wsdl:input>
+         <wsdl:output>
+            <soap:body use="literal"/>
+         </wsdl:output>
+         <wsdl:fault name="DummyException">
+            <soap:fault use="literal" name="DummyException"/>
+         </wsdl:fault>
+      </wsdl:operation>
+      <wsdl:operation name="hello">
+         <soap:operation soapAction="urn:hello" style="document"/>
+         <wsdl:input>
+            <soap:body use="literal"/>
+         </wsdl:input>
+         <wsdl:output>
+            <soap:body use="literal"/>
+         </wsdl:output>
+      </wsdl:operation>
+   </wsdl:binding>
+   <wsdl:binding name="DummyServiceSOAP12Binding" type="ns1:DummyServicePortType">
+      <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+      <wsdl:operation name="faultTest">
+         <soap12:operation soapAction="urn:faultTest" style="document"/>
+         <wsdl:input>
+            <soap12:body use="literal"/>
+         </wsdl:input>
+         <wsdl:output>
+            <soap12:body use="literal"/>
+         </wsdl:output>
+         <wsdl:fault name="DummyException">
+            <soap12:fault use="literal" name="DummyException"/>
+         </wsdl:fault>
+      </wsdl:operation>
+      <wsdl:operation name="hello">
+         <soap12:operation soapAction="urn:hello" style="document"/>
+         <wsdl:input>
+            <soap12:body use="literal"/>
+         </wsdl:input>
+         <wsdl:output>
+            <soap12:body use="literal"/>
+         </wsdl:output>
+      </wsdl:operation>
+   </wsdl:binding>
+   <wsdl:binding name="DummyServiceHttpBinding" type="ns1:DummyServicePortType">
+      <http:binding verb="POST"/>
+      <wsdl:operation name="faultTest">
+         <http:operation location="DummyService/faultTest"/>
+         <wsdl:input>
+            <mime:content type="text/xml" part="faultTest"/>
+         </wsdl:input>
+         <wsdl:output>
+            <mime:content type="text/xml" part="faultTest"/>
+         </wsdl:output>
+      </wsdl:operation>
+      <wsdl:operation name="hello">
+         <http:operation location="DummyService/hello"/>
+         <wsdl:input>
+            <mime:content type="text/xml" part="hello"/>
+         </wsdl:input>
+         <wsdl:output>
+            <mime:content type="text/xml" part="hello"/>
+         </wsdl:output>
+      </wsdl:operation>
+   </wsdl:binding>
+   <wsdl:service name="DummyService">
+      <wsdl:port name="DummyServiceSOAP11port_http" binding="ns1:DummyServiceSOAP11Binding">
+         <soap:address location="http://localhost:8080/processes/DummyService"/>
+      </wsdl:port>
+      <wsdl:port name="DummyServiceSOAP12port_http" binding="ns1:DummyServiceSOAP12Binding">
+         <soap12:address location="http://localhost:8080/processes/DummyService"/>
+      </wsdl:port>
+      <wsdl:port name="DummyServiceHttpport" binding="ns1:DummyServiceHttpBinding">
+         <http:address location="http://localhost:8080/processes/DummyService"/>
+      </wsdl:port>
+   </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file

Copied: ode/trunk/axis2-war/src/test/resources/TestSoapHeader/testRequest.soap (from r656499, ode/trunk/axis2/src/test/resources/testDynPartnerRequest.soap)
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/TestSoapHeader/testRequest.soap?p2=ode/trunk/axis2-war/src/test/resources/TestSoapHeader/testRequest.soap&p1=ode/trunk/axis2/src/test/resources/testDynPartnerRequest.soap&r1=656499&r2=658020&rev=658020&view=diff
==============================================================================
--- ode/trunk/axis2/src/test/resources/testDynPartnerRequest.soap (original)
+++ ode/trunk/axis2-war/src/test/resources/TestSoapHeader/testRequest.soap Mon May 19 15:55:12 2008
@@ -1,3 +1,4 @@
+<?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
@@ -18,12 +19,13 @@
   -->
 
 <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
-  <!-- test soap message -->
-  <SOAP-ENV:Body>
-    <ns1:execute xmlns:ns1="http://ode/bpel/unit-test.wsdl">
-        <ns2:payload xmlns:ns2="http://ode/bpel/responder.wsdl">
-            <ns2:dummy>fire!</ns2:dummy>
-        </ns2:payload>
-    </ns1:execute>
-  </SOAP-ENV:Body>
+    <SOAP-ENV:Header>
+        <myns:ConversationId xmlns:myns="http://my.company/super/protocol">ZZZXYZ</myns:ConversationId>
+    </SOAP-ENV:Header>
+    <!-- test soap message -->
+    <SOAP-ENV:Body>
+        <ns1:hello xmlns:ns1="http://ode/bpel/unit-test.wsdl">
+            <TestPart xmlns="">Hello</TestPart>
+        </ns1:hello>
+    </SOAP-ENV:Body>
 </SOAP-ENV:Envelope>

Modified: ode/trunk/axis2-war/src/test/resources/TestStructuredFault/HelloWorld2.wsdl
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/TestStructuredFault/HelloWorld2.wsdl?rev=658020&r1=658019&r2=658020&view=diff
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/TestStructuredFault/HelloWorld2.wsdl (original)
+++ ode/trunk/axis2-war/src/test/resources/TestStructuredFault/HelloWorld2.wsdl Mon May 19 15:55:12 2008
@@ -65,7 +65,6 @@
     
    <plnk:partnerLinkType name="HelloPartnerLinkType">
        <plnk:role name="me" portType="tns:HelloPortType"/>
-       <plnk:role name="you" portType="tns:HelloPortType"/>
    </plnk:partnerLinkType>
     <plnk:partnerLinkType name="DummyPartnerLinkType">
         <plnk:role name="you" portType="dummy:DummyServicePortType"/>

Added: ode/trunk/axis2-war/src/test/resources/XSDReferences/BPMN/NewDiagram2-Pool0.bpel
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/XSDReferences/BPMN/NewDiagram2-Pool0.bpel?rev=658020&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/XSDReferences/BPMN/NewDiagram2-Pool0.bpel (added)
+++ ode/trunk/axis2-war/src/test/resources/XSDReferences/BPMN/NewDiagram2-Pool0.bpel Mon May 19 15:55:12 2008
@@ -0,0 +1,38 @@
+<?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:xreftst="http://ode.apache.org/test/xsdref-test" xmlns:Pooldo="http://example.com/BPMN/NewDiagram2/Pooldo" xmlns:diag="http://example.com/BPMN/NewDiagram2" xmlns:this="http://example.com/BPMN/NewDiagram2/Pool0" xmlns:bpmn="http://www.intalio.com/bpms" queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0" expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0" bpmn:label="Pool0" bpmn:id="_9TjBEHjqEdyMF-4bCGAcTQ" name="Pool0" targetNamespace="http://example.com/BPMN/NewDiagram2/Pool0">
+  <bpel:import namespace="http://example.com/BPMN/NewDiagram2" location="NewDiagram2.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
+  <bpel:import namespace="http://example.com/BPMN/NewDiagram2/Pool0" location="NewDiagram2-Pool0.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
+  <bpel:partnerLinks>
+    <bpel:partnerLink name="pool0AndPooldoPlkVar" partnerLinkType="diag:Pool0AndPooldo" myRole="Pool0_for_Pooldo"/>
+  </bpel:partnerLinks>
+  <bpel:variables>
+    <bpel:variable name="thisEventStartMessageRequest" messageType="this:EventStartMessageRequest"/>
+    <bpel:variable name="thisEventStartMessageResponse" messageType="this:EventStartMessageResponse"/>
+  </bpel:variables>
+  <bpel:sequence>
+    <bpel:receive partnerLink="pool0AndPooldoPlkVar" portType="this:ForPooldo" operation="EventStartMessage" variable="thisEventStartMessageRequest" createInstance="yes" bpmn:label="EventStartMessage" bpmn:id="_9mUzIHjqEdyMF-4bCGAcTQ"></bpel:receive>
+    <bpel:assign name="init-variables-Pool0">
+      <bpel:copy bpmn:label="$thisEventStartMessageResponse  out:_BpmbUHjrEdyMF-4bCGAcTQ">
+        <bpel:from>
+          <bpel:literal>
+<xreftst:Listexreftst>
+  <xreftst:xreftst>
+    <xreftst:LigneMatrice>
+      <xreftst:Type>
+      </xreftst:Type>
+      <xreftst:Montant>
+      </xreftst:Montant>
+      <xreftst:ProduitCouvrant>
+      </xreftst:ProduitCouvrant>
+    </xreftst:LigneMatrice>
+  </xreftst:xreftst>
+</xreftst:Listexreftst>
+          </bpel:literal>
+        </bpel:from>
+        <bpel:to>$thisEventStartMessageResponse.body</bpel:to>
+      </bpel:copy>
+    </bpel:assign>
+    <bpel:empty bpmn:label="task" bpmn:id="_-IlysHjqEdyMF-4bCGAcTQ"/>
+    <bpel:reply partnerLink="pool0AndPooldoPlkVar" portType="this:ForPooldo" operation="EventStartMessage" variable="thisEventStartMessageResponse" bpmn:label="EventEndMessage" bpmn:id="__fUVEHjqEdyMF-4bCGAcTQ"></bpel:reply>
+  </bpel:sequence>
+</bpel:process>
\ No newline at end of file

Added: ode/trunk/axis2-war/src/test/resources/XSDReferences/BPMN/NewDiagram2-Pool0.deploy
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/XSDReferences/BPMN/NewDiagram2-Pool0.deploy?rev=658020&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/XSDReferences/BPMN/NewDiagram2-Pool0.deploy (added)
+++ ode/trunk/axis2-war/src/test/resources/XSDReferences/BPMN/NewDiagram2-Pool0.deploy Mon May 19 15:55:12 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:MatricePriseEnCharge="http://www.agora.msa.fr/TarifMaladie" xmlns:Pooldo="http://example.com/BPMN/NewDiagram2/Pooldo" xmlns:diag="http://example.com/BPMN/NewDiagram2" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:this="http://example.com/BPMN/NewDiagram2/Pool0" name="this:Pool0" fileName="BPMN/NewDiagram2-Pool0.bpel">
+  <dd:property name="PATH">BPMN/NewDiagram2</dd:property>
+  <dd:property name="SVG">BPMN/NewDiagram2.svg</dd:property>
+  <dd:provide partnerLink="pool0AndPooldoPlkVar">
+    <dd:service name="this:CanonicServiceForPooldo" port="canonicPort"/>
+  </dd:provide>
+</dd:process>
\ No newline at end of file

Added: ode/trunk/axis2-war/src/test/resources/XSDReferences/BPMN/NewDiagram2-Pool0.wsdl
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/XSDReferences/BPMN/NewDiagram2-Pool0.wsdl?rev=658020&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/XSDReferences/BPMN/NewDiagram2-Pool0.wsdl (added)
+++ ode/trunk/axis2-war/src/test/resources/XSDReferences/BPMN/NewDiagram2-Pool0.wsdl Mon May 19 15:55:12 2008
@@ -0,0 +1,40 @@
+<?xml version='1.0' encoding='utf-8'?>
+<wsdl:definitions xmlns:xreftst="http://ode.apache.org/test/xsdref-test" xmlns:Pooldo="http://example.com/BPMN/NewDiagram2/Pooldo" xmlns:diag="http://example.com/BPMN/NewDiagram2" 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/BPMN/NewDiagram2/Pool0" targetNamespace="http://example.com/BPMN/NewDiagram2/Pool0">
+    <wsdl:types>
+        <xs:schema targetNamespace="http://ode.apache.org/test/xsdref-test">
+            <xs:include schemaLocation="../XSDSchema/xreftst.xsd"/>
+        </xs:schema>
+        <xs:schema elementFormDefault="qualified" targetNamespace="http://example.com/BPMN/NewDiagram2/Pool0">
+            <xs:element name="EventStartMessageRequest" type="xs:string"/>
+        </xs:schema>
+    </wsdl:types>
+    <wsdl:message name="EventStartMessageRequest">
+        <wsdl:part name="body" element="this:EventStartMessageRequest"/>
+    </wsdl:message>
+    <wsdl:message name="EventStartMessageResponse">
+        <wsdl:part name="body" element="xreftst:Listexreftst"/>
+    </wsdl:message>
+    <wsdl:portType name="ForPooldo">
+        <wsdl:operation name="EventStartMessage">
+            <wsdl:input message="this:EventStartMessageRequest" name="EventStartMessage"/>
+            <wsdl:output message="this:EventStartMessageResponse" name="EventStartMessageResponse"/>
+        </wsdl:operation>
+    </wsdl:portType>
+    <wsdl:binding name="CanonicBindingForPooldo" type="this:ForPooldo">
+        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="EventStartMessage">
+            <soap:operation style="document" soapAction="http://example.com/BPMN/NewDiagram2/Pool0/ForPooldo/EventStartMessage"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="CanonicServiceForPooldo">
+        <wsdl:port name="canonicPort" binding="this:CanonicBindingForPooldo">
+            <soap:address location="http://localhost:8080/ode/processes/testXSDko/BPMN/NewDiagram2/Pool0/Pooldo"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file

Added: ode/trunk/axis2-war/src/test/resources/XSDReferences/BPMN/NewDiagram2.wsdl
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/XSDReferences/BPMN/NewDiagram2.wsdl?rev=658020&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/XSDReferences/BPMN/NewDiagram2.wsdl (added)
+++ ode/trunk/axis2-war/src/test/resources/XSDReferences/BPMN/NewDiagram2.wsdl Mon May 19 15:55:12 2008
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<wsdl:definitions xmlns:bpdm="http://www.intalio/designer/business-process-data-modeling" xmlns:Pooldo="http://example.com/BPMN/NewDiagram2/Pooldo" xmlns:diag="http://example.com/BPMN/NewDiagram2" xmlns:bpel="http://schemas.xmlsoap.org/ws/2004/03/business-process/" xmlns:pnlk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/" xmlns:PGMD_CURMED="http://www.agora.msa.fr/CURMED" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ResultatControleFacturation="http://ode.apache.org/test/xsdref-test" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:Pool0="http://example.com/BPMN/NewDiagram2/Pool0" targetNamespace="http://example.com/BPMN/NewDiagram2">
+    <wsdl:import namespace="http://example.com/BPMN/NewDiagram2/Pool0" location="NewDiagram2-Pool0.wsdl"/>
+    <pnlk:partnerLinkType name="Pool0AndPooldo">
+        <pnlk:role name="Pool0_for_Pooldo" portType="Pool0:ForPooldo"/>
+    </pnlk:partnerLinkType>
+</wsdl:definitions>
\ No newline at end of file

Added: ode/trunk/axis2-war/src/test/resources/XSDReferences/XSDSchema/ListeProduit.xsd
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/XSDReferences/XSDSchema/ListeProduit.xsd?rev=658020&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/XSDReferences/XSDSchema/ListeProduit.xsd (added)
+++ ode/trunk/axis2-war/src/test/resources/XSDReferences/XSDSchema/ListeProduit.xsd Mon May 19 15:55:12 2008
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XMLSpy v2008 (http://www.altova.com) by none (none) -->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://ode.apache.org/test/xsdref-test" targetNamespace="http://ode.apache.org/test/xsdref-test" elementFormDefault="qualified" attributeFormDefault="unqualified">
+	<xs:element name="ListeProduits" type="ListeProduitsType">
+		<xs:annotation>
+			<xs:documentation>Liste de produits</xs:documentation>
+		</xs:annotation>
+	</xs:element>
+	<xs:complexType name="ListeProduitsType">
+		<xs:sequence>
+			<xs:element ref="ReferenceProduit" minOccurs="0" maxOccurs="unbounded"/>
+		</xs:sequence>
+	</xs:complexType>
+	<xs:element name="ReferenceProduit" type="ReferenceProduitType">
+		<xs:annotation>
+			<xs:documentation>Reference de produit</xs:documentation>
+		</xs:annotation>
+	</xs:element>
+	<xs:simpleType name="ReferenceProduitType">
+		<xs:restriction base="xs:string">
+			<xs:minLength value="1"/>
+		</xs:restriction>
+	</xs:simpleType>
+</xs:schema>

Added: ode/trunk/axis2-war/src/test/resources/XSDReferences/XSDSchema/xreftst.xsd
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/XSDReferences/XSDSchema/xreftst.xsd?rev=658020&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/XSDReferences/XSDSchema/xreftst.xsd (added)
+++ ode/trunk/axis2-war/src/test/resources/XSDReferences/XSDSchema/xreftst.xsd Mon May 19 15:55:12 2008
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XMLSpy v2008 (http://www.altova.com) by none (none) -->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://ode.apache.org/test/xsdref-test" targetNamespace="http://ode.apache.org/test/xsdref-test" elementFormDefault="qualified" attributeFormDefault="unqualified">
+    <xs:include schemaLocation="ListeProduit.xsd"/>
+		<xs:element name="Listexreftst" type="ListexreftstType">
+		<xs:annotation>
+			<xs:documentation>Liste de matrice de prise en charge</xs:documentation>
+		</xs:annotation>
+	</xs:element>
+	<xs:complexType name="ListexreftstType">
+		<xs:sequence>
+			<xs:element ref="xreftst" minOccurs="0" maxOccurs="unbounded"/>
+		</xs:sequence>
+	</xs:complexType>
+	<xs:element name="xreftst" type="xreftstType">
+		<xs:annotation>
+			<xs:documentation>Matrice de prise en charge</xs:documentation>
+		</xs:annotation>
+	</xs:element>
+	<xs:complexType name="xreftstType">
+		<xs:sequence>
+			<xs:element ref="LigneMatrice" maxOccurs="unbounded"/>
+		</xs:sequence>
+	</xs:complexType>
+	<xs:element name="LigneMatrice" type="LigneMatriceType">
+		<xs:annotation>
+			<xs:documentation>Ligne de la matrice</xs:documentation>
+		</xs:annotation>
+	</xs:element>
+	<xs:complexType name="LigneMatriceType">
+		<xs:sequence>
+			<xs:element ref="Type"/>
+			<xs:element ref="Montant"/>
+			<xs:element ref="ProduitCouvrant"/>
+		</xs:sequence>
+	</xs:complexType>
+	<xs:element name="Type">
+		<xs:annotation>
+			<xs:documentation>Type
+			Exemples de valeur : Depense, Ticket moderateur, Depassement, Participation forfaitaire, Majoration de TM, PO de base)</xs:documentation>
+		</xs:annotation>
+		<xs:simpleType>
+			<xs:restriction base="xs:string">
+				<xs:enumeration value="Depense"/>
+				<xs:enumeration value="Ticket moderateur"/>
+				<xs:enumeration value="Depassement"/>
+				<xs:enumeration value="Participation forfaitaire"/>
+				<xs:enumeration value="Majoration de TM"/>
+				<xs:enumeration value="PO de base"/>
+			</xs:restriction>
+		</xs:simpleType>
+	</xs:element>
+	<xs:element name="Montant" type="xs:decimal">
+		<xs:annotation>
+			<xs:documentation>Montant</xs:documentation>
+		</xs:annotation>
+	</xs:element>
+	<xs:element name="ProduitCouvrant" type="ReferenceProduitType">
+		<xs:annotation>
+			<xs:documentation>produit couvrant</xs:documentation>
+		</xs:annotation>
+	</xs:element>
+	 <!-- 
+		<xs:simpleType name="ReferenceProduitType2">
+		<xs:restriction base="xs:string">
+			<xs:minLength value="1"/>
+		</xs:restriction>
+	</xs:simpleType>
+	-->
+</xs:schema>

Added: ode/trunk/axis2-war/src/test/resources/XSDReferences/deploy.xml
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/XSDReferences/deploy.xml?rev=658020&view=auto
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/XSDReferences/deploy.xml (added)
+++ ode/trunk/axis2-war/src/test/resources/XSDReferences/deploy.xml Mon May 19 15:55:12 2008
@@ -0,0 +1,7 @@
+<?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:xreftst="http://ode.apache.org/test/xsdref-test" xmlns:Pooldo="http://example.com/BPMN/NewDiagram2/Pooldo" xmlns:diag="http://example.com/BPMN/NewDiagram2" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:this="http://example.com/BPMN/NewDiagram2/Pool0" name="this:Pool0" fileName="BPMN/NewDiagram2-Pool0.bpel">
+  <dd:property name="PATH">BPMN/NewDiagram2</dd:property>
+  <dd:property name="SVG">BPMN/NewDiagram2.svg</dd:property>
+  <dd:provide partnerLink="pool0AndPooldoPlkVar">
+    <dd:service name="this:CanonicServiceForPooldo" port="canonicPort" />
+  </dd:provide>
+</dd:process></dd:deploy>
\ No newline at end of file

Copied: ode/trunk/axis2-war/src/test/resources/testDynPartnerRequest.soap (from r656499, ode/trunk/axis2/src/test/resources/testDynPartnerRequest.soap)
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/testDynPartnerRequest.soap?p2=ode/trunk/axis2-war/src/test/resources/testDynPartnerRequest.soap&p1=ode/trunk/axis2/src/test/resources/testDynPartnerRequest.soap&r1=656499&r2=658020&rev=658020&view=diff
==============================================================================
--- ode/trunk/axis2/src/test/resources/testDynPartnerRequest.soap (original)
+++ ode/trunk/axis2-war/src/test/resources/testDynPartnerRequest.soap Mon May 19 15:55:12 2008
@@ -20,10 +20,6 @@
 <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <!-- test soap message -->
   <SOAP-ENV:Body>
-    <ns1:execute xmlns:ns1="http://ode/bpel/unit-test.wsdl">
-        <ns2:payload xmlns:ns2="http://ode/bpel/responder.wsdl">
-            <ns2:dummy>fire!</ns2:dummy>
-        </ns2:payload>
-    </ns1:execute>
+    <ns2:dummy xmlns:ns2="http://ode/bpel/responder.wsdl">fire!</ns2:dummy>
   </SOAP-ENV:Body>
 </SOAP-ENV:Envelope>

Modified: ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ExternalService.java
URL: http://svn.apache.org/viewvc/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ExternalService.java?rev=658020&r1=658019&r2=658020&view=diff
==============================================================================
--- ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ExternalService.java (original)
+++ ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ExternalService.java Mon May 19 15:55:12 2008
@@ -59,7 +59,7 @@
 
 /**
  * Acts as a service not provided by ODE. Used mainly for invocation as a way to maintain the WSDL decription of used services.
- * 
+ *
  * @author Matthieu Riou <mriou at apache dot org>
  */
 public class ExternalService implements PartnerRoleChannel {
@@ -78,8 +78,6 @@
 
     private AxisConfiguration _axisConfig;
 
-    private boolean _isReplicateEmptyNS = false;
-
     private SoapMessageConverter _converter;
 
     private Scheduler _sched;
@@ -87,13 +85,13 @@
     private BpelServer _server;
 
     public ExternalService(Definition definition, QName serviceName, String portName, AxisConfiguration axisConfig,
-            Scheduler sched, BpelServer server) throws AxisFault {
+                           Scheduler sched, BpelServer server) throws AxisFault {
         _definition = definition;
         _serviceName = serviceName;
         _portName = portName;
         _axisConfig = axisConfig;
         _sched = sched;
-        _converter = new SoapMessageConverter(definition, serviceName, portName, _isReplicateEmptyNS);
+        _converter = new SoapMessageConverter(definition, serviceName, portName);
         _server = server;
     }
 
@@ -105,7 +103,7 @@
             MessageContext mctx = new MessageContext();
             writeHeader(mctx, odeMex);
 
-            _converter.createSoapRequest(mctx, odeMex.getRequest().getMessage(), odeMex.getOperation());
+            _converter.createSoapRequest(mctx, odeMex.getRequest(), odeMex.getOperation());
 
             SOAPEnvelope soapEnv = mctx.getEnvelope();
             EndpointReference axisEPR = new EndpointReference(((MutableEndpoint) odeMex.getEndpointReference()).getUrl());
@@ -132,7 +130,6 @@
             final OperationClient operationClient = cached._client.createClient(isTwoWay ? ServiceClient.ANON_OUT_IN_OP
                     : ServiceClient.ANON_OUT_ONLY_OP);
             operationClient.setOptions(options);
-
             operationClient.addMessageContext(mctx);
 
             if (isTwoWay) {
@@ -174,16 +171,16 @@
      * @return The action value for the specified operation
      */
     private String getAction(String operation)
-	{
-    	String action = _converter.getWSAInputAction(operation);
+    {
+        String action = _converter.getWSAInputAction(operation);
         if (action == null || "".equals(action))
         {
-        	action = _converter.getSoapAction(operation);	
+            action = _converter.getSoapAction(operation);
         }
-		return action;
-	}
+        return action;
+    }
 
-	/**
+    /**
      * Extracts endpoint information from ODE message exchange to stuff them into Axis MessageContext.
      */
     private void writeHeader(MessageContext ctxt, PartnerRoleMessageExchange odeMex) {
@@ -201,7 +198,7 @@
             targetEPR.setSessionId(partnerSessionId);
         }
         options.setProperty("targetSessionEndpoint", targetEPR);
-        
+
         if (myRoleEPR != null) {
             if (myRoleSessionId != null) {
                 if (__log.isDebugEnabled()) {
@@ -216,13 +213,13 @@
 
         String action = getAction(odeMex.getOperationName());
         ctxt.setSoapAction(action);
-        
-	    if (MessageExchange.MessageExchangePattern.REQUEST_RESPONSE == odeMex.getMessageExchangePattern()) {
-	    	EndpointReference annonEpr =
-	    		new EndpointReference(Namespaces.WS_ADDRESSING_ANON_URI);
-	    	ctxt.setReplyTo(annonEpr);
-	    	ctxt.setMessageID("uuid:" + new UUID().toString());
-	    }
+
+        if (MessageExchange.MessageExchangePattern.REQUEST_RESPONSE == odeMex.getMessageExchangePattern()) {
+            EndpointReference annonEpr =
+                    new EndpointReference(Namespaces.WS_ADDRESSING_ANON_URI);
+            ctxt.setReplyTo(annonEpr);
+            ctxt.setMessageID("uuid:" + new UUID().toString());
+        }
     }
 
     public org.apache.ode.bpel.iapi.EndpointReference getInitialEndpointReference() {
@@ -237,15 +234,6 @@
         // nothing
     }
 
-    public void setReplicateEmptyNS(boolean isReplicateEmptyNS) {
-        _isReplicateEmptyNS = isReplicateEmptyNS;
-        try {
-            _converter = new SoapMessageConverter(_definition, _serviceName, _portName, _isReplicateEmptyNS);
-        } catch (Exception ex) {
-            throw new RuntimeException(ex);
-        }
-    }
-
     public String getPortName() {
         return _portName;
     }
@@ -266,70 +254,46 @@
     }
 
     private void reply(final PartnerRoleMessageExchange odeMex, final Operation operation, final MessageContext reply, final boolean fault) {
-        final Document odeMsg = DOMUtils.newDocument();
-        final Element odeMsgEl = odeMsg.createElementNS(null, "message");
-        odeMsg.appendChild(odeMsgEl);
-
-        final QName faultType;
         try {
+            if (__log.isDebugEnabled()) __log.debug("Received response for MEX " + odeMex);
             if (fault) {
-                faultType = _converter.parseSoapFault(odeMsgEl, reply.getEnvelope(), operation);
+                Document odeMsg = DOMUtils.newDocument();
+                Element odeMsgEl = odeMsg.createElementNS(null, "message");
+                odeMsg.appendChild(odeMsgEl);
+                QName faultType = _converter.parseSoapFault(odeMsgEl, reply.getEnvelope(), operation);
                 if (__log.isDebugEnabled()) __log.debug("Reply is a fault, found type: " + faultType);
-            } else {
-                faultType = null;
-                _converter.parseSoapResponse(odeMsgEl, reply.getEnvelope(), operation);
-            }
-        } catch (AxisFault af) {
-            __log.warn("Message format error, failing.", af);
-            replyWithFailure(odeMex, FailureType.FORMAT_ERROR, af.getMessage(), null);
-            return;
-        }
 
-        try {
-            QName nonNullFT = new QName(Namespaces.ODE_EXTENSION_NS, "unknownFault");
-            if (faultType != null) {
-                Fault f = odeMex.getOperation().getFault(faultType.getLocalPart());
-                if (f != null && f.getMessage().getQName() != null)
-                    nonNullFT = f.getMessage().getQName();
-                else __log.debug("Fault " + faultType + " isn't referenced in the service definition, unknown fault.");
-            }
-            Message response = fault ? odeMex.createMessage(odeMex.getOperation()
-                    .getFault(nonNullFT.getLocalPart()).getMessage().getQName()) : odeMex
-                    .createMessage(odeMex.getOperation().getOutput().getMessage().getQName());
-            try {
-                if (__log.isDebugEnabled()) {
-                    __log.debug("Received response for MEX " + odeMex);
-                }
-                response.setMessage(odeMsgEl);
-                if (fault) {
-                    if (faultType != null) {
-                        if (__log.isWarnEnabled()) {
-                            __log.warn("Fault response: faultType=" + faultType + "\n" + DOMUtils.domToString(odeMsgEl));
-                        }
-                        odeMex.replyWithFault(faultType, response);
-                    } else {
-                        if (__log.isWarnEnabled()) {
-                            __log.warn("Fault response: faultType=(unkown)\n" + reply.getEnvelope().toString());
-                        }
-                        odeMex.replyWithFailure(FailureType.OTHER, reply.getEnvelope().getBody().getFault().getText(), 
-                                OMUtils.toDOM(reply.getEnvelope().getBody()));
-                    }
+                if (faultType != null) {
+                    if (__log.isWarnEnabled())
+                        __log.warn("Fault response: faultType=" + faultType + "\n" + DOMUtils.domToString(odeMsgEl));
+                    QName nonNullFT = new QName(Namespaces.ODE_EXTENSION_NS, "unknownFault");
+                    Fault f = odeMex.getOperation().getFault(faultType.getLocalPart());
+                    if (f != null && f.getMessage().getQName() != null) nonNullFT = f.getMessage().getQName();
+                    else __log.debug("Fault " + faultType + " isn't referenced in the service definition, unknown fault.");
+
+                    Message response = odeMex.createMessage(nonNullFT);
+                    response.setMessage(odeMsgEl);
+
+                    odeMex.replyWithFault(faultType, response);
                 } else {
-                            if (__log.isInfoEnabled()) {
-                                __log.info("Response:\n" + DOMUtils.domToString(odeMsgEl));
-                            }
-                    odeMex.reply(response);
+                    if (__log.isWarnEnabled())
+                        __log.warn("Fault response: faultType=(unkown)\n" + reply.getEnvelope().toString());
+                    odeMex.replyWithFailure(FailureType.OTHER, reply.getEnvelope().getBody().getFault().getText(),
+                            OMUtils.toDOM(reply.getEnvelope().getBody()));
                 }
-            } catch (Exception ex) {
-                String errmsg = "Unable to process response: " + ex.getMessage();
-                __log.error(errmsg, ex);
-                odeMex.replyWithFailure(FailureType.OTHER, errmsg, null);
+            } else {
+                Message response = odeMex.createMessage(odeMex.getOperation().getOutput().getMessage().getQName());
+                _converter.parseSoapResponse(response, reply.getEnvelope(), operation);
+                if (__log.isInfoEnabled()) __log.info("Response:\n" + (response.getMessage() != null ?
+                        DOMUtils.domToString(response.getMessage()) : "empty"));
+                odeMex.reply(response);
             }
-
-        } catch (Exception e) {
-            String errmsg = "Error executing reply transaction; reply will be lost.";
-            __log.error(errmsg, e);
+        } catch (Exception ex) {
+            String errmsg = "Unable to process response: " + ex.getMessage();
+            __log.error(errmsg, ex);
+            odeMex.replyWithFailure(FailureType.OTHER, errmsg, null);
         }
+
     }
 
     // INNER CLASS

Modified: ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java
URL: http://svn.apache.org/viewvc/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java?rev=658020&r1=658019&r2=658020&view=diff
==============================================================================
--- ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java (original)
+++ ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java Mon May 19 15:55:12 2008
@@ -301,10 +301,6 @@
         destroyService(serviceName, portName);
         AxisService axisService = ODEAxisService.createService(_axisConfig, pconf, serviceName, portName);
         ODEService odeService = new ODEService(axisService, pconf.getDefinitionForService(serviceName), serviceName, portName, _server);
-        if (_odeConfig.isReplicateEmptyNS()) {
-            __log.debug("Setting service with empty namespace replication");
-            odeService.setReplicateEmptyNS(true);
-        }
 
         _services.put(serviceName, portName, odeService);
 
@@ -332,10 +328,6 @@
             throw new ContextException("Error creating external service.", ex);
         }
 
-        if (_odeConfig.isReplicateEmptyNS()) {
-            __log.debug("Setting external service with empty namespace replication");
-            extService.setReplicateEmptyNS(true);
-        }
         _externalServices.put(serviceName, portName, extService);
         __log.debug("Created external service " + serviceName);
         return extService;

Modified: ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ODEService.java
URL: http://svn.apache.org/viewvc/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ODEService.java?rev=658020&r1=658019&r2=658020&view=diff
==============================================================================
--- ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ODEService.java (original)
+++ ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ODEService.java Mon May 19 15:55:12 2008
@@ -65,7 +65,6 @@
     private QName _serviceName;
     private String _portName;
     private WSAEndpoint _serviceRef;
-    private boolean _isReplicateEmptyNS = false;
     private SoapMessageConverter _converter;
 
     public ODEService(AxisService axisService, Definition def, QName serviceName, String portName, BpelServer server) throws AxisFault {
@@ -75,7 +74,7 @@
         _serviceName = serviceName;
         _portName = portName;
         _serviceRef = EndpointFactory.convertToWSA(createServiceRef(genEPRfromWSDL(_wsdlDef, serviceName, portName)));
-        _converter = new SoapMessageConverter(def, serviceName, portName, _isReplicateEmptyNS);
+        _converter = new SoapMessageConverter(def, serviceName, portName);
 
     }
 
@@ -97,12 +96,9 @@
             }
 
             // Preparing message to send to ODE
-            Element msgEl = DOMUtils.newDocument().createElementNS(null, "message");
-            msgEl.getOwnerDocument().appendChild(msgEl);
-            _converter.parseSoapRequest(msgEl, msgContext.getEnvelope(), odeMex.getOperation());
             Message odeRequest = odeMex.createMessage(odeMex.getOperation().getInput().getMessage().getQName());
+            _converter.parseSoapRequest(odeRequest, msgContext.getEnvelope(), odeMex.getOperation());
             readHeader(msgContext, odeMex);
-            odeRequest.setMessage(msgEl);
 
             if (__log.isDebugEnabled()) {
                 __log.debug("Invoking ODE using MEX " + odeMex);
@@ -162,7 +158,7 @@
                 break;
             case ONEWAY:
             case RESPONSE:
-                _converter.createSoapResponse(msgContext, mex.getResponse().getMessage(), mex.getOperation());
+                _converter.createSoapResponse(msgContext, mex.getResponse(), mex.getOperation());
                 if (__log.isDebugEnabled())
                     __log.debug("Response message " + msgContext.getEnvelope());
                 writeHeader(msgContext, mex);
@@ -293,8 +289,4 @@
 
         return EndpointFactory.createEndpoint(doc.getDocumentElement());
     }
-
-    public void setReplicateEmptyNS(boolean isReplicateEmptyNS) {
-        _isReplicateEmptyNS = isReplicateEmptyNS;
-    }
 }

Modified: ode/trunk/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEAxisService.java
URL: http://svn.apache.org/viewvc/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEAxisService.java?rev=658020&r1=658019&r2=658020&view=diff
==============================================================================
--- ode/trunk/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEAxisService.java (original)
+++ ode/trunk/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEAxisService.java Mon May 19 15:55:12 2008
@@ -94,7 +94,7 @@
                 if (ais != null) {
                     LOG.debug("Configuring service using: "+axis2config.toURL());
                     ConfigurationContext configCtx = new ConfigurationContext(axisConfig);
-                    ServiceBuilder builder = new ServiceBuilder(is, configCtx, axisService);
+                    ServiceBuilder builder = new ServiceBuilder(ais, configCtx, axisService);
                     builder.populateService(builder.buildOM());
                 }
             } catch (FileNotFoundException except) {

Modified: ode/trunk/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEMessageReceiver.java
URL: http://svn.apache.org/viewvc/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEMessageReceiver.java?rev=658020&r1=658019&r2=658020&view=diff
==============================================================================
--- ode/trunk/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEMessageReceiver.java (original)
+++ ode/trunk/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEMessageReceiver.java Mon May 19 15:55:12 2008
@@ -53,9 +53,7 @@
                         + msgContext.getAxisOperation().getName());
                 __log.debug("Reply message " + outMsgContext.getEnvelope());
             }
-            AxisEngine engine = new AxisEngine(msgContext.getOperationContext().getServiceContext()
-                    .getConfigurationContext());
-            engine.send(outMsgContext);
+            AxisEngine.send(outMsgContext);
         } else {
             if (__log.isDebugEnabled())
                 __log.debug("Received one-way message for " + msgContext.getAxisService().getName() + "."