summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.1/modules/implementation-bpel/src
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-11-11 23:07:28 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-11-11 23:07:28 +0000
commit07b7dfd1a70ba222b899d9813f8c449dbf3b785f (patch)
treeecfc876747e6cfedee0a8533d87c19ac78a2dbd0 /branches/sca-java-1.1/modules/implementation-bpel/src
parent6fadbc9cd1fcf03d0b3630f772d91df149b70428 (diff)
Moving 1.x branches
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835124 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.1/modules/implementation-bpel/src')
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELFactory.java41
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementation.java54
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELProcessDefinition.java71
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/DefaultBPELFactory.java53
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELDocumentProcessor.java133
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationImpl.java110
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationProcessor.java207
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELProcessDefinitionImpl.java110
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/ODEProcessException.java42
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java240
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/GeronimoTxFactory.java48
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEBindingContext.java63
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEDeployment.java43
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEDeploymentException.java41
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEInitializationException.java41
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEMessageExchangeContext.java46
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEShutdownException.java41
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELImplementationProvider.java121
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELImplementationProviderFactory.java61
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELInvoker.java214
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor19
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor19
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.implementation.bpel.BPELFactory18
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory19
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELDocumentProcessorTestCase.java67
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELHelloWorldTestCase.java59
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementationProcessorTestCase.java122
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPingPongTestCase.java60
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPingTestCase.java63
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELPongTestCase.java62
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/EmbeddedODEServerTestCase.java128
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/deploy.xml30
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.bpel66
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.componentType30
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.composite29
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.wsdl82
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/log4j.properties33
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping-pong/ping-pong.componentType36
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping-pong/ping-pong.composite36
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/deploy.xml35
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.bpel124
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.componentType36
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.composite29
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/ping.wsdl84
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/ping/pong.wsdl84
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/deploy.xml31
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.bpel84
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.componentType29
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.composite30
-rw-r--r--branches/sca-java-1.1/modules/implementation-bpel/src/test/resources/pong/pong.wsdl93
50 files changed, 0 insertions, 3417 deletions
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELFactory.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELFactory.java
deleted file mode 100644
index 2fb422c1b5..0000000000
--- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELFactory.java
+++ /dev/null
@@ -1,41 +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;
-
-/**
- * A factory for the BPEL implementation model.
- *
- * @version $Rev$ $Date$
- */
-public interface BPELFactory {
-
- /**
- * Creates a new BPEL implementation.
- *
- * @return
- */
- BPELImplementation createBPELImplementation();
-
- /**
- * Creates a new BPEL Process Definition
- * @return
- */
- BPELProcessDefinition createBPELProcessDefinition();
-}
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementation.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementation.java
deleted file mode 100644
index e18fabc484..0000000000
--- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementation.java
+++ /dev/null
@@ -1,54 +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 javax.xml.namespace.QName;
-
-import org.apache.tuscany.sca.assembly.Implementation;
-
-/**
- * The model representing the BPEL implementation in an SCA assembly model.
- *
- * @version $Rev$ $Date$
- */
-public interface BPELImplementation extends Implementation {
-
- /**
- * Get the BPEL process Name
- */
- QName getProcess();
-
- /**
- * Set the BPEL process Name
- * @param processName process QName
- */
- void setProcess(QName processName);
-
- /**
- * Get the BPEL process definition
- * @return
- */
- BPELProcessDefinition getProcessDefinition();
-
- /**
- * Set the BPEL process definition
- * @param processDefinition
- */
- void setProcessDefinition(BPELProcessDefinition processDefinition);
-}
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELProcessDefinition.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELProcessDefinition.java
deleted file mode 100644
index 3ff9e5fb06..0000000000
--- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELProcessDefinition.java
+++ /dev/null
@@ -1,71 +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 org.apache.tuscany.sca.assembly.Base;
-
-
-/**
- * The BPEL process definition.
- *
- * @version $Rev$ $Date$
- */
-public interface BPELProcessDefinition extends Base {
-
- /**
- * Get the BPEL process Name
- */
- public QName getName();
-
- /**
- * Set the BPEL process Name
- * @param processName process QName
- */
- public void setName(QName name);
-
- /**
- * Get BPEL process URI
- * @return uri for the process
- */
- public URI getURI();
-
- /**
- * Set the BPEL process URI
- * @param uri for the process
- */
- public void setURI(URI uri);
-
- /**
- * Get the URL for the process location
- * @return
- */
- URL getLocation();
-
- /**
- * Set the URL for the process location
- * @param url
- */
- void setLocation(URL location);
-}
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/DefaultBPELFactory.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/DefaultBPELFactory.java
deleted file mode 100644
index a0e9fd9c06..0000000000
--- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/DefaultBPELFactory.java
+++ /dev/null
@@ -1,53 +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 org.apache.tuscany.sca.assembly.AssemblyFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.implementation.bpel.impl.BPELImplementationImpl;
-import org.apache.tuscany.sca.implementation.bpel.impl.BPELProcessDefinitionImpl;
-import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory;
-
-/**
- * A default factory for the BPEL implementation model.
- *
- * @version $Rev$ $Date$
- */
-public class DefaultBPELFactory implements BPELFactory {
-
- private AssemblyFactory assemblyFactory;
- private WSDLFactory wsdlFactory;
-
- public DefaultBPELFactory(ModelFactoryExtensionPoint modelFactories) {
- this.assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
- this.wsdlFactory = modelFactories.getFactory(WSDLFactory.class);
- }
-
- public BPELImplementation createBPELImplementation() {
- return new BPELImplementationImpl(assemblyFactory, wsdlFactory);
- }
-
- public BPELProcessDefinition createBPELProcessDefinition() {
- return new BPELProcessDefinitionImpl();
- }
-
-
-
-}
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELDocumentProcessor.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELDocumentProcessor.java
deleted file mode 100644
index 8f25f63ff8..0000000000
--- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELDocumentProcessor.java
+++ /dev/null
@@ -1,133 +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.impl;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
-import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
-import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
-import org.apache.tuscany.sca.contribution.service.ContributionReadException;
-import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
-import org.apache.tuscany.sca.implementation.bpel.BPELFactory;
-import org.apache.tuscany.sca.implementation.bpel.BPELProcessDefinition;
-
-/**
- * BPEL document processor responsible for reading a BPEL file and producing necessary model info about it
- *
- * @version $Rev$ $Date$
- */
-public class BPELDocumentProcessor extends BaseStAXArtifactProcessor implements URLArtifactProcessor<BPELProcessDefinition> {
- public final static QName BPEL_PROCESS_DEFINITION = new QName("http://schemas.xmlsoap.org/ws/2004/03/business-process/", "process");
- public final static QName BPEL_EXECUTABLE_DEFINITION = new QName("http://docs.oasis-open.org/wsbpel/2.0/process/executable", "process");
- public final static String NAME_ELEMENT = "name";
-
- private final static XMLInputFactory inputFactory = XMLInputFactory.newInstance();
-
- private final BPELFactory factory;
-
- public BPELDocumentProcessor(ModelFactoryExtensionPoint modelFactories) {
- this.factory = modelFactories.getFactory(BPELFactory.class);
- }
-
- public String getArtifactType() {
- return "*.bpel";
- }
-
- public Class<BPELProcessDefinition> getModelType() {
- return BPELProcessDefinition.class;
- }
-
- public BPELProcessDefinition read(URL contributionURL, URI artifactURI, URL artifactURL) throws ContributionReadException {
- BPELProcessDefinition processDefinition = null;
- try {
- //for now we are just using process name
- //and relying on componentType file for service definition
- //so it's ok to set resolved for now
- processDefinition = indexRead(artifactURL);
- processDefinition.setURI(artifactURI);
- processDefinition.setUnresolved(false);
- } catch (Exception e) {
- throw new ContributionReadException(e);
- }
-
- return processDefinition;
- }
-
-
- public void resolve(BPELProcessDefinition model, ModelResolver resolver) throws ContributionResolveException {
-
- }
-
- /**
- * Read the namespace for the WSDL definition and inline schemas
- *
- * @param doc
- * @return
- * @throws IOException
- * @throws XMLStreamException
- */
- protected BPELProcessDefinition indexRead(URL doc) throws Exception {
- BPELProcessDefinition processDefinition = factory.createBPELProcessDefinition();
- processDefinition.setUnresolved(true);
- processDefinition.setLocation(doc);
-
- InputStream is = doc.openStream();
- XMLStreamReader reader = null;
- try {
- reader = inputFactory.createXMLStreamReader(is);
- int eventType = reader.getEventType();
- while (true) {
- if (eventType == XMLStreamConstants.START_ELEMENT) {
- QName elementName = reader.getName();
- if (BPEL_PROCESS_DEFINITION.equals(elementName) || BPEL_EXECUTABLE_DEFINITION.equals(elementName) ) {
- QName processName = new QName(getString(reader, org.apache.tuscany.sca.assembly.xml.Constants.TARGET_NAMESPACE), getString(reader, NAME_ELEMENT));
- processDefinition.setName(processName);
- break;
- }
- }
- if (reader.hasNext()) {
- eventType = reader.next();
- } else {
- break;
- }
- }
- } finally {
- if(reader != null) {
- reader.close();
- }
- is.close();
- }
-
- return processDefinition;
- }
-
-
-}
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationImpl.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationImpl.java
deleted file mode 100644
index 9ec248cabe..0000000000
--- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationImpl.java
+++ /dev/null
@@ -1,110 +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.impl;
-
-import java.util.Collections;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import org.apache.tuscany.sca.assembly.AssemblyFactory;
-import org.apache.tuscany.sca.assembly.ConstrainingType;
-import org.apache.tuscany.sca.assembly.Property;
-import org.apache.tuscany.sca.assembly.impl.ComponentTypeImpl;
-import org.apache.tuscany.sca.implementation.bpel.BPELImplementation;
-import org.apache.tuscany.sca.implementation.bpel.BPELProcessDefinition;
-import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory;
-
-/**
- * The model representing a BPEL implementation in an SCA assembly model.
- *
- * @version $Rev$ $Date$
- */
-public class BPELImplementationImpl extends ComponentTypeImpl implements BPELImplementation {
-
- private QName _processName;
- private BPELProcessDefinition _processDefinition;
-
- /**
- * Constructs a new BPEL implementation.
- */
- public BPELImplementationImpl(AssemblyFactory assemblyFactory,
- WSDLFactory wsdlFactory) {
-
- }
-
- public QName getProcess() {
- return _processName;
- }
-
- public void setProcess(QName processName) {
- _processName = processName;
- }
-
- public BPELProcessDefinition getProcessDefinition() {
- return this._processDefinition;
- }
-
- public void setProcessDefinition(BPELProcessDefinition processDefinition) {
- this._processDefinition = processDefinition;
- }
-
- @Override
- public String getURI() {
- // The sample BPEL implementation does not have a URI
- return null;
- }
-
- @Override
- public void setURI(String uri) {
- // The sample BPEL implementation does not have a URI
- }
-
- @Override
- public ConstrainingType getConstrainingType() {
- // The sample BPEL implementation does not support constrainingTypes
- return null;
- }
-
- @Override
- public List<Property> getProperties() {
- // The sample BPEL implementation does not support properties
- return Collections.emptyList();
- }
-
- @Override
- public int hashCode() {
- return String.valueOf(this.getProcess()).hashCode();
- }
-
- @Override
- public boolean equals(Object obj) {
- if (obj == this) {
- return true;
- } else if (obj instanceof BPELImplementation) {
- if (getProcess() != null) {
- return getProcess().equals(((BPELImplementation)obj).getProcess());
- } else {
- return ((BPELImplementation)obj).getProcess() == null;
- }
- } else {
- return false;
- }
- }
-}
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationProcessor.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationProcessor.java
deleted file mode 100644
index efc329af82..0000000000
--- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationProcessor.java
+++ /dev/null
@@ -1,207 +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.impl;
-
-import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
-import org.apache.tuscany.sca.assembly.AssemblyFactory;
-import org.apache.tuscany.sca.assembly.ComponentType;
-import org.apache.tuscany.sca.assembly.Property;
-import org.apache.tuscany.sca.assembly.Reference;
-import org.apache.tuscany.sca.assembly.Service;
-import org.apache.tuscany.sca.assembly.xml.Constants;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
-import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
-import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
-import org.apache.tuscany.sca.contribution.service.ContributionReadException;
-import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
-import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
-import org.apache.tuscany.sca.databinding.xml.DOMDataBinding;
-import org.apache.tuscany.sca.implementation.bpel.BPELFactory;
-import org.apache.tuscany.sca.implementation.bpel.BPELImplementation;
-import org.apache.tuscany.sca.implementation.bpel.BPELProcessDefinition;
-import org.apache.tuscany.sca.implementation.bpel.DefaultBPELFactory;
-
-/**
- * Implements a STAX artifact processor for BPEL implementations.
- *
- * The artifact processor is responsible for processing <implementation.bpel>
- * elements in SCA assembly XML composite files and populating the BPEL
- * implementation model, resolving its references to other artifacts in the SCA
- * contribution, and optionally write the model back to SCA assembly XML.
- *
- * @version $Rev$ $Date$
- */
-public class BPELImplementationProcessor extends BaseStAXArtifactProcessor implements StAXArtifactProcessor<BPELImplementation> {
- private static final QName IMPLEMENTATION_BPEL = new QName(Constants.SCA10_NS, "implementation.bpel");
-
- private AssemblyFactory assemblyFactory;
- private BPELFactory bpelFactory;
-
- public BPELImplementationProcessor(ModelFactoryExtensionPoint modelFactories) {
- this.assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
- this.bpelFactory = new DefaultBPELFactory(modelFactories);
- }
-
- public QName getArtifactType() {
- // Returns the qname of the XML element processed by this processor
- return IMPLEMENTATION_BPEL;
- }
-
- public Class<BPELImplementation> getModelType() {
- // Returns the type of model processed by this processor
- return BPELImplementation.class;
- }
-
- public BPELImplementation read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
- assert IMPLEMENTATION_BPEL.equals(reader.getName());
-
- // Read an <implementation.bpel> element
-
- // Read the process attribute.
- QName process = getAttributeValueNS(reader, "process");
-
-
- // Create an initialize the BPEL implementation model
- BPELImplementation implementation = bpelFactory.createBPELImplementation();
- implementation.setProcess(process);
- implementation.setUnresolved(true);
-
- // Skip to end element
- while (reader.hasNext()) {
- if (reader.next() == END_ELEMENT && IMPLEMENTATION_BPEL.equals(reader.getName())) {
- break;
- }
- }
-
- return implementation;
- }
-
- public void resolve(BPELImplementation impl, ModelResolver resolver) throws ContributionResolveException {
- if( impl != null && impl.isUnresolved()) {
- BPELProcessDefinition processDefinition = resolveBPELProcessDefinition(impl, resolver);
- if(processDefinition.isUnresolved()) {
- throw new ContributionResolveException("Can't find BPEL Process : " + processDefinition.getName());
- }
-
- impl.setProcessDefinition(processDefinition);
-
- //resolve component type
- mergeComponentType(resolver, impl);
-
- //set current implementation resolved
- impl.setUnresolved(false);
- }
-
- }
-
- public void write(BPELImplementation model, XMLStreamWriter outputSource) throws ContributionWriteException {
- //FIXME Implement
- }
-
- private BPELProcessDefinition resolveBPELProcessDefinition(BPELImplementation impl, ModelResolver resolver) throws ContributionResolveException {
- QName processName = impl.getProcess();
- BPELProcessDefinition processDefinition = this.bpelFactory.createBPELProcessDefinition();
- processDefinition.setName(processName);
- processDefinition.setUnresolved(true);
-
- return resolver.resolveModel(BPELProcessDefinition.class, processDefinition);
- }
-
-
- /**
- * Merge the componentType from introspection and external file
- * @param resolver
- * @param impl
- */
- private void mergeComponentType(ModelResolver resolver, BPELImplementation impl) {
- // FIXME: Need to clarify how to merge
- ComponentType componentType = getComponentType(resolver, impl);
- if (componentType != null && !componentType.isUnresolved()) {
-
- Map<String, Reference> refMap = new HashMap<String, Reference>();
- for (Reference ref : impl.getReferences()) {
- refMap.put(ref.getName(), ref);
- }
- for (Reference reference : componentType.getReferences()) {
- refMap.put(reference.getName(), reference);
- }
- impl.getReferences().clear();
- impl.getReferences().addAll(refMap.values());
-
- Map<String, Service> serviceMap = new HashMap<String, Service>();
- for (Service svc : impl.getServices()) {
- if(svc != null) {
- serviceMap.put(svc.getName(), svc);
- }
- }
- for (Service service : componentType.getServices()) {
- //set default dataBinding to DOM
- service.getInterfaceContract().getInterface().resetDataBinding(DOMDataBinding.NAME);
-
- serviceMap.put(service.getName(), service);
- }
- impl.getServices().clear();
- impl.getServices().addAll(serviceMap.values());
-
- Map<String, Property> propMap = new HashMap<String, Property>();
- for (Property prop : impl.getProperties()) {
- propMap.put(prop.getName(), prop);
- }
- }
- }
-
-
- private ComponentType getComponentType(ModelResolver resolver, BPELImplementation impl) {
- String bpelProcessURI = impl.getProcessDefinition().getURI().toString();
- String componentTypeURI = bpelProcessURI.replace(".bpel", ".componentType");
- ComponentType componentType = assemblyFactory.createComponentType();
- componentType.setUnresolved(true);
- componentType.setURI(componentTypeURI);
- componentType = resolver.resolveModel(ComponentType.class, componentType);
- if (!componentType.isUnresolved()) {
- return componentType;
- }
- return null;
- }
-
- private QName getAttributeValueNS(XMLStreamReader reader, String attribute) {
- String fullValue = reader.getAttributeValue(null, "process");
- if (fullValue.indexOf(":") < 0)
- throw new ODEProcessException("Attribute " + attribute + " with value " + fullValue +
- " in your composite should be prefixed (process=\"prefix:name\").");
- String prefix = fullValue.substring(0, fullValue.indexOf(":"));
- String name = fullValue.substring(fullValue.indexOf(":") + 1);
- String nsUri = reader.getNamespaceContext().getNamespaceURI(prefix);
- if (nsUri == null)
- throw new ODEProcessException("Attribute " + attribute + " with value " + fullValue +
- " in your composite has un unrecognized namespace prefix.");
- return new QName(nsUri, name, prefix);
- }
-
-}
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELProcessDefinitionImpl.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELProcessDefinitionImpl.java
deleted file mode 100644
index 98405c3489..0000000000
--- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELProcessDefinitionImpl.java
+++ /dev/null
@@ -1,110 +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.impl;
-
-import java.net.URI;
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-
-import org.apache.tuscany.sca.implementation.bpel.BPELProcessDefinition;
-
-/**
- * The BPEL process definition implementation.
- *
- * @version $Rev$ $Date$
- */
-public class BPELProcessDefinitionImpl implements BPELProcessDefinition {
- private QName name;
- private URI uri;
- private URL location;
- private boolean unresolved;
-
- public QName getName() {
- return name;
- }
-
- public void setName(QName name) {
- this.name = name;
- }
-
- public URI getURI() {
- return uri;
- }
-
- public void setURI(URI uri) {
- this.uri = uri;
- }
-
- public URL getLocation() {
- return location;
- }
-
- public void setLocation(URL location) {
- this.location = location;
- }
-
- public boolean isUnresolved() {
- return unresolved;
- }
-
- public void setUnresolved(boolean undefined) {
- this.unresolved = undefined;
- }
-
- public void compile() {
- /*
- String bpelFile = reader.getAttributeValue(null, "file"); // FIXME:
-
- // Resolving the BPEL file and compiling it
- URL bpelURL = getClass().getClassLoader().getResource(bpelFile);
- if (bpelURL == null)
- throw new ODEProcessException("Couldn't find referenced bpel file " + bpelFile);
- BpelC bpelc = BpelC.newBpelCompiler();
- ByteArrayOutputStream compiledProcess = new ByteArrayOutputStream();
- bpelc.setOutputStream(compiledProcess);
- try {
- bpelc.compile(new File(bpelURL.getFile()));
- } catch (IOException e) {
- e.printStackTrace();
- }
- */
- }
-
- @Override
- public int hashCode() {
- return String.valueOf(getName()).hashCode();
- }
-
- @Override
- public boolean equals(Object obj) {
- if (obj == this) {
- return true;
- } else if (obj instanceof BPELProcessDefinition) {
- if (getName() != null) {
- return getName().equals(((BPELProcessDefinition)obj).getName());
- } else {
- return ((BPELProcessDefinition)obj).getName() == null;
- }
- } else {
- return false;
- }
- }
-}
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/ODEProcessException.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/ODEProcessException.java
deleted file mode 100644
index 017e3d85ef..0000000000
--- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/ODEProcessException.java
+++ /dev/null
@@ -1,42 +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.impl;
-
-/**
- * Thrown when a process can't be compiled properly or when its descriptors
- * are invalid.
- *
- * @version $Rev$ $Date$
- */
-public class ODEProcessException extends RuntimeException {
- private static final long serialVersionUID = 1047893235216756186L;
-
- public ODEProcessException(String message) {
- super(message);
- }
-
- public ODEProcessException(String message, Throwable cause) {
- super(message, cause);
- }
-
- public ODEProcessException(Throwable cause) {
- super(cause);
- }
-}
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java
deleted file mode 100644
index 700fdddf9b..0000000000
--- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java
+++ /dev/null
@@ -1,240 +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.ode;
-
-import java.io.File;
-import java.net.URL;
-import java.util.Collection;
-import java.util.Properties;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-import javax.transaction.TransactionManager;
-import javax.xml.namespace.QName;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.ode.bpel.dao.BpelDAOConnectionFactoryJDBC;
-import org.apache.ode.bpel.engine.BpelServerImpl;
-import org.apache.ode.bpel.engine.CountLRUDehydrationPolicy;
-import org.apache.ode.bpel.iapi.ProcessConf;
-import org.apache.ode.bpel.iapi.ProcessStore;
-import org.apache.ode.bpel.iapi.ProcessStoreEvent;
-import org.apache.ode.bpel.iapi.ProcessStoreListener;
-import org.apache.ode.bpel.iapi.Scheduler;
-import org.apache.ode.bpel.memdao.BpelDAOConnectionFactoryImpl;
-import org.apache.ode.il.config.OdeConfigProperties;
-import org.apache.ode.il.dbutil.Database;
-import org.apache.ode.scheduler.simple.JdbcDelegate;
-import org.apache.ode.scheduler.simple.SimpleScheduler;
-import org.apache.ode.store.ProcessStoreImpl;
-import org.apache.ode.utils.GUID;
-
-/**
- * Embedded ODE process server
- *
- * @version $Rev$ $Date$
- */
-public class EmbeddedODEServer {
- protected final Log __log = LogFactory.getLog(getClass());
-
- private boolean _initialized;
-
- private OdeConfigProperties _config;
-
- private TransactionManager _txMgr;
-
- private Database _db;
-
- private File _workRoot;
-
- private BpelDAOConnectionFactoryJDBC _daoCF;
-
- private BpelServerImpl _bpelServer;
-
- protected ProcessStore store;
-
- private ExecutorService _executor;
-
- private Scheduler _scheduler;
-
-
- public EmbeddedODEServer(TransactionManager txMgr) {
- _txMgr = txMgr;
- }
-
- public void init() throws ODEInitializationException {
- Properties p = System.getProperties();
- p.put("derby.system.home", "target");
-
- _config = new OdeConfigProperties(new Properties(), "ode-sca");
-
- // Setting work root as the directory containing our database (wherever in the classpath)
- URL dbLocation = getClass().getClassLoader().getResource("jpadb");
- if (dbLocation == null)
- throw new ODEInitializationException("Couldn't find database in the classpath");
- _workRoot = new File(dbLocation.getFile()).getParentFile();
-
- initTxMgr();
- initPersistence();
- initBpelServer();
-
- try {
- _bpelServer.start();
- } catch (Exception ex) {
- String errmsg = "An error occured during the ODE BPEL server startup.";
- __log.error(errmsg, ex);
- throw new ODEInitializationException(errmsg, ex);
- }
-
- __log.info("ODE BPEL server started.");
- _initialized = true;
- }
-
- private void initTxMgr() {
- if(_txMgr == null) {
- try {
- GeronimoTxFactory txFactory = new GeronimoTxFactory();
- _txMgr = txFactory.getTransactionManager();
- } catch (Exception e) {
- __log.fatal("Couldn't initialize a transaction manager using Geronimo's transaction factory.", e);
- throw new ODEInitializationException("Couldn't initialize a transaction manager using " + "Geronimo's transaction factory.", e);
- }
- }
- }
-
- private void initPersistence() {
- _db = new Database(_config);
- _db.setTransactionManager(_txMgr);
- _db.setWorkRoot(_workRoot);
-
- try {
- _db.start();
- _daoCF = _db.createDaoCF();
- } catch (Exception ex) {
- String errmsg = "Error while configuring ODE persistence.";
- __log.error(errmsg, ex);
- throw new ODEInitializationException(errmsg, ex);
- }
- }
-
- private void initBpelServer() {
- if (__log.isDebugEnabled()) {
- __log.debug("ODE initializing");
- }
- if (_config.getThreadPoolMaxSize() == 0)
- _executor = Executors.newCachedThreadPool();
- else
- _executor = Executors.newFixedThreadPool(_config.getThreadPoolMaxSize());
-
- _bpelServer = new BpelServerImpl();
- _scheduler = createScheduler();
- _scheduler.setJobProcessor(_bpelServer);
-
- _bpelServer.setDaoConnectionFactory(_daoCF);
- _bpelServer.setInMemDaoConnectionFactory(new BpelDAOConnectionFactoryImpl(_scheduler));
- // _bpelServer.setEndpointReferenceContext(new EndpointReferenceContextImpl(this));
- _bpelServer.setMessageExchangeContext(new ODEMessageExchangeContext(this));
- _bpelServer.setBindingContext(new ODEBindingContext(this));
- _bpelServer.setScheduler(_scheduler);
- if (_config.isDehydrationEnabled()) {
- CountLRUDehydrationPolicy dehy = new CountLRUDehydrationPolicy();
- _bpelServer.setDehydrationPolicy(dehy);
- }
-
- store = new ProcessStoreImpl(_db.getDataSource(), "jpa", true);
- store.registerListener(new ProcessStoreListener() {
- public void onProcessStoreEvent(ProcessStoreEvent event) {
- // bounce the process
- _bpelServer.unregister(event.pid);
- if (event.type != ProcessStoreEvent.Type.UNDEPLOYED) {
- ProcessConf conf = (ProcessConf) store.getProcessConfiguration(event.pid);
- // Test processes always run with in-mem DAOs
- // conf.setTransient(true); //FIXME: what should we use for ProcessConfImpl
- _bpelServer.register(conf);
- }
- }
- });
-
- _bpelServer.init();
- }
-
- public void stop() throws ODEShutdownException {
- try {
- _bpelServer.stop();
- } catch (Exception ex) {
- String errmsg = "An error occured during the ODE BPEL server shutdown.";
- __log.error(errmsg, ex);
- throw new ODEInitializationException(errmsg, ex);
- }
-
- _db.shutdown();
- }
-
- protected Scheduler createScheduler() {
- SimpleScheduler scheduler = new SimpleScheduler(new GUID().toString(),new JdbcDelegate(_db.getDataSource()));
- scheduler.setTransactionManager(_txMgr);
-
- return scheduler;
- }
-
- public boolean isInitialized() {
- return _initialized;
- }
-
- public BpelServerImpl getBpelServer() {
- return _bpelServer;
- }
-
- public Scheduler getScheduler() {
- return _scheduler;
- }
-
- public void deploy(ODEDeployment d) {
- Collection<QName> procs;
-
- try {
- procs = store.deploy(d.deployDir);
-
- // _deployed.add(d);
- } catch (Exception ex) {
- String errMsg = ">>> DEPLOY: Unexpected exception: " + ex.getMessage();
- __log.debug(errMsg, ex);
- throw new ODEDeploymentException(errMsg,ex);
- }
-
- try {
- for (QName procName : procs) {
- ProcessConf conf = (ProcessConf) store.getProcessConfiguration(procName);
- // Test processes always run with in-mem DAOs
- //conf.setTransient(true); //FIXME: what should we use for ProcessConfImpl
- _bpelServer.register(conf);
- }
- } catch (Exception ex) {
- String errMsg =">>>REGISTER: Unexpected exception: " + ex.getMessage();
- __log.debug(errMsg , ex);
- throw new ODEDeploymentException(errMsg, ex);
- }
- }
-
- public void undeploy(ODEDeployment d) {
- //TODO
- }
-}
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/GeronimoTxFactory.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/GeronimoTxFactory.java
deleted file mode 100644
index bf2f29c585..0000000000
--- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/GeronimoTxFactory.java
+++ /dev/null
@@ -1,48 +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.ode;
-
-import javax.transaction.TransactionManager;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-/**
- * Geronimo transaction factory
- *
- * @version $Rev$ $Date$
- */
-public class GeronimoTxFactory {
- private static final Log __log = LogFactory.getLog(GeronimoTxFactory.class);
-
- /* Public no-arg contructor is required */
- public GeronimoTxFactory() {
- }
-
- public TransactionManager getTransactionManager() {
- __log.info("Using embedded Geronimo transaction manager");
- try {
- Object obj = new org.apache.geronimo.transaction.manager.GeronimoTransactionManager();
- return (TransactionManager) obj;
- } catch (Exception except) {
- throw new IllegalStateException("Unable to instantiate Geronimo Transaction Manager", except);
- }
- }
-}
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEBindingContext.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEBindingContext.java
deleted file mode 100644
index 459e9a652a..0000000000
--- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEBindingContext.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.ode;
-
-import javax.wsdl.PortType;
-import javax.xml.namespace.QName;
-
-import org.apache.ode.bpel.iapi.BindingContext;
-import org.apache.ode.bpel.iapi.Endpoint;
-import org.apache.ode.bpel.iapi.EndpointReference;
-import org.apache.ode.bpel.iapi.PartnerRoleChannel;
-import org.w3c.dom.Document;
-
-/**
- * Binding Context information
- *
- * @version $Rev: 573789 $ $Date: 2007-09-07 23:59:49 -0700 (Fri, 07 Sep 2007) $
- */
-public class ODEBindingContext implements BindingContext {
-
- private EmbeddedODEServer _server;
-
- public ODEBindingContext(EmbeddedODEServer _server) {
- this._server = _server;
- }
-
- public EndpointReference activateMyRoleEndpoint(QName pid, Endpoint endpoint) {
- return new TuscanyEPR();
- }
-
- public void deactivateMyRoleEndpoint(Endpoint endpoint) {
- // TODO
- }
-
- public PartnerRoleChannel createPartnerRoleChannel(QName qName, PortType portType, Endpoint endpoint) {
- // TODO
- return null;
- }
-
- // TODO This should hold something that makes sense for Tuscany so that the process has
- // an address that makes sense from the outside world perspective
- private class TuscanyEPR implements EndpointReference {
- public Document toXML() {
- return null;
- }
- }
-}
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEDeployment.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEDeployment.java
deleted file mode 100644
index 2677f38c88..0000000000
--- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEDeployment.java
+++ /dev/null
@@ -1,43 +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.ode;
-
-import java.io.File;
-
-/**
- * Deployment information
- *
- * @version $Rev$ $Date$
- */
-public class ODEDeployment {
- /** The directory containing the deploy.xml and artefacts. */
- public File deployDir;
-
- /** If non-null the type of exception we expect to get when we deploy. */
- public Class expectedException = null;
-
- public ODEDeployment(File deployDir) {
- this.deployDir = deployDir;
- }
-
- public String toString() {
- return "Deployment#" + deployDir;
- }
-} \ No newline at end of file
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEDeploymentException.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEDeploymentException.java
deleted file mode 100644
index b03f69d9aa..0000000000
--- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEDeploymentException.java
+++ /dev/null
@@ -1,41 +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.ode;
-
-/**
- * Thrown when ODE failed to shutdown.
- *
- * @version $Rev$ $Date$
- */
-public class ODEDeploymentException extends RuntimeException {
- private static final long serialVersionUID = -2869674556330744215L;
-
- public ODEDeploymentException(Throwable cause) {
- super(cause);
- }
-
- public ODEDeploymentException(String message) {
- super(message);
- }
-
- public ODEDeploymentException(String message, Throwable cause) {
- super(message, cause);
- }
-}
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEInitializationException.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEInitializationException.java
deleted file mode 100644
index 3241dce387..0000000000
--- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEInitializationException.java
+++ /dev/null
@@ -1,41 +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.ode;
-
-/**
- * Thrown when ODE failed to initialize one if its needed resources.
- *
- * @version $Rev$ $Date$
- */
-public class ODEInitializationException extends RuntimeException {
- private static final long serialVersionUID = -2869674556330744215L;
-
- public ODEInitializationException(Throwable cause) {
- super(cause);
- }
-
- public ODEInitializationException(String message) {
- super(message);
- }
-
- public ODEInitializationException(String message, Throwable cause) {
- super(message, cause);
- }
-}
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEMessageExchangeContext.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEMessageExchangeContext.java
deleted file mode 100644
index 58cdddb98e..0000000000
--- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEMessageExchangeContext.java
+++ /dev/null
@@ -1,46 +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.ode;
-
-import org.apache.ode.bpel.iapi.BpelEngineException;
-import org.apache.ode.bpel.iapi.ContextException;
-import org.apache.ode.bpel.iapi.MessageExchangeContext;
-import org.apache.ode.bpel.iapi.MyRoleMessageExchange;
-import org.apache.ode.bpel.iapi.PartnerRoleMessageExchange;
-
-/**
- * Message Exchange Context information
- *
- * @version $Rev: 573789 $ $Date: 2007-09-07 23:59:49 -0700 (Fri, 07 Sep 2007) $
- */
-public class ODEMessageExchangeContext implements MessageExchangeContext {
- private EmbeddedODEServer _server;
-
- public ODEMessageExchangeContext(EmbeddedODEServer _server) {
- this._server = _server;
- }
-
- public void invokePartner(PartnerRoleMessageExchange partnerRoleMessageExchange) throws ContextException {
-
- }
-
- public void onAsyncReply(MyRoleMessageExchange myRoleMessageExchange) throws BpelEngineException {
-
- }
-}
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEShutdownException.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEShutdownException.java
deleted file mode 100644
index a928379ba9..0000000000
--- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEShutdownException.java
+++ /dev/null
@@ -1,41 +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.ode;
-
-/**
- * Thrown when ODE failed to shutdown.
- *
- * @version $Rev$ $Date$
- */
-public class ODEShutdownException extends RuntimeException {
- private static final long serialVersionUID = -2869674556330744215L;
-
- public ODEShutdownException(Throwable cause) {
- super(cause);
- }
-
- public ODEShutdownException(String message) {
- super(message);
- }
-
- public ODEShutdownException(String message, Throwable cause) {
- super(message, cause);
- }
-}
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELImplementationProvider.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELImplementationProvider.java
deleted file mode 100644
index a0105680fc..0000000000
--- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELImplementationProvider.java
+++ /dev/null
@@ -1,121 +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.provider;
-
-import java.io.File;
-import java.net.URL;
-
-import javax.transaction.TransactionManager;
-
-import org.apache.tuscany.sca.implementation.bpel.BPELImplementation;
-import org.apache.tuscany.sca.implementation.bpel.ode.EmbeddedODEServer;
-import org.apache.tuscany.sca.implementation.bpel.ode.ODEDeployment;
-import org.apache.tuscany.sca.implementation.bpel.ode.ODEInitializationException;
-import org.apache.tuscany.sca.interfacedef.Operation;
-import org.apache.tuscany.sca.invocation.Invoker;
-import org.apache.tuscany.sca.provider.ImplementationProvider;
-import org.apache.tuscany.sca.runtime.RuntimeComponent;
-import org.apache.tuscany.sca.runtime.RuntimeComponentService;
-
-/**
- * The model representing a sample CRUD implementation in an SCA assembly model.
- * The sample CRUD implementation is not a full blown implementation, it only
- * supports a subset of what a component implementation can support: - a single
- * fixed service (as opposed to a list of services typed by different
- * interfaces) - a directory attribute used to specify where a CRUD component is
- * going to persist resources - no references or properties - no policy intents
- * or policy sets
- */
-public class BPELImplementationProvider implements ImplementationProvider {
-
- private RuntimeComponent component;
-
- private EmbeddedODEServer odeServer;
- private TransactionManager txMgr;
-
- private BPELImplementation implementation;
-
- /**
- * Constructs a new BPEL Implementation.
- */
- public BPELImplementationProvider(RuntimeComponent component,
- BPELImplementation implementation,
- EmbeddedODEServer odeServer,
- TransactionManager txMgr) {
- this.component = component;
- this.implementation = implementation;
- this.odeServer = odeServer;
- this.txMgr = txMgr;
- }
-
- public Invoker createInvoker(RuntimeComponentService service, Operation operation) {
- BPELInvoker invoker = new BPELInvoker(operation, odeServer, txMgr);
- return invoker;
- }
-
- public boolean supportsOneWayInvocation() {
- return false;
- }
-
- public void start() {
- System.out.println("Starting " + component.getName());
-
- try {
- if (!odeServer.isInitialized()) {
- // start ode server
- odeServer.init();
- }
-
- URL deployURL = this.implementation.getProcessDefinition().getLocation();
-
- File deploymentDir = new File(deployURL.toURI().getPath()).getParentFile();
- System.out.println(">>> Deploying : " + deploymentDir.toString());
-
- // deploy the process
- if (odeServer.isInitialized()) {
- try {
- txMgr.begin();
- odeServer.deploy(new ODEDeployment(deploymentDir));
- txMgr.commit();
- } catch (Exception e) {
- e.printStackTrace();
- txMgr.rollback();
- }
- }
-
- } catch (ODEInitializationException inite) {
- throw new RuntimeException("BPEL Component Type Implementation : Error initializing embedded ODE server " + inite.getMessage(), inite);
- } catch(Exception e) {
- throw new RuntimeException("BPEl Component Type Implementation initialization failure : " + e.getMessage(), e);
- }
- }
-
- public void stop() {
- System.out.println("Stopping " + component.getName());
-
- if (odeServer.isInitialized()) {
- // start ode server
- odeServer.stop();
- }
-
- System.out.println("Stopped !!!");
-
- }
-
-}
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELImplementationProviderFactory.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELImplementationProviderFactory.java
deleted file mode 100644
index cc485e7ad9..0000000000
--- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELImplementationProviderFactory.java
+++ /dev/null
@@ -1,61 +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.provider;
-
-import javax.transaction.TransactionManager;
-
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.implementation.bpel.BPELImplementation;
-import org.apache.tuscany.sca.implementation.bpel.ode.EmbeddedODEServer;
-import org.apache.tuscany.sca.implementation.bpel.ode.GeronimoTxFactory;
-import org.apache.tuscany.sca.provider.ImplementationProvider;
-import org.apache.tuscany.sca.provider.ImplementationProviderFactory;
-import org.apache.tuscany.sca.runtime.RuntimeComponent;
-
-/**
- * BPEL Implementation provider factory
- *
- * We use the provider factory to instantiate a ODE server that is going to be injected in all BPEL components
- */
-public class BPELImplementationProviderFactory implements ImplementationProviderFactory<BPELImplementation> {
-
- private EmbeddedODEServer odeServer;
- private TransactionManager txMgr;
-
- /**
- * Default constructor receiving an extension point
- * @param extensionPoints
- */
- public BPELImplementationProviderFactory(ExtensionPointRegistry extensionPoints) {
- GeronimoTxFactory txFactory = new GeronimoTxFactory();
- txMgr = txFactory.getTransactionManager();
- this.odeServer = new EmbeddedODEServer(txMgr);
- }
-
- /**
- * Creates a new BPEL Implementation and inject the EmbeddedODEServer
- */
- public ImplementationProvider createImplementationProvider(RuntimeComponent component, BPELImplementation implementation) {
- return new BPELImplementationProvider(component, implementation, odeServer, txMgr);
- }
-
- public Class<BPELImplementation> getModelType() {
- return BPELImplementation.class;
- }
-}
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELInvoker.java b/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELInvoker.java
deleted file mode 100644
index d5c6c4d3df..0000000000
--- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELInvoker.java
+++ /dev/null
@@ -1,214 +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.provider;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.concurrent.Future;
-
-import javax.transaction.SystemException;
-import javax.transaction.TransactionManager;
-import javax.wsdl.Part;
-import javax.wsdl.Service;
-import javax.xml.namespace.QName;
-
-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.interfacedef.Interface;
-import org.apache.tuscany.sca.interfacedef.Operation;
-import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface;
-import org.apache.tuscany.sca.invocation.Invoker;
-import org.apache.tuscany.sca.invocation.Message;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * Implements a target invoker for BPEL component implementations.
- *
- * The target invoker is responsible for dispatching invocations to the particular
- * component implementation logic. In this example we are simply delegating the
- * CRUD operation invocations to the corresponding methods on our fake
- * resource manager.
- */
-public class BPELInvoker implements Invoker {
- private EmbeddedODEServer odeServer;
- private TransactionManager txMgr;
-
- private Operation operation;
- private QName bpelServiceName;
- private String bpelOperationName;
- private Part bpelOperationInputPart;
- private Part bpelOperationOutputPart;
-
- public BPELInvoker(Operation operation, EmbeddedODEServer odeServer, TransactionManager txMgr) {
- this.operation = operation;
- this.bpelOperationName = operation.getName();
- this.odeServer = odeServer;
- this.txMgr = txMgr;
-
- initializeInvocation();
- }
-
-
- private void initializeInvocation() {
-
- Interface interfaze = operation.getInterface();
- if(interfaze instanceof WSDLInterface){
- WSDLInterface wsdlInterface = null;
- wsdlInterface = (WSDLInterface) interfaze;
-
- Service serviceDefinition = (Service) wsdlInterface.getWsdlDefinition().getDefinition().getAllServices().values().iterator().next();
- bpelServiceName = serviceDefinition.getQName();
-
- bpelOperationInputPart = (Part) wsdlInterface.getPortType().getOperation(bpelOperationName,null,null).getInput().getMessage().getParts().values().iterator().next();
- bpelOperationOutputPart = (Part) wsdlInterface.getPortType().getOperation(bpelOperationName,null,null).getOutput().getMessage().getParts().values().iterator().next();
- }
- }
-
- public Message invoke(Message msg) {
- try {
- Object[] args = msg.getBody();
- Object resp = doTheWork(args);
- msg.setBody(resp);
- } catch (InvocationTargetException e) {
- msg.setFaultBody(e.getCause());
- }
- return msg;
- }
-
- public Object doTheWork(Object[] args) throws InvocationTargetException {
- Element response = null;
-
- if(! (operation.getInterface() instanceof WSDLInterface)) {
- throw new InvocationTargetException(null,"Unsupported service contract");
- }
-
- org.apache.ode.bpel.iapi.MyRoleMessageExchange mex = null;
- Future onhold = null;
-
- //Process the BPEL process invocation
- try {
- txMgr.begin();
- mex = odeServer.getBpelServer().getEngine().createMessageExchange(new GUID().toString(),
- bpelServiceName,
- bpelOperationName);
- onhold = mex.invoke(createInvocationMessage(mex, args));
-
- txMgr.commit();
- } catch (Exception e) {
- try {
- txMgr.rollback();
- } catch (SystemException se) {
-
- }
- throw new InvocationTargetException(e, "Error invoking BPEL process : " + e.getMessage());
- }
-
-
- // Waiting until the reply is ready in case the engine needs to continue in a different thread
- if (onhold != null) {
- try {
- onhold.get();
- } catch (Exception e) {
- throw new InvocationTargetException(e,"Error invoking BPEL process : " + e.getMessage());
- }
- }
-
- //Process the BPEL invocation response
- 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 invocationResponse = mex.getResponse().getMessage();
- System.out.println("Response: " + DOMUtils.domToString(invocationResponse));
-
- //process the method invocation result
- response = processResponse(invocationResponse);
-
- txMgr.commit();
- // end of transaction two
- } catch (Exception e) {
- try {
- txMgr.rollback();
- } catch (SystemException se) {
-
- }
- throw new InvocationTargetException(e, "Error retrieving BPEL process invocation status : " + e
- .getMessage());
- }
-
-
- return response;
- }
-
- /**
- * Create BPEL Invocation message
- *
- * BPEL invocation message like :
- * <message>
- * <TestPart>
- * <hello xmlns="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl">Hello</hello>
- * </TestPart>
- * </message>
- * @param args
- * @return
- */
- private org.apache.ode.bpel.iapi.Message createInvocationMessage(org.apache.ode.bpel.iapi.MyRoleMessageExchange mex, Object[] args) {
- Document dom = DOMUtils.newDocument();
-
- Element contentMessage = dom.createElement("message");
- Element contentPart = dom.createElement(bpelOperationInputPart.getName());
- Element contentInvocation = (Element) args[0];
-
- contentPart.appendChild(dom.importNode(contentInvocation, true));
- contentMessage.appendChild(contentPart);
- dom.appendChild(contentMessage);
-
- System.out.println("::arg:::::: " + DOMUtils.domToString((Element) args[0]));
- System.out.println("::message:: " + DOMUtils.domToString(dom.getDocumentElement()));
-
- org.apache.ode.bpel.iapi.Message request = mex.createMessage(new QName("", ""));
- request.setMessage(dom.getDocumentElement());
-
- return request;
- }
-
- /**
- * Process BPEL response
- *
- * <message>
- * <TestPart>
- * <hello xmlns="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl">World</hello>
- * </TestPart>
- * </message>
- *
- * @param response
- * @return
- */
- private Element processResponse(Element response) {
- return (Element) DOMUtils.findChildByName(response, new QName("",bpelOperationOutputPart.getName()));
- }
-}
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
deleted file mode 100644
index 4763c69768..0000000000
--- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
+++ /dev/null
@@ -1,19 +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.
-
-# Implementation class for the artifact processor extension
-org.apache.tuscany.sca.implementation.bpel.impl.BPELImplementationProcessor;qname=http://www.osoa.org/xmlns/sca/1.0#implementation.bpel,model=org.apache.tuscany.sca.implementation.bpel.BPELImplementation \ No newline at end of file
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor b/branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor
deleted file mode 100644
index 066fdc864b..0000000000
--- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor
+++ /dev/null
@@ -1,19 +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.
-
-# Implementation class for the artifact processor extension
-org.apache.tuscany.sca.implementation.bpel.impl.BPELDocumentProcessor;type=.bpel,model=org.apache.tuscany.sca.implementation.bpel.BPELProcessDefinition \ No newline at end of file
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.implementation.bpel.BPELFactory b/branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.implementation.bpel.BPELFactory
deleted file mode 100644
index 53ffd1b72a..0000000000
--- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.implementation.bpel.BPELFactory
+++ /dev/null
@@ -1,18 +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.
-
-org.apache.tuscany.sca.implementation.bpel.DefaultBPELFactory
diff --git a/branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory b/branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory
deleted file mode 100644
index b6481b1512..0000000000
--- a/branches/sca-java-1.1/modules/implementation-bpel/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory
+++ /dev/null
@@ -1,19 +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.
-
-# Implementation class for the implementation extension
-org.apache.tuscany.sca.implementation.bpel.provider.BPELImplementationProviderFactory;model=org.apache.tuscany.sca.implementation.bpel.BPELImplementation
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 =
- "<?xml version=\"1.0\" encoding=\"ASCII\"?>"
- + "<composite xmlns=\"http://www.osoa.org/xmlns/sca/1.0\" xmlns:hns=\"http://tuscany.apache.org/implementation/bpel/example/helloworld\" targetNamespace=\"http://bpel\" name=\"bpel\">"
- + " <component name=\"BPELHelloWorldComponent\">"
- + " <implementation.bpel process=\"hns:HelloWorld\" />"
- + "</component>";
-
- private static final String COMPOSITE_INVALID =
- "<?xml version=\"1.0\" encoding=\"ASCII\"?>"
- + "<composite xmlns=\"http://www.osoa.org/xmlns/sca/1.0\" xmlns:hns=\"http://tuscany.apache.org/implementation/bpel/example/helloworld\" targetNamespace=\"http://bpel\" name=\"bpel\">"
- + " <component name=\"BPELHelloWorldComponent\">"
- + " <implementation.bpel/>"
- + "</component>";
-
- 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("<message><TestPart><hello xmlns=\"http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl\">Hello</hello></TestPart></message>"));
- 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 @@
-<!--
- ~ 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.
- -->
-<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
- xmlns:tns="http://tuscany.apache.org/implementation/bpel/example/helloworld"
- xmlns:wns="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl">
-
-
- <process name="tns:HelloWorld">
- <active>true</active>
- <provide partnerLink="helloPartnerLink">
- <service name="wns:HelloService" port="HelloPort"/>
- </provide>
- </process>
-</deploy>
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 @@
-<!--
- ~ 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="HelloWorld"
- targetNamespace="http://tuscany.apache.org/implementation/bpel/example/helloworld"
- xmlns="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
- xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
- xmlns:tns="http://tuscany.apache.org/implementation/bpel/example/helloworld"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:test="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl"
- queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
- expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
-
- <import location="helloworld.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"
- namespace="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl"/>
-
- <partnerLinks>
- <partnerLink name="helloPartnerLink" partnerLinkType="test:HelloPartnerLinkType" myRole="me" />
- </partnerLinks>
-
- <variables>
- <variable name="helloMessage" messageType="test:HelloMessage"/>
- <variable name="tmpVar" type="xsd:string"/>
- </variables>
-
- <sequence>
- <receive
- name="start"
- partnerLink="helloPartnerLink"
- portType="test:HelloPortType"
- operation="hello"
- variable="helloMessage"
- createInstance="yes"/>
-
- <assign name="assign1">
- <copy>
- <from variable="helloMessage" part="TestPart"/>
- <to variable="tmpVar"/>
- </copy>
- <copy>
- <from>concat($tmpVar,' World')</from>
- <to variable="helloMessage" part="TestPart"/>
- </copy>
- </assign>
- <reply name="end"
- partnerLink="helloPartnerLink"
- portType="test:HelloPortType"
- operation="hello"
- variable="helloMessage"/>
- </sequence>
-</process>
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 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--
- * 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.
--->
-<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
- <service name="HelloService">
- <interface.wsdl interface="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl#wsdl.interface(HelloPortType)" />
- </service>
-
-</componentType>
- \ 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 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://bpel"
- xmlns:hns="http://tuscany.apache.org/implementation/bpel/example/helloworld"
- name="helloworld">
-
- <component name="BPELHelloWorldComponent">
- <implementation.bpel process="hns:HelloWorld"/>
- </component>
-
-</composite>
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 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-
-<wsdl:definitions name="helloworld"
- targetNamespace="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl"
- xmlns="http://schemas.xmlsoap.org/wsdl/"
- xmlns:tns="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
- xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/">
-
- <wsdl:types>
- <schema elementFormDefault="qualified"
- targetNamespace="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl"
- xmlns="http://www.w3.org/2001/XMLSchema">
-
- <element name="hello">
- <complexType>
- <sequence>
- <element name="message" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
- </schema>
- </wsdl:types>
-
- <wsdl:message name="HelloMessage">
- <wsdl:part element="tns:hello" name="TestPart"/>
- </wsdl:message>
-
- <wsdl:portType name="HelloPortType">
- <wsdl:operation name="hello">
- <wsdl:input message="tns:HelloMessage" name="TestIn"/>
- <wsdl:output message="tns:HelloMessage" name="TestOut"/>
- </wsdl:operation>
- </wsdl:portType>
-
-
- <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType">
- <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
- <wsdl:operation name="hello">
- <wsdlsoap:operation soapAction=""/>
- <wsdl:input name="TestIn">
- <wsdlsoap:body use="literal"/>
- </wsdl:input>
- <wsdl:output name="TestOut">
- <wsdlsoap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
-
- <wsdl:service name="HelloService">
- <wsdl:port name="HelloPort" binding="tns:HelloSoapBinding">
- <soap:address location="http://localhost:8085/ode/processes/helloWorld"/>
- </wsdl:port>
- </wsdl:service>
-
- <plnk:partnerLinkType name="HelloPartnerLinkType">
- <plnk:role name="me" portType="tns:HelloPortType"/>
- <plnk:role name="you" portType="tns:HelloPortType"/>
- </plnk:partnerLinkType>
-</wsdl:definitions> \ 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 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--
- * 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.
--->
-<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
- <service name="PingService">
- <interface.wsdl interface="http://tuscany.apache.org/implementation/bpel/example/ping.wsdl#wsdl.interface(PingPortType)" />
- </service>
-
- <service name="PongService">
- <interface.wsdl interface="http://tuscany.apache.org/implementation/bpel/example/pong.wsdl#wsdl.interface(PongPortType)" />
- </service>
-
- <reference name="Pong">
- <interface.wsdl interface="http://tuscany.apache.org/implementation/bpel/example/pong.wsdl#wsdl.interface(PongPortType)" />
- </reference>
-</componentType> \ 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 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://bpel"
- xmlns:ping="http://tuscany.apache.org/implementation/bpel/example/ping.bpel"
- xmlns:pong="http://tuscany.apache.org/implementation/bpel/example/pong.bpel"
- name="ping">
-
- <component name="BPELPingPong-PingComponent">
- <implementation.bpel process="ping:Ping"/>
- <reference name="Pong" target="BPELPingPong-PongComponent/PongService"/>
- </component>
-
- <component name="BPELPingPong-PongComponent">
- <implementation.bpel process="pong:Pong"/>
- </component>
-
-</composite> \ 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 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
- xmlns:process="http://tuscany.apache.org/implementation/bpel/example/ping.bpel"
- xmlns:ping="http://tuscany.apache.org/implementation/bpel/example/ping.wsdl"
- xmlns:pong="http://tuscany.apache.org/implementation/bpel/example/pong.wsdl">
-
- <process name="process:Ping">
- <active>true</active>
- <provide partnerLink="PingPartnerLink">
- <service name="ping:PingService" port="PingPort"/>
- </provide>
- <invoke partnerLink="PongPartnerLink">
- <service name="pong:PongService" port="PongPort"/>
- </invoke>
- </process>
-
-</deploy>
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 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<process
- name="Ping"
- xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
- targetNamespace="http://tuscany.apache.org/implementation/bpel/example/ping.bpel"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:tns="http://tuscany.apache.org/implementation/bpel/example/ping.bpel"
- xmlns:ping="http://tuscany.apache.org/implementation/bpel/example/ping.wsdl"
- xmlns:pong="http://tuscany.apache.org/implementation/bpel/example/pong.wsdl"
- expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
-
- <import location="ping.wsdl"
- namespace="http://tuscany.apache.org/implementation/bpel/example/ping.wsdl"
- importType="http://schemas.xmlsoap.org/wsdl/" />
-
- <import location="pong.wsdl"
- namespace="http://tuscany.apache.org/implementation/bpel/example/pong.wsdl"
- importType="http://schemas.xmlsoap.org/wsdl/" />
-
- <partnerLinks>
- <partnerLink name="PingPartnerLink"
- partnerLinkType="ping:PingPartnerLinkType"
- myRole="Provider" />
- <partnerLink name="PongPartnerLink"
- partnerLinkType="pong:PongPartnerLinkType"
- partnerRole="Provider"
- initializePartnerRole="yes" />
- </partnerLinks>
-
- <variables>
- <variable messageType="ping:PingRequest" name="pingRequest"/>
- <variable messageType="ping:PingResponse" name="pingResponse"/>
- <variable messageType="pong:PongRequest" name="pongRequest"/>
- <variable messageType="pong:PongResponse" name="pongResponse"/>
- <variable type="xsd:string" name="text" />
- </variables>
-
- <sequence name="Main">
- <receive name="pingReceive"
- createInstance="yes"
- operation="Ping"
- partnerLink="PingPartnerLink"
- portType="ping:PingPortType"
- variable="pingRequest"/>
-
- <assign name="assignPongRequest">
- <!-- add "ping" text to the input text -->
- <copy>
- <from>concat($pingRequest.body/ping:text, ' ping')</from>
- <to variable="text"/>
- </copy>
- <!-- initialize pongRequest -->
- <copy>
- <from>
- <literal>
- <pong:PongRequest>
- <pong:text/>
- </pong:PongRequest>
- </literal>
- </from>
- <to>$pongRequest.body</to>
- </copy>
- <!-- copy new text into pongRequest -->
- <copy>
- <from>$text</from>
- <to>$pongRequest.body/pong:text</to>
- </copy>
- </assign>
-
- <invoke name="invokePong"
- operation="Pong"
- inputVariable="pongRequest"
- outputVariable="pongResponse"
- partnerLink="PongPartnerLink"
- portType="pong:PongPortType"/>
-
- <assign name="assignPingResponse">
- <copy>
- <from>$pongResponse.body/pong:text</from>
- <to>$text</to>
- </copy>
- <!-- initialize pingResponse -->
- <copy>
- <from>
- <literal>
- <ping:PingResponse>
- <ping:text/>
- </ping:PingResponse>
- </literal>
- </from>
- <to>$pingResponse.body</to>
- </copy>
- <!-- copy new text into pingResponse -->
- <copy>
- <from>$text</from>
- <to>$pingResponse.body/ping:text</to>
- </copy>
- </assign>
-
- <reply name="pingReply"
- partnerLink="PingPartnerLink"
- portType="ping:PingPortType"
- operation="Ping"
- variable="pingResponse"/>
- </sequence>
-</process>
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 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--
- * 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.
--->
-<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
- <reference name="Pong">
- <interface.wsdl interface="http://tuscany.apache.org/implementation/bpel/example/pong.wsdl#wsdl.interface(PongPortType)" />
- </reference>
-
- <service name="PingService">
- <interface.wsdl interface="http://tuscany.apache.org/implementation/bpel/example/ping.wsdl#wsdl.interface(PingPortType)" />
- </service>
-
- <service name="PongService">
- <interface.wsdl interface="http://tuscany.apache.org/implementation/bpel/example/pong.wsdl#wsdl.interface(PongPortType)" />
- </service>
-</componentType> \ 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 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://bpel"
- xmlns:ping="http://tuscany.apache.org/implementation/bpel/example/ping.bpel"
- name="ping">
-
- <component name="BPELPingComponent">
- <implementation.bpel process="ping:Ping"/>
- </component>
-</composite> \ 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 @@
-<?xml version="1.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.
- -->
-<definitions name="Ping"
- targetNamespace="http://tuscany.apache.org/implementation/bpel/example/ping.wsdl"
- xmlns:tns="http://tuscany.apache.org/implementation/bpel/example/ping.wsdl"
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
- xmlns="http://schemas.xmlsoap.org/wsdl/">
-
- <types>
- <schema targetNamespace="http://tuscany.apache.org/implementation/bpel/example/ping.wsdl"
- xmlns="http://www.w3.org/2001/XMLSchema">
- <element name="PingRequest">
- <complexType>
- <all>
- <element name="text" type="string"/>
- </all>
- </complexType>
- </element>
- <element name="PingResponse">
- <complexType>
- <all>
- <element name="text" type="string"/>
- </all>
- </complexType>
- </element>
- </schema>
- </types>
-
- <message name="PingRequest">
- <part name="body" element="tns:PingRequest"/>
- </message>
-
- <message name="PingResponse">
- <part name="body" element="tns:PingResponse"/>
- </message>
-
- <portType name="PingPortType">
- <operation name="Ping">
- <input message="tns:PingRequest"/>
- <output message="tns:PingResponse"/>
- </operation>
- </portType>
-
- <binding name="PingSoapBinding" type="tns:PingPortType">
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <operation name="Ping">
- <soap:operation soapAction="" />
- <input name="PingRequest">
- <soap:body use="literal" />
- </input>
- <output name="PingResponse">
- <soap:body use="literal" />
- </output>
- </operation>
- </binding>
-
- <service name="PingService">
- <port name="PingPort" binding="tns:PingSoapBinding">
- <soap:address location="http://localhost:8085/ode/processes/ping" />
- </port>
- </service>
-
- <plnk:partnerLinkType name="PingPartnerLinkType">
- <plnk:role name="Provider" portType="tns:PingPortType"/>
- </plnk:partnerLinkType>
-</definitions> \ 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 @@
-<?xml version="1.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.
- -->
-<definitions name="Pong"
- targetNamespace="http://tuscany.apache.org/implementation/bpel/example/pong.wsdl"
- xmlns:tns="http://tuscany.apache.org/implementation/bpel/example/pong.wsdl"
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
- xmlns="http://schemas.xmlsoap.org/wsdl/">
-
- <types>
- <schema targetNamespace="http://tuscany.apache.org/implementation/bpel/example/pong.wsdl"
- xmlns="http://www.w3.org/2001/XMLSchema">
- <element name="PongRequest">
- <complexType>
- <all>
- <element name="text" type="string"/>
- </all>
- </complexType>
- </element>
- <element name="PongResponse">
- <complexType>
- <all>
- <element name="text" type="string"/>
- </all>
- </complexType>
- </element>
- </schema>
- </types>
-
- <message name="PongRequest">
- <part name="body" element="tns:PongRequest"/>
- </message>
-
- <message name="PongResponse">
- <part name="body" element="tns:PongResponse"/>
- </message>
-
- <portType name="PongPortType">
- <operation name="Pong">
- <input message="tns:PongRequest"/>
- <output message="tns:PongResponse"/>
- </operation>
- </portType>
-
- <binding name="PongSoapBinding" type="tns:PongPortType">
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
- <operation name="Pong">
- <soap:operation soapAction=""/>
- <input name="PongRequest">
- <soap:body use="literal"/>
- </input>
- <output name="PongResponse">
- <soap:body use="literal"/>
- </output>
- </operation>
- </binding>
-
- <service name="PongService">
- <port name="PongPort" binding="tns:PongSoapBinding">
- <soap:address location="http://localhost:8085/ode/processes/pong"/>
- </port>
- </service>
-
- <plnk:partnerLinkType name="PongPartnerLinkType">
- <plnk:role name="Provider" portType="tns:PongPortType"/>
- </plnk:partnerLinkType>
-</definitions>
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 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
- xmlns:process="http://tuscany.apache.org/implementation/bpel/example/pong.bpel"
- xmlns:pong="http://tuscany.apache.org/implementation/bpel/example/pong.wsdl">
-
- <process name="process:Pong">
- <active>true</active>
- <provide partnerLink="PongPartnerLink">
- <service name="pong:PongService" port="PongPort"/>
- </provide>
- </process>
-
-</deploy>
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 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<process
- name="Pong"
- xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
- targetNamespace="http://tuscany.apache.org/implementation/bpel/example/pong.bpel"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:tns="http://tuscany.apache.org/implementation/bpel/example/pong.bpel"
- xmlns:pong="http://tuscany.apache.org/implementation/bpel/example/pong.wsdl"
- expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
-
- <import location="pong.wsdl"
- namespace="http://tuscany.apache.org/implementation/bpel/example/pong.wsdl"
- importType="http://schemas.xmlsoap.org/wsdl/" />
-
-
- <partnerLinks>
- <partnerLink name="PongPartnerLink"
- partnerLinkType="pong:PongPartnerLinkType"
- myRole="Provider" />
- </partnerLinks>
-
- <variables>
- <variable messageType="pong:PongRequest" name="pongRequest"/>
- <variable messageType="pong:PongResponse" name="pongResponse"/>
- <variable type="xsd:string" name="text" />
- </variables>
-
- <sequence name="Main">
- <receive name="pongReceive"
- createInstance="yes"
- operation="Pong"
- partnerLink="PongPartnerLink"
- portType="pong:PongPortType"
- variable="pongRequest"/>
-
- <assign name="assignPongRequest">
- <!-- add "ping" text to the input text -->
- <copy>
- <from>concat($pongRequest.body/pong:text, ' pong')</from>
- <to>$text</to>
- </copy>
- <!-- initialize pongResponse -->
- <copy>
- <from>
- <literal>
- <pong:PongRequest>
- <pong:text/>
- </pong:PongRequest>
- </literal>
- </from>
- <to>$pongResponse.body</to>
- </copy>
- <!-- copy new text into pongResponse -->
- <copy>
- <from>$text</from>
- <to>$pongResponse.body/pong:text</to>
- </copy>
- </assign>
-
- <reply name="pongReply"
- partnerLink="PongPartnerLink"
- portType="pong:PongPortType"
- operation="Pong"
- variable="pongResponse"/>
- </sequence>
-</process>
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 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--
- * 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.
--->
-<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
- <service name="PongService">
- <interface.wsdl interface="http://tuscany.apache.org/implementation/bpel/example/pong.wsdl#wsdl.interface(PongPortType)" />
- </service>
-
-</componentType> \ 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 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://bpel"
- xmlns:pong="http://tuscany.apache.org/implementation/bpel/example/pong.bpel"
- name="pong">
-
- <component name="BPELPongComponent">
- <implementation.bpel process="pong:Pong"/>
- </component>
-
-</composite> \ 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 @@
-<?xml version="1.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.
- -->
-<definitions name="Pong"
- targetNamespace="http://tuscany.apache.org/implementation/bpel/example/pong.wsdl"
- xmlns:tns="http://tuscany.apache.org/implementation/bpel/example/pong.wsdl"
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
- xmlns="http://schemas.xmlsoap.org/wsdl/">
-
- <types>
- <schema targetNamespace="http://tuscany.apache.org/implementation/bpel/example/pong.wsdl"
- xmlns="http://www.w3.org/2001/XMLSchema">
- <element name="PongRequest">
- <complexType>
- <all>
- <element name="text" type="string"/>
- </all>
- </complexType>
- </element>
- <element name="PongResponse">
- <complexType>
- <all>
- <element name="text" type="string"/>
- </all>
- </complexType>
- </element>
- </schema>
- </types>
-
- <message name="PongRequest">
- <part name="body" element="tns:PongRequest"/>
- </message>
-
- <message name="PongResponse">
- <part name="body" element="tns:PongResponse"/>
- </message>
-
- <portType name="PongPortType">
- <operation name="Pong">
- <input message="tns:PongRequest"/>
- <output message="tns:PongResponse"/>
- </operation>
- </portType>
-
- <binding name="PongSoapBinding" type="tns:PongPortType">
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
- <operation name="Pong">
- <soap:operation soapAction=""/>
- <input name="PongRequest">
- <soap:body use="literal"/>
- </input>
- <output name="PongResponse">
- <soap:body use="literal"/>
- </output>
- </operation>
- </binding>
-
- <service name="PongService">
- <port name="PongPort" binding="tns:PongSoapBinding">
- <soap:address location="http://localhost:8085/ode/processes/pong"/>
- </port>
- </service>
-
- <plnk:partnerLinkType name="PongPartnerLinkType">
- <plnk:role name="Provider" portType="tns:PongPortType"/>
- </plnk:partnerLinkType>
-
- <!--
-
- This is an abstract interface/portType definition. Note the lack of
- binding and service. Since Pong is only exposed on the JBI bus, the
- JBI endpoint is defined in Pong.dd.
-
- -->
-
-</definitions>