From 07b7dfd1a70ba222b899d9813f8c449dbf3b785f Mon Sep 17 00:00:00 2001 From: lresende Date: Wed, 11 Nov 2009 23:07:28 +0000 Subject: Moving 1.x branches git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835124 13f79535-47bb-0310-9956-ffa450edef68 --- .../bpel/BPELDocumentProcessorTestCase.java | 67 ----------- .../bpel/BPELHelloWorldTestCase.java | 59 ---------- .../bpel/BPELImplementationProcessorTestCase.java | 122 -------------------- .../implementation/bpel/BPELPingPongTestCase.java | 60 ---------- .../sca/implementation/bpel/BPELPingTestCase.java | 63 ---------- .../sca/implementation/bpel/BPELPongTestCase.java | 62 ---------- .../bpel/EmbeddedODEServerTestCase.java | 128 --------------------- .../src/test/resources/helloworld/deploy.xml | 30 ----- .../src/test/resources/helloworld/helloworld.bpel | 66 ----------- .../resources/helloworld/helloworld.componentType | 30 ----- .../test/resources/helloworld/helloworld.composite | 29 ----- .../src/test/resources/helloworld/helloworld.wsdl | 82 ------------- .../src/test/resources/log4j.properties | 33 ------ .../resources/ping-pong/ping-pong.componentType | 36 ------ .../test/resources/ping-pong/ping-pong.composite | 36 ------ .../src/test/resources/ping/deploy.xml | 35 ------ .../src/test/resources/ping/ping.bpel | 124 -------------------- .../src/test/resources/ping/ping.componentType | 36 ------ .../src/test/resources/ping/ping.composite | 29 ----- .../src/test/resources/ping/ping.wsdl | 84 -------------- .../src/test/resources/ping/pong.wsdl | 84 -------------- .../src/test/resources/pong/deploy.xml | 31 ----- .../src/test/resources/pong/pong.bpel | 84 -------------- .../src/test/resources/pong/pong.componentType | 29 ----- .../src/test/resources/pong/pong.composite | 30 ----- .../src/test/resources/pong/pong.wsdl | 93 --------------- 26 files changed, 1562 deletions(-) delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELDocumentProcessorTestCase.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELHelloWorldTestCase.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementationProcessorTestCase.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPingPongTestCase.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPingTestCase.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPongTestCase.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/EmbeddedODEServerTestCase.java delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/deploy.xml delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.bpel delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.componentType delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.composite delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.wsdl delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/log4j.properties delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping-pong/ping-pong.componentType delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping-pong/ping-pong.composite delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/deploy.xml delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.bpel delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.componentType delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.composite delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.wsdl delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/pong.wsdl delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/deploy.xml delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.bpel delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.componentType delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.composite delete mode 100644 branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.wsdl (limited to 'branches/sca-java-1.1/modules/implementation-bpel/src/test') diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELDocumentProcessorTestCase.java b/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELDocumentProcessorTestCase.java deleted file mode 100644 index 6aba1f27d9..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELDocumentProcessorTestCase.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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.tuscany.sca.implementation.bpel; - -import java.net.URI; -import java.net.URL; - -import javax.xml.namespace.QName; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.assembly.DefaultAssemblyFactory; -import org.apache.tuscany.sca.contribution.DefaultModelFactoryExtensionPoint; -import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; -import org.apache.tuscany.sca.implementation.bpel.impl.BPELDocumentProcessor; -import org.apache.tuscany.sca.interfacedef.wsdl.DefaultWSDLFactory; - -/** - * @version $Rev$ $Date$ - */ -public class BPELDocumentProcessorTestCase extends TestCase { - - protected static final String BPEL_PROCESS_FILE = "helloworld/helloworld.bpel"; - - private ModelFactoryExtensionPoint modelFactories; - - @Override - protected void setUp() throws Exception { - super.setUp(); - - modelFactories = new DefaultModelFactoryExtensionPoint(); - modelFactories.addFactory(new DefaultAssemblyFactory()); - modelFactories.addFactory(new DefaultWSDLFactory()); - - BPELFactory bpelFactory = new DefaultBPELFactory(modelFactories); - modelFactories.addFactory(bpelFactory); - } - - public void testLoadBPELProcessDefinition() throws Exception { - BPELDocumentProcessor bpelDocumentProcessor = new BPELDocumentProcessor(modelFactories); - - URI processURI = getClass().getClassLoader().getResource(BPEL_PROCESS_FILE).toURI(); - URL processLocation = getClass().getClassLoader().getResource(BPEL_PROCESS_FILE); - BPELProcessDefinition bpelProcessDefinition = bpelDocumentProcessor.read(null, processURI, processLocation); - - assertNotNull(bpelProcessDefinition); - assertEquals(new QName("http://tuscany.apache.org/implementation/bpel/example/helloworld", "HelloWorld"), bpelProcessDefinition.getName()); - assertEquals(processLocation, bpelProcessDefinition.getLocation()); - } -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELHelloWorldTestCase.java b/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELHelloWorldTestCase.java deleted file mode 100644 index 208af4ca2f..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELHelloWorldTestCase.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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.tuscany.sca.implementation.bpel; - -import junit.framework.TestCase; - -import org.apache.tuscany.implementation.bpel.example.helloworld.HelloPortType; -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * Tests the BPEL service - * - * @version $Rev$ $Date$ - */ -public class BPELHelloWorldTestCase extends TestCase { - - private SCADomain scaDomain; - HelloPortType bpelService = null; - - /** - * @throws java.lang.Exception - */ - @Override - protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance("helloworld/helloworld.composite"); - bpelService = scaDomain.getService(HelloPortType.class, "BPELHelloWorldComponent"); - - } - - /** - * @throws java.lang.Exception - */ - @Override - protected void tearDown() throws Exception { - scaDomain.close(); - } - - public void testInvoke() { - String response = bpelService.hello("Hello"); - assertEquals("Hello World", response); - } -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementationProcessorTestCase.java b/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementationProcessorTestCase.java deleted file mode 100644 index b52a75012f..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementationProcessorTestCase.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * 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.tuscany.sca.implementation.bpel; - -import java.io.StringReader; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamConstants; -import javax.xml.stream.XMLStreamReader; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.assembly.AssemblyFactory; -import org.apache.tuscany.sca.assembly.DefaultAssemblyFactory; -import org.apache.tuscany.sca.assembly.xml.Constants; -import org.apache.tuscany.sca.contribution.DefaultModelFactoryExtensionPoint; -import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; -import org.apache.tuscany.sca.implementation.bpel.impl.BPELImplementationProcessor; -import org.apache.tuscany.sca.interfacedef.java.DefaultJavaInterfaceFactory; -import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory; - -/** - * @version $Rev$ $Date$ - */ -public class BPELImplementationProcessorTestCase extends TestCase { - - protected static final QName IMPLEMENTATION_BPEL = new QName(Constants.SCA10_NS, "implementation.bpel"); - - private static final String COMPOSITE = - "" - + "" - + " " - + " " - + ""; - - private static final String COMPOSITE_INVALID = - "" - + "" - + " " - + " " - + ""; - - private XMLInputFactory xmlFactory; - private ModelFactoryExtensionPoint modelFactories; - - @Override - protected void setUp() throws Exception { - super.setUp(); - xmlFactory = XMLInputFactory.newInstance(); - - modelFactories = new DefaultModelFactoryExtensionPoint(); - AssemblyFactory assemblyFactory = new DefaultAssemblyFactory(); - modelFactories.addFactory(assemblyFactory); - JavaInterfaceFactory javaFactory = new DefaultJavaInterfaceFactory(); - modelFactories.addFactory(javaFactory); - } - - /** - * Test parsing valid composite definition. Valid coposite populated with correct values expected. - * @throws Exception - */ - public void testLoadValidComposite() throws Exception { - XMLStreamReader reader = xmlFactory.createXMLStreamReader(new StringReader(COMPOSITE)); - - BPELImplementationProcessor bpelProcessor = new BPELImplementationProcessor(modelFactories); - - while(true) { - int event = reader.next(); - if(event == XMLStreamConstants.START_ELEMENT && IMPLEMENTATION_BPEL.equals(reader.getName())) { - break; - } - } - - BPELImplementation implementation = bpelProcessor.read(reader); - - assertNotNull(implementation); - assertEquals(new QName("http://tuscany.apache.org/implementation/bpel/example/helloworld", "HelloWorld"), implementation.getProcess()); - } - - /** - * Test parsing invalid composite definition. Exception should be thrown - * @throws Exception - */ - public void testLoadInvalidComposite() throws Exception { - XMLStreamReader reader = xmlFactory.createXMLStreamReader(new StringReader(COMPOSITE_INVALID)); - - BPELImplementationProcessor bpelProcessor = new BPELImplementationProcessor(modelFactories); - - while(true) { - int event = reader.next(); - if(event == XMLStreamConstants.START_ELEMENT && IMPLEMENTATION_BPEL.equals(reader.getName())) { - break; - } - } - - try { - bpelProcessor.read(reader); - - fail("InvalidException should have been thrown"); - } catch(Exception e) { - assertTrue(true); - } - } -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPingPongTestCase.java b/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPingPongTestCase.java deleted file mode 100644 index 1ab2ba3d5d..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPingPongTestCase.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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.tuscany.sca.implementation.bpel; - -import junit.framework.TestCase; - -import org.apache.tuscany.implementation.bpel.example.ping.PingPortType; -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * Tests the BPEL service - * - * @version $Rev$ $Date$ - */ -public class BPELPingPongTestCase extends TestCase { - - private SCADomain scaDomain; - PingPortType bpelPing = null; - - /** - * @throws java.lang.Exception - */ - @Override - protected void setUp() throws Exception { - //scaDomain = SCADomain.newInstance("ping-pong/ping-pong.composite"); - //bpelPing = scaDomain.getService(PingPortType.class, "BPELPingPong-PingComponent/PingService"); - } - - /** - * @throws java.lang.Exception - */ - @Override - protected void tearDown() throws Exception { - //scaDomain.close(); - } - - public void testPing() { - //String response = bpelPing.Ping("Ping"); - //System.out.println("response:" + response); - //assertNotNull(response); - // assertEquals("Hello World", response); - } -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPingTestCase.java b/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPingTestCase.java deleted file mode 100644 index 34f82318a3..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPingTestCase.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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.tuscany.sca.implementation.bpel; - -import junit.framework.TestCase; - -import org.apache.tuscany.implementation.bpel.example.ping.PingPortType; -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * Tests the BPEL service - * - * @version $Rev$ $Date$ - */ -public class BPELPingTestCase extends TestCase { - - private SCADomain scaDomain; - PingPortType bpelService = null; - - /** - * @throws java.lang.Exception - */ - @Override - protected void setUp() throws Exception { - //scaDomain = SCADomain.newInstance("ping/ping.composite"); - //bpelService = scaDomain.getService(PingPortType.class, "BPELPingComponent"); - - } - - /** - * @throws java.lang.Exception - */ - @Override - protected void tearDown() throws Exception { - //scaDomain.close(); - } - - public void testInvoke() { - /* - String response = bpelService.Ping("Ping"); - System.out.println("response:" + response); - assertNotNull(response); - */ - // assertEquals("Hello World", response); - } -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPongTestCase.java b/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPongTestCase.java deleted file mode 100644 index 313bd66850..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPongTestCase.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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.tuscany.sca.implementation.bpel; - -import junit.framework.TestCase; - -import org.apache.tuscany.implementation.bpel.example.pong.PongPortType; -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * Tests the BPEL service - * - * @version $Rev$ $Date$ - */ -public class BPELPongTestCase extends TestCase { - - private SCADomain scaDomain; - PongPortType bpelService = null; - - /** - * @throws java.lang.Exception - */ - @Override - protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance("pong/pong.composite"); - bpelService = scaDomain.getService(PongPortType.class, "BPELPongComponent"); - - } - - /** - * @throws java.lang.Exception - */ - @Override - protected void tearDown() throws Exception { - scaDomain.close(); - } - - public void testInvoke() { - String response = bpelService.Pong("Pong"); - System.out.println("response:" + response); - assertNotNull(response); - - // assertEquals("Hello World", response); - } -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/EmbeddedODEServerTestCase.java b/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/EmbeddedODEServerTestCase.java deleted file mode 100644 index 29f5cb74fc..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/EmbeddedODEServerTestCase.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * 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.tuscany.sca.implementation.bpel; - -import java.io.File; -import java.net.URL; -import java.util.concurrent.Future; - -import javax.transaction.TransactionManager; -import javax.xml.namespace.QName; - -import junit.framework.TestCase; - -import org.apache.ode.bpel.iapi.Message; -import org.apache.ode.bpel.iapi.MyRoleMessageExchange; -import org.apache.ode.bpel.iapi.MessageExchange.Status; -import org.apache.ode.utils.DOMUtils; -import org.apache.ode.utils.GUID; -import org.apache.tuscany.sca.implementation.bpel.ode.EmbeddedODEServer; -import org.apache.tuscany.sca.implementation.bpel.ode.GeronimoTxFactory; -import org.apache.tuscany.sca.implementation.bpel.ode.ODEDeployment; -import org.w3c.dom.Element; - -/** - * Test to Deploy and Invoke a HelloWorld BPEL process using EmbeddedODEServer - * - * @version $Rev$ $Date$ - */ -public class EmbeddedODEServerTestCase extends TestCase { - - private EmbeddedODEServer odeServer; - - private TransactionManager txMgr; - - @Override - protected void setUp() throws Exception { - GeronimoTxFactory txFactory = new GeronimoTxFactory(); - txMgr = txFactory.getTransactionManager(); - - this.odeServer = new EmbeddedODEServer(txMgr); - odeServer.init(); - } - - @Override - protected void tearDown() throws Exception { - odeServer.stop(); - } - - public void testProcessInvocation() throws Exception { - if (!odeServer.isInitialized()) { - fail("Server did not start !"); - } - - URL deployURL = getClass().getClassLoader().getResource("helloworld/deploy.xml"); - File deploymentDir = new File(deployURL.toURI().getPath()).getParentFile(); - System.out.println("Deploying : " + deploymentDir.toString()); - System.out.println(deploymentDir); - if (odeServer.isInitialized()) { - try { - txMgr.begin(); - odeServer.deploy(new ODEDeployment(deploymentDir)); - txMgr.commit(); - } catch (Exception e) { - e.printStackTrace(); - txMgr.rollback(); - } - - // transaction one - MyRoleMessageExchange mex = null; - Future onhold = null; - try { - // invoke the process - txMgr.begin(); - mex = odeServer.getBpelServer().getEngine().createMessageExchange(new GUID().toString(), - new QName("http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl", "HelloService"), "hello"); - - Message request = mex.createMessage(new QName("", "")); - request.setMessage(DOMUtils.stringToDOM("Hello")); - onhold = mex.invoke(request); - txMgr.commit(); - } catch (Exception e) { - e.printStackTrace(); - txMgr.rollback(); - } - // - end of transaction one - - // Waiting until the reply is ready in case the engine needs to continue in a different thread - if (onhold != null) - onhold.get(); - - // transaction two - try { - txMgr.begin(); - // Reloading the mex in the current transaction, otherwise we can't be sure we have - // the "freshest" one. - mex = (MyRoleMessageExchange) odeServer.getBpelServer().getEngine().getMessageExchange(mex.getMessageExchangeId()); - - Status status = mex.getStatus(); - System.out.println("Status: " + status.name()); - Element response = mex.getResponse().getMessage(); - System.out.println("Response: " + DOMUtils.domToString(response)); - txMgr.commit(); - // end of transaction two - } catch (Exception e) { - e.printStackTrace(); - txMgr.rollback(); - } - } - } - -} diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/deploy.xml b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/deploy.xml deleted file mode 100644 index 571aa37d58..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/deploy.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - true - - - - - diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.bpel b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.bpel deleted file mode 100644 index 8cf91adc2c..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.bpel +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - concat($tmpVar,' World') - - - - - - diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.componentType b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.componentType deleted file mode 100644 index 121064a475..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.componentType +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.composite b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.composite deleted file mode 100644 index 3593448c6c..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.wsdl b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.wsdl deleted file mode 100644 index 1d71727b2d..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.wsdl +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/log4j.properties b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/log4j.properties deleted file mode 100644 index 01bf8d8bf5..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/log4j.properties +++ /dev/null @@ -1,33 +0,0 @@ -# -# 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. -# - -# Set root logger level to WARN and its only appender to CONSOLE -log4j.rootLogger=OFF, CONSOLE - -# log4j properties to work with commandline tools. -log4j.category.org.mortbay=OFF -log4j.category.org.hibernate.type=OFF -log4j.category.org.objectweb=OFF -log4j.category.org.apache.ode.axis2=OFF -log4j.category.org.apache.ode.bpel.engine=OFF -log4j.category.org.apache.ode.daohib.bpel.CorrelatorDaoImpl=OFF -log4j.category.org.apache.ode.bpel.epr=OFF - -# Console appender -log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender -log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout -log4j.appender.CONSOLE.layout.ConversionPattern=%p - %C{1}.%M(%L) | %m%n diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping-pong/ping-pong.componentType b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping-pong/ping-pong.componentType deleted file mode 100644 index e4cbdfe89c..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping-pong/ping-pong.componentType +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping-pong/ping-pong.composite b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping-pong/ping-pong.composite deleted file mode 100644 index a0eb4d0b5b..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping-pong/ping-pong.composite +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/deploy.xml b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/deploy.xml deleted file mode 100644 index 613ed9c491..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/deploy.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - true - - - - - - - - - diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.bpel b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.bpel deleted file mode 100644 index abda9e58d2..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.bpel +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - concat($pingRequest.body/ping:text, ' ping') - - - - - - - - - - - - $pongRequest.body - - - - $text - $pongRequest.body/pong:text - - - - - - - - $pongResponse.body/pong:text - $text - - - - - - - - - - - $pingResponse.body - - - - $text - $pingResponse.body/ping:text - - - - - - diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.componentType b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.componentType deleted file mode 100644 index 7598a99d16..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.componentType +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.composite b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.composite deleted file mode 100644 index 75eed03022..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.wsdl b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.wsdl deleted file mode 100644 index 03e54c4de8..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.wsdl +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/pong.wsdl b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/pong.wsdl deleted file mode 100644 index 1f4c4a9aaa..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/pong.wsdl +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/deploy.xml b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/deploy.xml deleted file mode 100644 index 1315ef47f0..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/deploy.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - true - - - - - - diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.bpel b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.bpel deleted file mode 100644 index b5d84898c7..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.bpel +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - concat($pongRequest.body/pong:text, ' pong') - $text - - - - - - - - - - - $pongResponse.body - - - - $text - $pongResponse.body/pong:text - - - - - - diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.componentType b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.componentType deleted file mode 100644 index 2f8fd5d3de..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.componentType +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.composite b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.composite deleted file mode 100644 index e40ce7ee45..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.composite +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.wsdl b/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.wsdl deleted file mode 100644 index 21ee8b82f6..0000000000 --- a/branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.wsdl +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.3