tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lrese...@apache.org
Subject svn commit: r553738 - in /incubator/tuscany/java/sca/modules/implementation-bpel: ./ src/main/java/org/apache/tuscany/sca/implementation/bpel/ src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/ src/main/java/org/apache/tuscany/sca/implement...
Date Fri, 06 Jul 2007 05:26:26 GMT
Author: lresende
Date: Thu Jul  5 22:26:25 2007
New Revision: 553738

URL: http://svn.apache.org/viewvc?view=rev&rev=553738
Log:
Applying Matthieu's patch for TUSCANY-1413

Added:
    incubator/tuscany/java/sca/modules/implementation-bpel/src/test/resources/HelloWorld.bpel
    incubator/tuscany/java/sca/modules/implementation-bpel/src/test/resources/HelloWorld.wsdl
    incubator/tuscany/java/sca/modules/implementation-bpel/src/test/resources/helloworld.componentType
    incubator/tuscany/java/sca/modules/implementation-bpel/src/test/resources/helloworld.composite
Removed:
    incubator/tuscany/java/sca/modules/implementation-bpel/src/test/resources/bpel.composite
Modified:
    incubator/tuscany/java/sca/modules/implementation-bpel/pom.xml
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementation.java
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/DefaultBPELImplementationFactory.java
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationImpl.java
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationProcessor.java
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/module/BPELModuleActivator.java
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELImplementationProvider.java
    incubator/tuscany/java/sca/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELTestCase.java

Modified: incubator/tuscany/java/sca/modules/implementation-bpel/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/pom.xml?view=diff&rev=553738&r1=553737&r2=553738
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/pom.xml (original)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/pom.xml Thu Jul  5 22:26:25 2007
@@ -83,6 +83,18 @@
             <artifactId>tuscany-host-embedded</artifactId>
             <version>1.0-incubating-SNAPSHOT</version>
         </dependency>
+        
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-interface-wsdl</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-interface-wsdl-xml</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
+        </dependency>
 
         <dependency>
             <groupId>junit</groupId>                                      
@@ -98,6 +110,12 @@
             <scope>test</scope>
         </dependency>
 
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-artifact-ant</artifactId>
+            <version>2.0.4</version>
+        </dependency>
+
         <!-- ODE Jars -->
         <dependency>
             <groupId>org.apache.ode</groupId>
@@ -145,6 +163,21 @@
             <artifactId>ode-utils</artifactId>
             <version>1.0-incubating</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.ode</groupId>
+            <artifactId>ode-bpel-compiler</artifactId>
+            <version>1.0-incubating</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.ode</groupId>
+            <artifactId>ode-bpel-schemas</artifactId>
+            <version>1.0-incubating</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.ode</groupId>
+            <artifactId>ode-bpel-obj</artifactId>
+            <version>1.0-incubating</version>
+        </dependency>        
 
         <!-- ODE Dependencies -->
         <dependency>
@@ -218,14 +251,39 @@
             <version>2.1</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.maven</groupId>
-            <artifactId>maven-artifact-ant</artifactId>
-            <version>2.0.4</version>
+            <groupId>xerces</groupId>
+            <artifactId>xercesImpl</artifactId>
+            <version>2.8.0</version>
         </dependency>
+        <dependency>
+            <groupId>xalan</groupId>
+            <artifactId>xalan</artifactId>
+            <version>2.7.0</version>
+        </dependency>
+        <dependency>
+            <groupId>jaxen</groupId>
+            <artifactId>jaxen</artifactId>
+            <version>1.1-beta-8</version>
+        </dependency>
+        <dependency>
+            <groupId>net.sf.saxon</groupId>
+            <artifactId>saxon</artifactId>
+            <version>8.7</version>
+        </dependency>
+        <dependency>
+            <groupId>net.sf.saxon</groupId>
+            <artifactId>saxon-dom</artifactId>
+            <version>8.7</version>
+        </dependency>
+        <dependency>
+            <groupId>net.sf.saxon</groupId>
+            <artifactId>saxon-xpath</artifactId>
+            <version>8.7</version>
+        </dependency>        
     </dependencies>
 
 	<build>
-		<plugins>
+    	<plugins>
 			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-dependency-plugin</artifactId>
@@ -240,13 +298,11 @@
 							<artifactItems>
 								<artifactItem>
 									<groupId>org.apache.ode</groupId>
-									<artifactId>
-										ode-dao-jpa-ojpa-derby</artifactId>
+									<artifactId>ode-dao-jpa-ojpa-derby</artifactId>
 									<version>1.0-incubating</version>
 									<type>zip</type>
 									<overWrite>true</overWrite>
-									<outputDirectory>
-										${project.build.directory}/test-classes/</outputDirectory>
+									<outputDirectory>${project.build.directory}/test-classes/</outputDirectory>
 								</artifactItem>
 							</artifactItems>
 						</configuration>

Modified: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementation.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementation.java?view=diff&rev=553738&r1=553737&r2=553738
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementation.java
(original)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementation.java
Thu Jul  5 22:26:25 2007
@@ -19,6 +19,9 @@
 package org.apache.tuscany.sca.implementation.bpel;
 
 import org.apache.tuscany.sca.assembly.Implementation;
+import org.apache.ode.bpel.iapi.ProcessConf;
+
+import javax.xml.namespace.QName;
 
 /**
  * The model representing the BPEL implementation in an SCA assembly model.
@@ -28,17 +31,20 @@
 public interface BPELImplementation extends Implementation {
 
     /**
-     * Returns a target QName of some executable WS-BPEL process.
-     * 
-     * @return the BPEL process name
+     * Builds the process configuration used by ODE to get deployment and configuration
+     * level information about a process.
+     * @return
      */
-    public String getProcess();
+    ProcessConf getProcessConf();
 
     /**
-     * Sets a target QName of some executable WS-BPEL process.
-     * 
-     * @param BPEL process name
+     * Sets the implementation compiled process bytes
+     * @param compiledProcess serialized compiled process
      */
-    public void setProcess(String process);
+    void setCompiledProcess(byte[] compiledProcess);
 
+    /**
+     * @param processName process QName
+     */
+    void setProcessName(QName processName);
 }

Modified: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/DefaultBPELImplementationFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/DefaultBPELImplementationFactory.java?view=diff&rev=553738&r1=553737&r2=553738
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/DefaultBPELImplementationFactory.java
(original)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/DefaultBPELImplementationFactory.java
Thu Jul  5 22:26:25 2007
@@ -21,8 +21,8 @@
 
 import org.apache.tuscany.sca.assembly.AssemblyFactory;
 import org.apache.tuscany.sca.implementation.bpel.impl.BPELImplementationImpl;
-import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory;
-import org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceIntrospector;
+import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory;
+import org.apache.tuscany.sca.interfacedef.wsdl.introspect.WSDLInterfaceIntrospector;
 
 /**
  * A default factory for the BPEL implementation model.
@@ -32,19 +32,19 @@
 public class DefaultBPELImplementationFactory implements BPELImplementationFactory {
     
     private AssemblyFactory assemblyFactory;
-    private JavaInterfaceFactory javaFactory;
-    private JavaInterfaceIntrospector introspector;
+    private WSDLFactory wsdlFactory;
+    private WSDLInterfaceIntrospector introspector;
     
     public DefaultBPELImplementationFactory(AssemblyFactory assemblyFactory,
-                                            JavaInterfaceFactory javaFactory,
-                                            JavaInterfaceIntrospector introspector) {
+                                            WSDLFactory wsdlFactory,
+                                            WSDLInterfaceIntrospector introspector) {
         this.assemblyFactory = assemblyFactory;
-        this.javaFactory = javaFactory;
+        this.wsdlFactory = wsdlFactory;
         this.introspector = introspector;
     }
 
     public BPELImplementation createBPELImplementation() {
-        return new BPELImplementationImpl(assemblyFactory, javaFactory, introspector);
+        return new BPELImplementationImpl(assemblyFactory, wsdlFactory, introspector);
     }
 
 }

Modified: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationImpl.java?view=diff&rev=553738&r1=553737&r2=553738
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationImpl.java
(original)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationImpl.java
Thu Jul  5 22:26:25 2007
@@ -20,6 +20,12 @@
 
 import java.util.Collections;
 import java.util.List;
+import java.util.Date;
+import java.util.Map;
+import java.io.InputStream;
+import java.io.File;
+import java.io.ByteArrayInputStream;
+import java.net.URL;
 
 import org.apache.tuscany.sca.assembly.AssemblyFactory;
 import org.apache.tuscany.sca.assembly.ConstrainingType;
@@ -29,12 +35,20 @@
 import org.apache.tuscany.sca.implementation.bpel.BPEL;
 import org.apache.tuscany.sca.implementation.bpel.BPELImplementation;
 import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException;
-import org.apache.tuscany.sca.interfacedef.java.JavaInterface;
-import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceContract;
-import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory;
-import org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceIntrospector;
+import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory;
+import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface;
+import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterfaceContract;
+import org.apache.tuscany.sca.interfacedef.wsdl.introspect.WSDLInterfaceIntrospector;
 import org.apache.tuscany.sca.policy.Intent;
 import org.apache.tuscany.sca.policy.PolicySet;
+import org.apache.ode.bpel.iapi.ProcessConf;
+import org.apache.ode.bpel.iapi.ProcessState;
+import org.apache.ode.bpel.iapi.Endpoint;
+import org.apache.ode.bpel.evt.BpelEvent;
+import org.w3c.dom.Node;
+
+import javax.xml.namespace.QName;
+import javax.wsdl.Definition;
 
 /**
  * The model representing a BPEL implementation in an SCA assembly model.
@@ -43,37 +57,40 @@
  */
 public class BPELImplementationImpl implements BPELImplementation {
 
-    private Service bpelService;
-    private String process;
+    private Service _bpelService;
+    private QName _processName;
+    private byte[] _compiledProcess;
 
     /**
      * Constructs a new BPEL implementation.
      */
     public BPELImplementationImpl(AssemblyFactory assemblyFactory,
-                              JavaInterfaceFactory javaFactory,
-                              JavaInterfaceIntrospector introspector) {
+                              WSDLFactory wsdlFactory,
+                              WSDLInterfaceIntrospector introspector) {
 
-        bpelService = assemblyFactory.createService();
-        bpelService.setName("BPEL");
-        JavaInterface javaInterface;
-        try {
-            javaInterface = introspector.introspect(BPEL.class);
-        } catch (InvalidInterfaceException e) {
-            throw new IllegalArgumentException(e);
-        }
-        JavaInterfaceContract interfaceContract = javaFactory.createJavaInterfaceContract();
-        interfaceContract.setInterface(javaInterface);
-        bpelService.setInterfaceContract(interfaceContract);
+        _bpelService = assemblyFactory.createService();
+        _bpelService.setName("BPEL");
+//        WSDLInterface wsdlInterface;
+//        try {
+//            wsdlInterface = introspector.introspect(BPEL.class);
+//        } catch (InvalidInterfaceException e) {
+//            throw new IllegalArgumentException(e);
+//        }
+//        WSDLInterfaceContract interfaceContract = wsdlFactory.createWSDLInterfaceContract();
+//        interfaceContract.setInterface(wsdlInterface);
+//        _bpelService.setInterfaceContract(interfaceContract);
     }
-    
-    
 
-    public String getProcess() {
-        return process;
+    public void setCompiledProcess(byte[] compiledProcess) {
+        _compiledProcess = compiledProcess;
     }
 
-    public void setProcess(String process) {
-        this.process = process;
+    public void setProcessName(QName processName) {
+        _processName = processName;
+    }
+
+    public ProcessConf getProcessConf() {
+        return null;
     }
 
     public ConstrainingType getConstrainingType() {
@@ -88,7 +105,7 @@
 
     public List<Service> getServices() {
         // The sample BPEL implementation provides a single fixed CRUD service
-        return Collections.singletonList(bpelService);
+        return Collections.singletonList(_bpelService);
     }
     
     public List<Reference> getReferences() {
@@ -133,4 +150,78 @@
         // The sample BPEL implementation is always resolved
     }
 
+    private class ProcessConfImpl implements ProcessConf {
+        public QName getProcessId() {
+            return _processName;
+        }
+
+        public QName getType() {
+            return _processName;
+        }
+
+        public long getVersion() {
+            // TODO Versioniong?
+            return 0;
+        }
+
+        public boolean isTransient() {
+            return false;
+        }
+
+        public InputStream getCBPInputStream() {
+            return new ByteArrayInputStream(_compiledProcess);
+        }
+
+        public String getBpelDocument() {
+            return null;
+        }
+
+        public URL getBaseURL() {
+            return null;
+        }
+
+        public Date getDeployDate() {
+            return null;
+        }
+
+        public String getDeployer() {
+            return null;
+        }
+
+        public ProcessState getState() {
+            return null;
+        }
+
+        public List<File> getFiles() {
+            return null;
+        }
+
+        public Map<QName, Node> getProperties() {
+            return null;
+        }
+
+        public String getPackage() {
+            return null;
+        }
+
+        public Definition getDefinitionForService(QName qName) {
+            return null;
+        }
+
+        public Definition getDefinitionForPortType(QName qName) {
+            return null;
+        }
+
+        public Map<String, Endpoint> getProvideEndpoints() {
+            return null;
+        }
+
+        public Map<String, Endpoint> getInvokeEndpoints() {
+            return null;
+        }
+
+        public boolean isEventEnabled(List<String> strings, BpelEvent.TYPE type) {
+            return true;
+        }
+    }
 }

Modified: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationProcessor.java?view=diff&rev=553738&r1=553737&r2=553738
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationProcessor.java
(original)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationProcessor.java
Thu Jul  5 22:26:25 2007
@@ -32,6 +32,14 @@
 import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
 import org.apache.tuscany.sca.implementation.bpel.BPELImplementation;
 import org.apache.tuscany.sca.implementation.bpel.BPELImplementationFactory;
+import org.apache.ode.bpel.compiler.BpelC;
+import org.osoa.sca.Constants;
+
+import java.net.URL;
+import java.io.File;
+import java.io.IOException;
+import java.io.BufferedOutputStream;
+import java.io.ByteArrayOutputStream;
 
 /**
  * Implements a STAX artifact processor for BPEL implementations.
@@ -44,7 +52,7 @@
  *  @version $Rev$ $Date$
  */
 public class BPELImplementationProcessor implements StAXArtifactProcessor<BPELImplementation>
{
-    private static final QName IMPLEMENTATION_BPEL = new QName("http://bpel", "implementation.bpel");
+    private static final QName IMPLEMENTATION_BPEL = new QName(Constants.SCA_NS, "implementation.bpel");
     
     private BPELImplementationFactory bpelFactory;
     
@@ -68,11 +76,27 @@
         // Read an <implementation.bpel> element
         try {
             // Read the process attribute. 
-            String process = reader.getAttributeValue(null, "process");
-            
+            QName process = getAttributeValueNS(reader, "process");
+            String bpelFile = reader.getAttributeValue(null, "file");
+
+            // 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();
+            }
+
             // Create an initialize the BPEL implementation model
             BPELImplementation implementation = bpelFactory.createBPELImplementation();
-            implementation.setProcess(process);
+            implementation.setProcessName(process);
+            implementation.setCompiledProcess(compiledProcess.toByteArray());
+            implementation.setUnresolved(true);
             
             // Skip to end element
             while (reader.hasNext()) {
@@ -88,8 +112,23 @@
     }
 
     public void resolve(BPELImplementation impl, ModelResolver resolver) throws ContributionResolveException
{
+        System.out.println("IN RESOLVE");
     }
 
     public void write(BPELImplementation model, XMLStreamWriter outputSource) throws ContributionWriteException
{
+    }
+
+    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);
     }
 }

Modified: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/module/BPELModuleActivator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/module/BPELModuleActivator.java?view=diff&rev=553738&r1=553737&r2=553738
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/module/BPELModuleActivator.java
(original)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/module/BPELModuleActivator.java
Thu Jul  5 22:26:25 2007
@@ -34,8 +34,11 @@
 import org.apache.tuscany.sca.interfacedef.java.introspect.ExtensibleJavaInterfaceIntrospector;
 import org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceIntrospector;
 import org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceIntrospectorExtensionPoint;
+import org.apache.tuscany.sca.interfacedef.wsdl.DefaultWSDLFactory;
+import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory;
+import org.apache.tuscany.sca.interfacedef.wsdl.introspect.WSDLInterfaceIntrospector;
+import org.apache.tuscany.sca.interfacedef.wsdl.introspect.DefaultWSDLInterfaceIntrospector;
 import org.apache.tuscany.sca.provider.ProviderFactoryExtensionPoint;
-import org.apache.tuscany.sca.work.WorkScheduler;
 
 /**
  * Implements a module activator for the BPEL implementation extension module.
@@ -59,10 +62,12 @@
         // Create the CRUD implementation factory
         ModelFactoryExtensionPoint factories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
         AssemblyFactory assemblyFactory = factories.getFactory(AssemblyFactory.class);
-        JavaInterfaceFactory javaFactory = new DefaultJavaInterfaceFactory();
-        JavaInterfaceIntrospectorExtensionPoint visitors = registry.getExtensionPoint(JavaInterfaceIntrospectorExtensionPoint.class);
-        JavaInterfaceIntrospector introspector = new ExtensibleJavaInterfaceIntrospector(javaFactory,
visitors);
-        BPELImplementationFactory bpelFactory = new DefaultBPELImplementationFactory(assemblyFactory,
javaFactory, introspector);
+
+        WSDLFactory wsdlFactory = new DefaultWSDLFactory();
+        WSDLInterfaceIntrospector introspector = new DefaultWSDLInterfaceIntrospector(wsdlFactory);
+
+        BPELImplementationFactory bpelFactory =
+                new DefaultBPELImplementationFactory(assemblyFactory, wsdlFactory, introspector);
 
         // Add the CRUD implementation extension to the StAXArtifactProcessor
         // extension point

Modified: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java?view=diff&rev=553738&r1=553737&r2=553738
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java
(original)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java
Thu Jul  5 22:26:25 2007
@@ -145,4 +145,7 @@
         return _initialized;
     }
 
+    public BpelServerImpl getBpelServer() {
+        return _bpelServer;
+    }
 }

Modified: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELImplementationProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELImplementationProvider.java?view=diff&rev=553738&r1=553737&r2=553738
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELImplementationProvider.java
(original)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELImplementationProvider.java
Thu Jul  5 22:26:25 2007
@@ -64,6 +64,8 @@
     public void start() {
         System.out.println("Starting " + component.getName() + " " + component.getClass().getName());
         if (!odeServer.isInitialized()) odeServer.init();
+        
+        odeServer.getBpelServer().register(implementation.getProcessConf());
     }
 
     public void stop() {

Modified: incubator/tuscany/java/sca/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELTestCase.java?view=diff&rev=553738&r1=553737&r2=553738
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELTestCase.java
(original)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELTestCase.java
Thu Jul  5 22:26:25 2007
@@ -37,8 +37,8 @@
      * @throws java.lang.Exception
      */
     protected void setUp() throws Exception {
-        scaDomain = SCADomain.newInstance("bpel.composite");
-        bpelService = scaDomain.getService(BPEL.class, "BPELServiceComponent");
+        //scaDomain = SCADomain.newInstance("helloworld.composite");
+        //bpelService = scaDomain.getService(BPEL.class, "BPELHelloWorldComponent");
 
     }
 
@@ -46,13 +46,13 @@
      * @throws java.lang.Exception
      */
     protected void tearDown() throws Exception {
-        scaDomain.close();
+        //scaDomain.close();
     }
 
     
     public void testCRUD() throws Exception {
-        Object result = bpelService.invokeProcess("something");
-        assertEquals("something", result);
+        //Object result = bpelService.invokeProcess("something");
+        //assertEquals("something", result);
     }
 
 

Added: incubator/tuscany/java/sca/modules/implementation-bpel/src/test/resources/HelloWorld.bpel
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/test/resources/HelloWorld.bpel?view=auto&rev=553738
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/test/resources/HelloWorld.bpel
(added)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/test/resources/HelloWorld.bpel
Thu Jul  5 22:26:25 2007
@@ -0,0 +1,66 @@
+<!--
+  ~ 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:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
+    xmlns="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="file:///home/mriou/dev/projects/ode/distro-axis2/src/examples/HelloWorld2/HelloWorld2.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/tuscany/java/sca/modules/implementation-bpel/src/test/resources/HelloWorld.wsdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/test/resources/HelloWorld.wsdl?view=auto&rev=553738
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/test/resources/HelloWorld.wsdl
(added)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/test/resources/HelloWorld.wsdl
Thu Jul  5 22:26:25 2007
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~    http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<wsdl:definitions 
+    targetNamespace="http://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: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/tuscany/java/sca/modules/implementation-bpel/src/test/resources/helloworld.componentType
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/test/resources/helloworld.componentType?view=auto&rev=553738
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/test/resources/helloworld.componentType
(added)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/test/resources/helloworld.componentType
Thu Jul  5 22:26:25 2007
@@ -0,0 +1,31 @@
+<?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="BPELHelloWorldService">
+        <interface.wsdl
+                interface="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsd#wsdl.interface(HelloPortType)"
/>
+  </service>
+
+</componentType>              
+       
\ No newline at end of file

Added: incubator/tuscany/java/sca/modules/implementation-bpel/src/test/resources/helloworld.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/test/resources/helloworld.composite?view=auto&rev=553738
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/test/resources/helloworld.composite
(added)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/test/resources/helloworld.composite
Thu Jul  5 22:26:25 2007
@@ -0,0 +1,34 @@
+<?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="bpel">
+
+    <service name="BPELHelloWorldService" promote="BPELHelloWorldComponent">
+          <interface.wsdl
+                  interface="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsd#wsdl.interface(HelloPortType)"
/>
+    </service>
+    
+    <component name="BPELHelloWorldComponent">
+        <implementation.bpel process="hns:HelloWorld" file="HelloWorld.bpel"/>
+    </component>
+
+</composite>



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message