Author: charper
Date: Fri Aug 25 15:11:48 2006
New Revision: 436979
URL: http://svn.apache.org/viewvc?rev=436979&view=rev
Log:
some memorydao fixes and the start of a bpel test project
Added:
incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/MessageDAOImpl.java
incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/MessageExchangeDAOImpl.java
incubator/ode/trunk/bpel-test/
incubator/ode/trunk/bpel-test/pom.xml (with props)
incubator/ode/trunk/bpel-test/src/
incubator/ode/trunk/bpel-test/src/main/
incubator/ode/trunk/bpel-test/src/main/java/
incubator/ode/trunk/bpel-test/src/main/java/org/
incubator/ode/trunk/bpel-test/src/main/java/org/apache/
incubator/ode/trunk/bpel-test/src/main/java/org/apache/ode/
incubator/ode/trunk/bpel-test/src/main/java/org/apache/ode/test/
incubator/ode/trunk/bpel-test/src/main/java/org/apache/ode/test/BindingContextImpl.java
incubator/ode/trunk/bpel-test/src/main/java/org/apache/ode/test/scheduler/
incubator/ode/trunk/bpel-test/src/main/java/org/apache/ode/test/scheduler/TestScheduler.java
incubator/ode/trunk/bpel-test/src/test/
incubator/ode/trunk/bpel-test/src/test/java/
incubator/ode/trunk/bpel-test/src/test/java/org/
incubator/ode/trunk/bpel-test/src/test/java/org/apache/
incubator/ode/trunk/bpel-test/src/test/java/org/apache/ode/
incubator/ode/trunk/bpel-test/src/test/java/org/apache/ode/test/
incubator/ode/trunk/bpel-test/src/test/java/org/apache/ode/test/BPELTest.java
incubator/ode/trunk/bpel-test/src/test/resources/
incubator/ode/trunk/bpel-test/src/test/resources/bpel/
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/HelloWorld2/
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/HelloWorld2/HelloWorld2.bpel
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/HelloWorld2/HelloWorld2.wsdl
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/HelloWorld2/deploy.xml
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/HelloWorld2/test.properties
Modified:
incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/BpelDAOConnectionImpl.java
incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/ProcessDaoImpl.java
Modified:
incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/BpelDAOConnectionImpl.java
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/BpelDAOConnectionImpl.java?rev=436979&r1=436978&r2=436979&view=diff
==============================================================================
---
incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/BpelDAOConnectionImpl.java
(original)
+++
incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/BpelDAOConnectionImpl.java
Fri Aug 25 15:11:48 2006
@@ -5,6 +5,18 @@
*/
package org.apache.ode.bpel.memdao;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
import org.apache.ode.bpel.common.BpelEventFilter;
import org.apache.ode.bpel.common.Filter;
import org.apache.ode.bpel.common.InstanceFilter;
@@ -20,16 +32,6 @@
import org.apache.ode.utils.stl.CollectionsX;
import org.apache.ode.utils.stl.UnaryFunction;
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
/**
* A very simple, in-memory implementation of the [EMAIL PROTECTED]
BpelDAOConnection} interface.
@@ -37,17 +39,26 @@
class BpelDAOConnectionImpl implements BpelDAOConnection {
private Map<QName, ProcessDaoImpl> _store;
private List<BpelEvent> _events = new LinkedList<BpelEvent>();
+ private static Map<String,MessageExchangeDAO> _mexStore =
Collections.synchronizedMap(new HashMap<String,MessageExchangeDAO>());
+ private static long counter = 0;
+
BpelDAOConnectionImpl(Map<QName, ProcessDaoImpl> store) {
_store = store;
}
+
+ private synchronized String getId() {
+ return Long.toString(counter++);
+ }
public ProcessDAO getProcess(QName processId) {
return _store.get(processId);
}
public ProcessDAO createProcess(QName pid, QName type) {
- return null;
+ ProcessDaoImpl process = new ProcessDaoImpl(this,_store,pid,type);
+ _store.put(pid,process);
+ return process;
}
public ProcessInstanceDAO getInstance(Long iid) {
@@ -147,13 +158,14 @@
}
public MessageExchangeDAO createMessageExchange(char dir) {
- // TODO implement this.
- throw new UnsupportedOperationException("Implement me.");
+ String id = getId();
+ MessageExchangeDAO mex = new MessageExchangeDAOImpl(dir,id);
+ _mexStore.put(id,mex);
+ return mex;
}
public MessageExchangeDAO getMessageExchange(String mexid) {
- // TODO implement this.
- throw new UnsupportedOperationException("Implement me.");
+ return _mexStore.get(mexid);
}
private int compareInstanceUsingKey(String key, ProcessInstanceDAO
instanceDAO1, ProcessInstanceDAO instanceDAO2) {
Added:
incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/MessageDAOImpl.java
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/MessageDAOImpl.java?rev=436979&view=auto
==============================================================================
---
incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/MessageDAOImpl.java
(added)
+++
incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/MessageDAOImpl.java
Fri Aug 25 15:11:48 2006
@@ -0,0 +1,43 @@
+package org.apache.ode.bpel.memdao;
+
+import javax.xml.namespace.QName;
+
+import org.apache.ode.bpel.dao.MessageDAO;
+import org.apache.ode.bpel.dao.MessageExchangeDAO;
+import org.apache.ode.utils.DOMUtils;
+import org.w3c.dom.Element;
+
+public class MessageDAOImpl implements MessageDAO {
+
+ private QName type;
+ private Element data;
+ private MessageExchangeDAO messageExchange;
+
+ public MessageDAOImpl(MessageExchangeDAO messageExchange) {
+ this.messageExchange = messageExchange;
+ }
+
+ public void setType(QName type) {
+ this.type = type;
+ }
+
+ public QName getType() {
+ return type;
+ }
+
+ public void setData(Element value) {
+ this.data = value;
+ }
+
+ public Element getData() {
+ if ( data == null ) {
+ data = DOMUtils.newDocument().getDocumentElement();
+ }
+ return data;
+ }
+
+ public MessageExchangeDAO getMessageExchange() {
+ return messageExchange;
+ }
+
+}
Added:
incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/MessageExchangeDAOImpl.java
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/MessageExchangeDAOImpl.java?rev=436979&view=auto
==============================================================================
---
incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/MessageExchangeDAOImpl.java
(added)
+++
incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/MessageExchangeDAOImpl.java
Fri Aug 25 15:11:48 2006
@@ -0,0 +1,216 @@
+package org.apache.ode.bpel.memdao;
+
+import java.util.Date;
+import java.util.Properties;
+
+import javax.xml.namespace.QName;
+
+import org.apache.ode.bpel.dao.MessageDAO;
+import org.apache.ode.bpel.dao.MessageExchangeDAO;
+import org.apache.ode.bpel.dao.ProcessDAO;
+import org.apache.ode.bpel.dao.ProcessInstanceDAO;
+import org.w3c.dom.Element;
+
+public class MessageExchangeDAOImpl implements MessageExchangeDAO {
+
+ private String messageExchangeId;
+ private MessageDAO response;
+ private Date createTime;
+ private MessageDAO request;
+ private String operation;
+ private QName portType;
+ private String status;
+ private int partnerLinkModelId;
+ private String correlationId;
+ private String pattern;
+ private Element ePR;
+ private Element callbackEPR;
+ private String channel;
+ private boolean propagateTransactionFlag;
+ private String fault;
+ private String correlationStatus;
+ private ProcessDAO process;
+ private ProcessInstanceDAO instance;
+ private char direction;
+ private QName callee;
+ private Properties properties;
+
+ public MessageExchangeDAOImpl(char direction, String mesageEchangeId){
+ this.direction = direction;
+ this.messageExchangeId = mesageEchangeId;
+ }
+
+ public String getMessageExchangeId() {
+ return messageExchangeId;
+ }
+
+ public MessageDAO getResponse() {
+ return response;
+ }
+
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ public MessageDAO getRequest() {
+ return request;
+ }
+
+ public String getOperation() {
+ return operation;
+ }
+
+ public QName getPortType() {
+ return portType;
+ }
+
+ public void setPortType(QName porttype) {
+ this.portType = porttype;
+
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+
+ }
+
+ public String getStatus() {
+ return status;
+ }
+
+ public MessageDAO createMessage(QName type) {
+ MessageDAO messageDAO = new MessageDAOImpl(this);
+ messageDAO.setType(type);
+ return messageDAO;
+ }
+
+ public void setRequest(MessageDAO msg) {
+ this.request = msg;
+
+ }
+
+ public void setResponse(MessageDAO msg) {
+ this.response = msg;
+
+ }
+
+ public int getPartnerLinkModelId() {
+ return partnerLinkModelId;
+ }
+
+ public void setPartnerLinkModelId(int modelId) {
+ this.partnerLinkModelId = modelId;
+
+ }
+
+ public String getCorrelationId() {
+ return correlationId;
+ }
+
+ public void setCorrelationId(String correlationId) {
+ this.correlationId = correlationId;
+
+ }
+
+ public void setPattern(String string) {
+ this.pattern = string;
+
+ }
+
+ public void setOperation(String opname) {
+ this.operation = opname;
+
+ }
+
+ public void setEPR(Element epr) {
+ this.ePR = epr;
+
+ }
+
+ public Element getEPR() {
+ return ePR;
+ }
+
+ public void setCallbackEPR(Element epr) {
+ this.callbackEPR = epr;
+
+ }
+
+ public Element getCallbackEPR() {
+ return callbackEPR;
+ }
+
+ public String getPattern() {
+ return pattern;
+ }
+
+ public String getChannel() {
+ return channel;
+ }
+
+ public void setChannel(String string) {
+ this.channel = string;
+ }
+
+ public boolean getPropagateTransactionFlag() {
+ return propagateTransactionFlag;
+ }
+
+ public String getFault() {
+ return fault;
+ }
+
+ public void setFault(String faultType) {
+ this.fault = faultType;
+
+ }
+
+ public void setCorrelationStatus(String cstatus) {
+ this.correlationStatus = cstatus;
+
+ }
+
+ public String getCorrelationStatus() {
+ return correlationStatus;
+ }
+
+ public ProcessDAO getProcess() {
+ return process;
+ }
+
+ public void setProcess(ProcessDAO process) {
+ this.process = process;
+
+ }
+
+ public void setInstance(ProcessInstanceDAO dao) {
+ this.instance = dao;
+
+ }
+
+ public ProcessInstanceDAO getInstance() {
+ return instance;
+ }
+
+ public char getDirection() {
+ return direction;
+ }
+
+ public QName getCallee() {
+ return callee;
+ }
+
+ public void setCallee(QName callee) {
+ this.callee = callee;
+
+ }
+
+ public String getProperty(String key) {
+ return properties.getProperty(key);
+ }
+
+ public void setProperty(String key, String value) {
+ properties.setProperty(key,value);
+ }
+
+}
Modified:
incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/ProcessDaoImpl.java
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/ProcessDaoImpl.java?rev=436979&r1=436978&r2=436979&view=diff
==============================================================================
---
incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/ProcessDaoImpl.java
(original)
+++
incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/ProcessDaoImpl.java
Fri Aug 25 15:11:48 2006
@@ -38,7 +38,7 @@
private final Map<String, CorrelatorDAO> _correlators = new
ConcurrentHashMap<String, CorrelatorDAO>();
protected final Map<Long, ProcessInstanceDAO> _instances = new
ConcurrentHashMap<Long, ProcessInstanceDAO>();
protected final Map<Integer, PartnerLinkDAO> _plinks = new
ConcurrentHashMap<Integer, PartnerLinkDAO>();
- private Map<String, ProcessDaoImpl> _store;
+ private Map<QName, ProcessDaoImpl> _store;
private BpelDAOConnectionImpl _conn;
private final Date _deployDate = new Date();
private boolean _retired;
@@ -47,7 +47,7 @@
private MultiKeyMap _properties = new MultiKeyMap();
public ProcessDaoImpl(BpelDAOConnectionImpl conn,
- Map<String, ProcessDaoImpl> store,
+ Map<QName, ProcessDaoImpl> store,
QName processId, QName type) {
if (__log.isDebugEnabled()) {
__log.debug("Creating ProcessDao object for process \"" +
processId + "\".");
Added: incubator/ode/trunk/bpel-test/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-test/pom.xml?rev=436979&view=auto
==============================================================================
--- incubator/ode/trunk/bpel-test/pom.xml (added)
+++ incubator/ode/trunk/bpel-test/pom.xml Fri Aug 25 15:11:48 2006
@@ -0,0 +1,46 @@
+<?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.
+ -->
+<project>
+ <groupId>ode</groupId>
+ <artifactId>ode-test</artifactId>
+ <name>ODE :: BPEL Tests</name>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>ode</groupId>
+ <artifactId>ode</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </parent>
+ <version>2.0-SNAPSHOT</version>
+ <properties>
+ <maven.test.skip>false</maven.test.skip>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>ode</groupId>
+ <artifactId>ode-bpel-runtime</artifactId>
+ </dependency>
+ </dependencies>
+</project>
Propchange: incubator/ode/trunk/bpel-test/pom.xml
------------------------------------------------------------------------------
svn:executable = *
Added:
incubator/ode/trunk/bpel-test/src/main/java/org/apache/ode/test/BindingContextImpl.java
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-test/src/main/java/org/apache/ode/test/BindingContextImpl.java?rev=436979&view=auto
==============================================================================
---
incubator/ode/trunk/bpel-test/src/main/java/org/apache/ode/test/BindingContextImpl.java
(added)
+++
incubator/ode/trunk/bpel-test/src/main/java/org/apache/ode/test/BindingContextImpl.java
Fri Aug 25 15:11:48 2006
@@ -0,0 +1,42 @@
+package org.apache.ode.test;
+
+import javax.wsdl.PortType;
+import javax.xml.namespace.QName;
+
+import org.apache.ode.bpel.iapi.BindingContext;
+import org.apache.ode.bpel.iapi.DeploymentUnit;
+import org.apache.ode.bpel.iapi.Endpoint;
+import org.apache.ode.bpel.iapi.EndpointReference;
+import org.apache.ode.bpel.iapi.PartnerRoleChannel;
+import org.apache.ode.utils.DOMUtils;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+public class BindingContextImpl implements BindingContext {
+
+ public Element activateMyRoleEndpoint(QName processId,
+ DeploymentUnit deploymentUnit, Endpoint myRoleEndpoint,
+ PortType portType) {
+
+ Document doc = DOMUtils.newDocument();
+ Element serviceref =
doc.createElementNS(EndpointReference.SERVICE_REF_QNAME.getNamespaceURI(),
+ EndpointReference.SERVICE_REF_QNAME.getLocalPart());
+
serviceref.setNodeValue(deploymentUnit.getDefinitionForNamespace(myRoleEndpoint.serviceName
+ .getNamespaceURI()) +":" +
+ myRoleEndpoint.serviceName +":" +
+ myRoleEndpoint.portName);
+ doc.appendChild(serviceref);
+ return doc.getDocumentElement();
+ }
+
+ public void deactivateMyRoleEndpoint(Endpoint myRoleEndpoint) {
+
+ }
+
+ public PartnerRoleChannel createPartnerRoleChannel(QName processId,
+ DeploymentUnit deploymentUnit, PortType portType,
+ Endpoint initialPartnerEndpoint) {
+ return null;
+ }
+
+}
Added:
incubator/ode/trunk/bpel-test/src/main/java/org/apache/ode/test/scheduler/TestScheduler.java
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-test/src/main/java/org/apache/ode/test/scheduler/TestScheduler.java?rev=436979&view=auto
==============================================================================
---
incubator/ode/trunk/bpel-test/src/main/java/org/apache/ode/test/scheduler/TestScheduler.java
(added)
+++
incubator/ode/trunk/bpel-test/src/main/java/org/apache/ode/test/scheduler/TestScheduler.java
Fri Aug 25 15:11:48 2006
@@ -0,0 +1,38 @@
+package org.apache.ode.test.scheduler;
+
+import java.util.Date;
+import java.util.Map;
+import java.util.concurrent.Callable;
+
+import org.apache.ode.bpel.iapi.ContextException;
+import org.apache.ode.bpel.iapi.Scheduler;
+
+public class TestScheduler implements Scheduler {
+
+ public String schedulePersistedJob(Map<String, Object> arg0, Date arg1)
+ throws ContextException {
+ return null;
+ }
+
+ public String scheduleVolatileJob(boolean arg0, Map<String, Object>
arg1,
+ Date arg2) throws ContextException {
+ return null;
+ }
+
+ public void cancelJob(String arg0) throws ContextException {
+
+ }
+
+ public <T> T execTransaction(Callable<T> arg0) throws Exception,
+ ContextException {
+ T retval = arg0.call();
+ return retval;
+ }
+
+ public void start() {
+ }
+
+ public void stop() {
+ }
+
+}
Added:
incubator/ode/trunk/bpel-test/src/test/java/org/apache/ode/test/BPELTest.java
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-test/src/test/java/org/apache/ode/test/BPELTest.java?rev=436979&view=auto
==============================================================================
---
incubator/ode/trunk/bpel-test/src/test/java/org/apache/ode/test/BPELTest.java
(added)
+++
incubator/ode/trunk/bpel-test/src/test/java/org/apache/ode/test/BPELTest.java
Fri Aug 25 15:11:48 2006
@@ -0,0 +1,76 @@
+package org.apache.ode.test;
+
+import java.io.File;
+import java.util.Properties;
+import java.util.regex.Pattern;
+
+import javax.xml.namespace.QName;
+
+import junit.framework.TestCase;
+
+import org.apache.ode.bpel.engine.BpelServerImpl;
+import org.apache.ode.bpel.iapi.BpelServer;
+import org.apache.ode.bpel.iapi.Message;
+import org.apache.ode.bpel.iapi.MyRoleMessageExchange;
+import org.apache.ode.bpel.memdao.BpelDAOConnectionFactoryImpl;
+import org.apache.ode.test.scheduler.TestScheduler;
+import org.apache.ode.utils.DOMUtils;
+import org.w3c.dom.Element;
+
+public class BPELTest extends TestCase {
+
+ private BpelServer server;
+
+ @Override
+ protected void setUp() throws Exception {
+ server = new BpelServerImpl();
+ server.setDaoConnectionFactory(new
BpelDAOConnectionFactoryImpl());
+ server.setScheduler(new TestScheduler());
+ server.setBindingContext(new BindingContextImpl());
+ server.init();
+ server.start();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ server.stop();
+ }
+
+ private void go(String deployDir) throws Exception {
+
+ File testPropsFile = new File(deployDir+"/test.properties");
+ if ( !testPropsFile.exists()) {
+ System.err.println("can't find "+
testPropsFile.toString());
+ }
+ Properties testProps = new Properties();
+ testProps.load(testPropsFile.toURL().openStream());
+
+ QName serviceId = new QName(testProps.getProperty("namespace"),
+ testProps.getProperty("service"));
+ String operation = testProps.getProperty("operation");
+ String in = testProps.getProperty("request");
+ String responsePattern = testProps.getProperty("response");
+
+ server.getDeploymentService().deploy(new File(deployDir));
+
+ MyRoleMessageExchange mex =
server.getEngine().createMessageExchange("",serviceId,operation);
+
+ Message request = mex.createMessage(null);
+
+ Element elem = DOMUtils.stringToDOM(in);
+ request.setMessage(elem);
+
+ mex.invoke(request);
+
+ Message response = mex.getResponse();
+
+ String resp = DOMUtils.domToString(response.getMessage());
+
assertTrue(Pattern.compile(responsePattern,Pattern.DOTALL).matcher(resp).matches());
+
+ }
+
+ public void testHelloWorld2() throws Exception {
+ go("target/test-classes/bpel/2.0/HelloWorld2");
+ }
+
+}
Added:
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/HelloWorld2/HelloWorld2.bpel
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/HelloWorld2/HelloWorld2.bpel?rev=436979&view=auto
==============================================================================
---
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/HelloWorld2/HelloWorld2.bpel
(added)
+++
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/HelloWorld2/HelloWorld2.bpel
Fri Aug 25 15:11:48 2006
@@ -0,0 +1,49 @@
+<process name="HelloWorld2"
+ targetNamespace="http://ode/bpel/unit-test"
+ xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
+ xmlns="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
+ xmlns:tns="http://ode/bpel/unit-test"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:test="http://ode/bpel/unit-test.wsdl">
+
+ <import location="urn:/HelloWorld2.wsdl"
+ namespace="http://ode/bpel/unit-test.wsdl"
+ importType="http://schemas.xmlsoap.org/wsdl/" />
+
+ <partnerLinks>
+ <partnerLink name="helloPartnerLink"
+ partnerLinkType="test:HelloPartnerLinkType"
+ myRole="me" />
+ </partnerLinks>
+
+ <variables>
+ <variable name="myVar" messageType="test:HelloMessage"/>
+ <variable name="tmpVar" type="xsd:string"/>
+ </variables>
+
+ <sequence>
+ <receive
+ name="start"
+ partnerLink="helloPartnerLink"
+ portType="test:HelloPortType"
+ operation="hello"
+ variable="myVar"
+ createInstance="yes"/>
+
+ <assign name="assign1">
+ <copy>
+ <from variable="myVar" part="TestPart"/>
+ <to variable="tmpVar"/>
+ </copy>
+ <copy>
+ <from>concat($tmpVar,' World')"</from>
+ <to variable="myVar" part="TestPart"/>
+ </copy>
+ </assign>
+ <reply name="end"
+ partnerLink="helloPartnerLink"
+ portType="test:HelloPortType"
+ operation="hello"
+ variable="myVar"/>
+ </sequence>
+</process>
Added:
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/HelloWorld2/HelloWorld2.wsdl
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/HelloWorld2/HelloWorld2.wsdl?rev=436979&view=auto
==============================================================================
---
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/HelloWorld2/HelloWorld2.wsdl
(added)
+++
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/HelloWorld2/HelloWorld2.wsdl
Fri Aug 25 15:11:48 2006
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8" ?>
+
+<wsdl:definitions
+ targetNamespace="http://ode/bpel/unit-test.wsdl"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://ode/bpel/unit-test.wsdl"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
+ xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/">
+
+ <wsdl:message name="HelloMessage">
+ <wsdl:part name="TestPart" type="xsd:string"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloPortType">
+ <wsdl:operation name="hello">
+ <wsdl:input message="tns:HelloMessage" name="TestIn"/>
+ <wsdl:output message="tns:HelloMessage" name="TestOut"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType">
+ <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="hello">
+ <soap:operation soapAction="" style="rpc"/>
+ <wsdl:input>
+ <soap:body
+ namespace="http://ode/bpel/unit-test.wsdl"
+ use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body
+ namespace="http://ode/bpel/unit-test.wsdl"
+ use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="HelloService">
+ <wsdl:port name="HelloPort" binding="tns:HelloSoapBinding">
+ <soap:address
location="http://localhost:8080/ode/processes/helloWorld"/>
+ </wsdl:port>
+ </wsdl:service>
+
+ <plnk:partnerLinkType name="HelloPartnerLinkType">
+ <plnk:role name="me" portType="tns:HelloPortType"/>
+ <plnk:role name="you" portType="tns:HelloPortType"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
+
Added:
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/HelloWorld2/deploy.xml
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/HelloWorld2/deploy.xml?rev=436979&view=auto
==============================================================================
---
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/HelloWorld2/deploy.xml
(added)
+++
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/HelloWorld2/deploy.xml
Fri Aug 25 15:11:48 2006
@@ -0,0 +1,12 @@
+<deploy xmlns="http://ode.fivesight.com/schemas/2006/06/27/dd"
+ xmlns:pns="http://ode/bpel/unit-test"
+ xmlns:wns="http://ode/bpel/unit-test.wsdl">
+
+
+ <process name="pns:HelloWorld2">
+ <active>true</active>
+ <provide partnerLink="helloPartnerLink">
+ <service name="wns:HelloService" port="HelloPort"/>
+ </provide>
+ </process>
+</deploy>
Added:
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/HelloWorld2/test.properties
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/HelloWorld2/test.properties?rev=436979&view=auto
==============================================================================
---
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/HelloWorld2/test.properties
(added)
+++
incubator/ode/trunk/bpel-test/src/test/resources/bpel/2.0/HelloWorld2/test.properties
Fri Aug 25 15:11:48 2006
@@ -0,0 +1,6 @@
+namespace=http://ode/bpel/unit-test.wsdl
+service=HelloService
+operation=hello
+request=<message><TestPart>Hello</TestPart></message>
+response=.*Hello World.*
+