OW2 Consortium
Search OW2 Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | orchestra-commits List | July 2007 Index

<--  Date Index  --> <--  Thread Index  -->

[701] branches/Orchestra_4_0: +assembly of the project: maven allow to build the project and create a zip file of the project, with librairies, configuration files


Title: [701] branches/Orchestra_4_0: +assembly of the project: maven allow to build the project and create a zip file of the project, with librairies, configuration files
Revision
701
Author
giraudes
Date
2007-07-19 16:49:05 +0200 (Thu, 19 Jul 2007)

Log Message

+assembly of the project: maven allow to build the project and create a zip file of the project, with librairies, configuration files
+demos, and scripts to launch the engine and test a demo

Modified Paths

Added Paths

Removed Paths

Diff

Modified: branches/Orchestra_4_0/.classpath (700 => 701)


--- branches/Orchestra_4_0/.classpath	2007-07-16 14:52:05 UTC (rev 700)
+++ branches/Orchestra_4_0/.classpath	2007-07-19 14:49:05 UTC (rev 701)
@@ -2,7 +2,7 @@
 <classpath>
 	<classpathentry kind="src" path="src/main/java"/>
 	<classpathentry output="target/test-classes" kind="src" path="src/test/java"/>
-	<classpathentry kind="src" path="src/demo/java"/>
+	<classpathentry kind="src" path="src/demos"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
 	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>

Added: branches/Orchestra_4_0/LICENSE.txt ( => )




Property changes on: branches/Orchestra_4_0/LICENSE.txt
___________________________________________________________________
Name: svn:keywords
   + Id

Added: branches/Orchestra_4_0/NOTICE.txt ( => )




Property changes on: branches/Orchestra_4_0/NOTICE.txt
___________________________________________________________________
Name: svn:keywords
   + Id

Added: branches/Orchestra_4_0/README.txt (700 => 701)


--- branches/Orchestra_4_0/README.txt	2007-07-16 14:52:05 UTC (rev 700)
+++ branches/Orchestra_4_0/README.txt	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,13 @@
+to create the zip file of the project: mvn assembly:assembly -Dmaven.test.skip=true
+
+create the ORCHESTRA_HOME environment variable
+
+in the bin directory: ant deploy
+ant deploy
+ant start
+
+
+in the demos directory:
+ant deployWeather2
+ant callWeather2
+
Property changes on: branches/Orchestra_4_0/README.txt
___________________________________________________________________
Name: svn:keywords
   + Id

Deleted: branches/Orchestra_4_0/orchestra_4_0.jar


(Binary files differ)

Modified: branches/Orchestra_4_0/pom.xml (700 => 701)


--- branches/Orchestra_4_0/pom.xml	2007-07-16 14:52:05 UTC (rev 700)
+++ branches/Orchestra_4_0/pom.xml	2007-07-19 14:49:05 UTC (rev 701)
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project>
   <modelVersion>4.0.0</modelVersion>
-  <groupId>Orchestra_4_0</groupId>
-  <artifactId>Orchestra_4_0</artifactId>
-  <version>0.0.1</version>
+  <groupId>Orchestra</groupId>
+  <artifactId>Orchestra</artifactId>
+  <version>4.0.1</version>
   <packaging>jar</packaging>
 
 
@@ -47,14 +47,36 @@
     </repository>
   </repositories>
 
+  <profiles>
+    <profile>
+      <id>default-tools.jar</id>
+      <activation>
+        <property>
+          <name>java.vendor</name>
+          <value>Sun Microsystems Inc.</value>
+        </property>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>com.sun</groupId>
+          <artifactId>tools</artifactId>
+          <version>1.4.2</version>
+          <scope>system</scope>
+          <systemPath>
+            ${java.home}/../lib/tools.jar
+          </systemPath>
+        </dependency>
+      </dependencies>
+    </profile>
+  </profiles>
 
-
   <dependencies>
 
-     <dependency>
+    <dependency>
       <groupId>ant</groupId>
       <artifactId>ant</artifactId>
       <version>1.6.5</version>
+      <scope>runtime</scope>
     </dependency>
 
     <dependency>
@@ -87,17 +109,17 @@
         </exclusion>
       </exclusions>
     </dependency>
-
+
     <dependency>
       <groupId>org.apache.axis</groupId>
       <artifactId>axis-ant</artifactId>
       <version>1.4</version>
     </dependency>
+
+    <!-- LUCAS dependencies -->
 
-    <!-- LUCAS dependencies -->
-
-
- <dependency>
+
+    <dependency>
       <groupId>commons-configuration</groupId>
       <artifactId>commons-configuration</artifactId>
       <version>1.4</version>
@@ -107,17 +129,21 @@
           <artifactId>xerces</artifactId>
         </exclusion>
 
+        <exclusion>
+          <groupId>junit</groupId>
+          <artifactId>junit</artifactId>
+        </exclusion>
 
       </exclusions>
     </dependency>
 
-
+
     <dependency>
       <groupId>juddi</groupId>
       <artifactId>juddi</artifactId>
       <version>0.9RC4</version>
     </dependency>
-
+
     <dependency>
       <groupId>net.sourceforge.jena</groupId>
       <artifactId>jena</artifactId>
@@ -129,22 +155,22 @@
         </exclusion>
       </exclusions>
     </dependency>
-
+
     <dependency>
       <groupId>org.apache.woden</groupId>
       <artifactId>woden</artifactId>
       <version>1.0-incubating-M7a</version>
     </dependency>
-
+
     <dependency>
       <groupId>org.apache.ws.commons.schema</groupId>
       <artifactId>XmlSchema</artifactId>
       <version>1.3.1</version>
     </dependency>
-
+
     <!-- End of LUCAS dependencies -->
     <!-- SCT dependencies -->
-   <dependency>
+    <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-api</artifactId>
       <version>1.3.1</version>
@@ -160,20 +186,20 @@
       <version>0.9.5</version>
     </dependency>
 
-
+
     <!--
       unavailable from public repositories due to licence reasons
       it needs to be downloaded from http://java.sun.com/xml/downloads/jaxm.html
     -->
-
+
     <dependency>
       <groupId>javax.xml</groupId>
       <artifactId>jaxm-api</artifactId>
       <version>1.1.2</version>
     </dependency>
-
+
     <!-- End of SCT dependencies -->
-
+
     <dependency>
       <groupId>com.sun.xsom</groupId>
       <artifactId>xsom</artifactId>
@@ -186,8 +212,8 @@
 
       </exclusions>
     </dependency>
-
-   <dependency>
+
+    <dependency>
       <groupId>xalan</groupId>
       <artifactId>xalan</artifactId>
       <version>2.6.0</version>
@@ -236,11 +262,12 @@
       <artifactId>wsdl4j</artifactId>
       <version>1.6.2</version>
     </dependency>
-
+
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
-      <version>4.1</version>
+      <version>4.1</version>
+      <scope>test</scope>
     </dependency>
   </dependencies>
 
@@ -249,6 +276,15 @@
     <pluginManagement>
       <plugins>
         <plugin>
+          <artifactId>maven-assembly-plugin</artifactId>
+          <configuration>
+            <descriptor>
+              src/main/assembly/dep.xml
+            </descriptor>
+          </configuration>
+        </plugin>
+
+        <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-compiler-plugin</artifactId>
           <!-- best lock down version of the plugin too -->

Added: branches/Orchestra_4_0/src/bin/build.xml (700 => 701)


--- branches/Orchestra_4_0/src/bin/build.xml	2007-07-16 14:52:05 UTC (rev 700)
+++ branches/Orchestra_4_0/src/bin/build.xml	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,122 @@
+<project name="Orchestra_4_0" default="deploy" basedir=".">
+    <description>
+        Instal Orchestra_4_0.
+      Prerequies:
+        Axis must be instaled on TomCat.
+        The environment variable $CATALINA_HOME or $CATALINA_BASE must
+        be initialized.
+    </description>
+  <!-- set global properties for this build -->
+
+  <property environment="env"/>
+
+  <!--Axis properties-->
+  <property name="axis.base" value="${env.CATALINA_HOME}/webapps/axis/"/>
+  <property name="axis.lib" value="${axis.base}/WEB-INF/lib/"/>
+
+
+
+  <!--Orchestra properties-->
+  <property name="orchestra.home" value="${env.ORCHESTRA_HOME}"/>
+  <property name="orchestra.lib" value="${orchestra.home}/lib"/>
+
+
+
+  <!--Classpath definition-->
+
+
+   <path id="base.path">
+        <pathelement path="${classpath}"/>
+        <fileset dir="${orchestra.lib}">
+          <include name="**/*.jar"/>
+        </fileset>
+       <!-- Add the tools.jar -->
+      <fileset dir="${env.JAVA_HOME}/lib/">
+             <include name="tools.jar"/>
+      </fileset>
+   </path>
+
+
+
+
+
+
+  <target name="checkEnv">
+    <description>Check that environment variables have been set up.</description>
+  <echo>Check environments variable:</echo>
+    <echo message="CATALINA_HOME  : '${env.CATALINA_HOME}'"/>
+    <echo message="CATALINA_BASE  : '${env.CATALINA_BASE}'"/>
+    <echo message="JAVA_HOME      : '${env.JAVA_HOME}'"/>
+    <echo message="ORCHESTRA_HOME : '${env.ORCHESTRA_HOME}'"/>
+    <condition property="sys.failure">
+      <or>
+        <not>
+                 <isset property="env.CATALINA_BASE"/>
+                </not>
+                <equals arg1="" arg2="${env.CATALINA_BASE}"/>
+        <not>
+          <isset property="env.CATALINA_HOME"/>
+        </not>
+        <equals arg1="" arg2="${env.CATALINA_HOME}"/>
+        <not>
+          <isset property="env.JAVA_HOME"/>
+        </not>
+        <equals arg1="" arg2="${env.JAVA_HOME}"/>
+        <not>
+                  <isset property="env.ORCHESTRA_HOME"/>
+                </not>
+                <equals arg1="" arg2="${env.ORCHESTRA_HOME}"/>
+      </or>
+  </condition>
+
+
+  </target>
+
+    <target name="failure" depends="checkEnv" if="sys.failure">
+    <echo>ORCHESTRA_HOME, JAVA_HOME, CATALINA_HOME ant CATALINA_BASE must be defined.</echo>
+    </target>
+
+
+  <target name="deploy" depends="failure" unless="sys.failure">
+      <copy todir="${axis.lib}">
+        <fileset dir="${orchestra.lib}">
+          <include name="xercesImpl*.jar"/>
+           <include name="xsom*.jar"/>
+          <include name="Orchestra*.jar"/>
+        </fileset>
+      </copy>
+
+    <copy file="${orchestra.lib}/jws/ArchiveLoader.jws" todir="${axis.base}"/>
+
+    <echo>You can now restart Tomcat.</echo>
+  </target>
+
+
+  <target name="undeploy" depends="failure">
+  <delete file="${axis.base}/ArchiveLoader.jws"/>
+    <delete file="${axis.lib}/Orchestra*.jar"/>
+    <delete file="${axis.lib}/xercesImpl*.jar"/>
+    <delete file="${axis.lib}/xsom*.jar"/>
+
+  </target>
+
+
+
+
+  <target name="start"  depends="failure" unless="sys.failure">
+<!--Start the Process Deployer-->
+  <java classname="org.objectweb.orchestra.deployment.ProcessDeployerLauncher" fork="true" >
+    <arg value="${orchestra.home}"/>
+    <jvmarg value="-Djava.security.policy=${orchestra.home}/conf/server.policy"/>
+     <classpath refid="base.path"/>
+    </java>
+
+
+  </target>
+
+
+</project>
+
+
+
+
Property changes on: branches/Orchestra_4_0/src/bin/build.xml
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: branches/Orchestra_4_0/src/conf/axis-conf.xml (from rev 700, branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/axis/axis-conf.xml) ( => )



Property changes on: branches/Orchestra_4_0/src/conf/axis-conf.xml
___________________________________________________________________
Name: svn:keywords
   + Id

Added: branches/Orchestra_4_0/src/conf/orchestra.conf (700 => 701)


--- branches/Orchestra_4_0/src/conf/orchestra.conf	2007-07-16 14:52:05 UTC (rev 700)
+++ branches/Orchestra_4_0/src/conf/orchestra.conf	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ns:orchestraSettings xmlns:ns="http://orchestra.objectweb.org/orchestra-config"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://orchestra.objectweb.org/orchestra-config orchestra-config.xsd ">
+  <outputSettings>
+    <logFilePath>orchestra.log</logFilePath>
+    <traceLevel>debug</traceLevel>
+    <tracedModules>all</tracedModules>
+  </outputSettings>
+  <engineInternalSettings>
+    <exitOnStaticAnalysisErrors>false</exitOnStaticAnalysisErrors>
+    <rmiPort>9999</rmiPort>
+  </engineInternalSettings>
+</ns:orchestraSettings>
Property changes on: branches/Orchestra_4_0/src/conf/orchestra.conf
___________________________________________________________________
Name: svn:keywords
   + Id

Added: branches/Orchestra_4_0/src/conf/server.policy (700 => 701)


--- branches/Orchestra_4_0/src/conf/server.policy	2007-07-16 14:52:05 UTC (rev 700)
+++ branches/Orchestra_4_0/src/conf/server.policy	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,7 @@
+grant
+{
+   permission javax.management.MBeanServerPermission "*";
+   permission javax.management.MBeanTrustPermission "register";
+   permission javax.management.MBeanPermission "*", "*";
+   permission java.security.AllPermission;
+};
Property changes on: branches/Orchestra_4_0/src/conf/server.policy
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: branches/Orchestra_4_0/src/demos (from rev 698, branches/Orchestra_4_0/src/demo) ( => )


Added: branches/Orchestra_4_0/src/demos/build.xml
===================================================================
--- branches/Orchestra_4_0/src/demo/build.xml	2007-07-12 13:55:02 UTC (rev 698)
+++ branches/Orchestra_4_0/src/demos/build.xml	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,89 @@
+<project name="Orchestra_4_0"  basedir=".">
+    <description>
+        Instal Orchestra_4_0.
+      Prerequies:
+        Axis must be instaled on TomCat.
+        The environment variable $CATALINA_HOME or $CATALINA_BASE must
+        be initialized.
+    </description>
+  <!-- set global properties for this build -->
+
+  <property environment="env"/>
+
+  <!--Orchestra properties-->
+  <property name="orchestra.home" value="${env.ORCHESTRA_HOME}"/>
+  <property name="orchestra.lib" value="${orchestra.home}/lib"/>
+
+
+
+  <!--Classpath definition-->
+
+
+   <path id="base.path">
+        <pathelement path="${classpath}"/>
+        <fileset dir="${orchestra.lib}">
+          <include name="**/*.jar"/>
+        </fileset>
+   </path>
+
+
+  <target name="checkEnv">
+    <description>Check that environment variables have been set up.</description>
+  <echo>Check environments variable:</echo>
+    <echo message="JAVA_HOME '${env.JAVA_HOME}'"/>
+    <echo message="ORCHESTRA_HOME '${env.ORCHESTRA_HOME}'"/>
+    <condition property="sys.failure">
+      <or>
+        <not>
+          <isset property="env.JAVA_HOME"/>
+        </not>
+        <equals arg1="" arg2="${env.JAVA_HOME}"/>
+        <not>
+                  <isset property="env.ORCHESTRA_HOME"/>
+                </not>
+                <equals arg1="" arg2="${env.ORCHESTRA_HOME}"/>
+      </or>
+  </condition>
+
+
+  </target>
+
+    <target name="failure" depends="checkEnv" if="sys.failure">
+    <echo>ORCHESTRA_HOME and JAVA_HOME must be defined.</echo>
+    </target>
+
+
+  <target name="deployWeather2"  depends="failure" unless="sys.failure">
+<!--Deploy the weather2 demo-->
+  <javac srcdir="weather2"  >
+     <classpath refid="base.path"/>
+   </javac>
+
+    <java classname="weather2/Weather2Deploy" fork="true" >
+       <classpath refid="base.path"/>
+        <jvmarg value="-Djava.security.policy=weather2/server.policy"/>
+      <arg value="${orchestra.home}/demos/weather2/"/>
+     </java>
+
+  </target>
+
+
+    <target name="callWeather2"  depends="failure" unless="sys.failure">
+  <!--Call the weather2 demo-->
+    <javac srcdir="weather2"  >
+       <classpath refid="base.path"/>
+     </javac>
+
+      <java classname="weather2/Weather2Call" fork="true" >
+         <classpath refid="base.path"/>
+       </java>
+
+    </target>
+
+
+
+</project>
+
+
+
+

Property changes: branches/Orchestra_4_0/src/demos/build.xml


Name: svn:keywords
   + Id

Added: branches/Orchestra_4_0/src/demos/hello/HelloDeploy.java (698 => 701)


--- branches/Orchestra_4_0/src/demo/hello/HelloDeploy.java	2007-07-12 13:55:02 UTC (rev 698)
+++ branches/Orchestra_4_0/src/demos/hello/HelloDeploy.java	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,197 @@
+/**
+ * Copyright (C) 2007  Bull S. A. S.
+ * Bull, Rue Jean Jaures, B.P.68, 78340, Les Clayes-sous-Bois
+ * This library is free software; you can redistribute it and/or modify it under the terms
+ * of the GNU Lesser General Public License as published by the Free Software Foundation
+ * version 2.1 of the License.
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+ * Floor, Boston, MA  02110-1301, USA.
+ *
+ * HelloDeploy.java
+ *
+ * @author Goulven Le Jeune, Charles Souillard, Candy Chlad, Stanislas Giraudet De Boudemange
+ *
+ * Created on : Jun 29, 2007
+ *
+ * $Id$
+ **/
+
+
+
+package hello;
+
+
+
+
+
+import java.io.File;
+
+
+import javax.management.MBeanServer;
+import javax.management.MBeanServerFactory;
+import javax.management.ObjectName;
+import javax.management.remote.JMXConnectorServer;
+import javax.management.remote.JMXConnectorServerFactory;
+import javax.management.remote.JMXServiceURL;
+
+import org.objectweb.orchestra.def.Process;
+import org.objectweb.orchestra.deployment.ProcessDeployer;
+import org.objectweb.orchestra.webservices.axis.AxisInvoker;
+import org.objectweb.orchestra.webservices.axis.AxisServicePublisher;
+
+
+
+
+
+/**
+ * HelloDeploy.java.
+ *
+ *
+ *
+ * @author Goulven Le Jeune, Charles Souillard, Candy Chlad, Stanislas Giraudet De Boudemange
+ *
+ * Created on : Jun 29, 2007
+ */
+public class HelloDeploy {
+
+    /**
+     * Name of the process.
+     */
+    private String processName="hello";
+
+    /**
+     * ProcessDeployer.
+     */
+    private  ProcessDeployer processDeployer;
+
+    /** The base path for all Orchestra test resources. */
+    private  String demosDirPath =
+        "src/demo/java/org/objectweb/orchestra/hello/";
+
+    /** The base path for all Orchestra test resources. */
+    private  String testDirPath = "src/test/java/org/objectweb/orchestra/test/";
+
+    /** The relative path from the testDirPath to the Orchestra configuration file. */
+    private  String confEngineFile = "resources/orchestra-engine.conf";
+
+
+    /** The relative path from the demoDirPath to the Orchestra configuration file. */
+    private  String confFile = "hello.conf";
+
+    /**
+     * Name of the process created.
+     */
+    private String processNameCreated;
+
+
+    /** Link to the process used during the demo. */
+    private  Process process;
+
+    /**
+     * Port of the rmi registry.
+     */
+    private final int PORT=9999;
+
+    public HelloDeploy(){
+        try{
+            if (System.getSecurityManager() == null) {
+                System.setSecurityManager(new SecurityManager());
+            }
+            //start rmiregistry
+            System.out.println("+Launch the RMI registry on the port:"+this.PORT);
+            java.rmi.registry.LocateRegistry.createRegistry(PORT);
+
+
+            //create a MBean server
+            MBeanServer mbs = MBeanServerFactory.createMBeanServer();
+
+            String domain = mbs.getDefaultDomain();
+            String mbeanClassName = "org.objectweb.orchestra.deployment.ProcessDeployer";
+            String mbeanObjectNameStr =
+               domain + ":type=" + mbeanClassName + ",index=1";
+
+            //create the MBean
+            System.out.println("\n>>> Create the " + mbeanClassName
+                    +" MBean within the MBeanServer");
+            System.out.println("\tObjectName = " + mbeanObjectNameStr);
+            ObjectName mbeanObjectName=null;
+
+            try {
+               mbeanObjectName = ObjectName.getInstance(mbeanObjectNameStr);
+               AxisServicePublisher wsPublisher=new AxisServicePublisher();
+               File confFile=new File(testDirPath + confEngineFile);
+               Object[] params={confFile, wsPublisher, PORT};
+               String[] signature={"java.io.File", "org.objectweb.orchestra.webservices.ServicePublisher", "int"};
+               mbs.createMBean(mbeanClassName, mbeanObjectName, params, signature);
+
+
+            } catch (Exception e) {
+                System.out.println("\t!!! Could not create the " + mbeanClassName + " MBean !!!");
+                e.printStackTrace();
+                System.out.println("\nEXITING...\n");
+                System.exit(1);
+            }
+
+            //deploy the process
+            System.out.println("+Begining of the "+this.processName+" process deployment.");
+
+            Object[] params={
+                    processName,
+                    new File(demosDirPath+"/"+processName+".bpel"),
+                    new File(demosDirPath+"/"+processName+".wsdl"),
+                    null,
+                    new File(demosDirPath+"/"+processName+".conf")
+                    };
+            String[] deploySignature={"java.lang.String", "java.io.File", "java.io.File", "java.util.List", "java.io.File"};
+            mbs.invoke(mbeanObjectName, "deploy", params, deploySignature);
+
+
+            //an RMI connector server is created so that operations can be performed on the MBeans remotely
+            System.out.println("Register the server bean in the RMI registry:");
+            System.out.println("rmi://localhost:"+this.PORT+"/server_"+this.processName);
+            JMXServiceURL url =
+                new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:"+this.PORT+"/Orchestra_4_ProcessDeployer");
+            JMXConnectorServer cs =
+                JMXConnectorServerFactory.newJMXConnectorServer(url, null, mbs);
+            cs.start();
+
+
+            //cs.stop();
+
+
+        }catch(Exception ex){
+            System.err.println("Unable to create the JMX bean of ProcessDeployer");
+            ex.printStackTrace();
+        }
+
+
+        System.out.println("+Begining of the "+this.processName+" process deployment.");
+
+        try{
+            System.out.println("Waiting forever...");
+            Thread.sleep(Long.MAX_VALUE);
+        }catch(Exception ex){
+            System.err.println("Can't wait all this time");
+            ex.printStackTrace();
+        }
+
+    }
+
+    /**
+     * Deploy the process.
+     * @param args no args.
+     */
+    public static void main(final String[] args) {
+        new HelloDeploy();
+    }
+
+
+
+
+}
+
+
Property changes on: branches/Orchestra_4_0/src/demos/hello/HelloDeploy.java
___________________________________________________________________
Name: svn:keywords
   + Id

Added: branches/Orchestra_4_0/src/demos/hello/README.txt (698 => 701)


--- branches/Orchestra_4_0/src/demo/hello/README.txt	2007-07-12 13:55:02 UTC (rev 698)
+++ branches/Orchestra_4_0/src/demos/hello/README.txt	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,49 @@
+This process is a hello process:
+It takes a name as an input parameter, and returns a string "hello"+name.
+
+
+Here is a list of things to do to launch the process:
+
+1 - Install a Tomcat container (5.5.17) and set the CATALINA_HOME environment
+    variable to this directory.
+
+2 - Then create a CATALINA_BASE directory (copy conf, logs, shared, temp,
+    webapps and work directories from CATALINA_HOME) and set the CATALINA_BASE
+    environment variable.
+
+3 - Download the axis 1.4 release. Unzip the downloaded archive (this will
+    create an axis-1.4 directory). Now we will call this directory AXIS_HOME.
+
+4 - Copy the AXIS_HOME/webapps/axis directory to the CATALINA_BASE/webapps
+    directory.
+
+5 - Copy Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/axis/ArchiveLoader.jws
+    to the CATALINA_BASE/webapps/axis directory.
+
+6 - Copy Orchestra_4_0/orchestra_4_0.jar to CATALINA_BASE/webapps/axis/WEB-INF/lib.
+    Copy Orchestra_4_0/src/main/resources/xercesImpl.jar to CATALINA_BASE/webapps/axis/WEB-INF/lib.
+    Copy Orchestra_4_0/src/main/resources/xsom.jar to CATALINA_BASE/webapps/axis/WEB-INF/lib.
+
+
+
+7 - Configure the tomcat container catalina.policy file to allow RMI connections
+    (located in $CATALINA_BASE/conf/catalina.policy).
+    For example, only to be sure that the test works fine, you may want to allow
+    all permissions. To do so, insert the following line in the policy file:
+    grant {
+        permission java.security.AllPermission;
+    };
+
+8 - Launch tomcat with the security option:
+    $CATALINA_HOME/bin/startup.sh -security
+
+9 - Compile and launch the HelloDeploy example. The HelloDeploy example must be
+    launched with the following argument for the JVM:
+    java -Djava.security.policy=server.policy
+
+10 - The process should be deployed. You can test it at the following url:
+     http://localhost:8080/axis/services/helloPT?method=sayHello&name=World
+
+
+
+ => It should work fine :-)
Property changes on: branches/Orchestra_4_0/src/demos/hello/README.txt
___________________________________________________________________
Name: svn:keywords
   + Id

Added: branches/Orchestra_4_0/src/demos/hello/hello.bpel (698 => 701)


--- branches/Orchestra_4_0/src/demo/hello/hello.bpel	2007-07-12 13:55:02 UTC (rev 698)
+++ branches/Orchestra_4_0/src/demos/hello/hello.bpel	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,47 @@
+<process name="hello"
+         targetNamespace="http://orchestra.objectweb.org/demos/hello"
+         xmlns:tns="http://orchestra.objectweb.org/demos/hello"
+         xmlns:bpelj="http://schemas.xmlsoap.org/ws/2003/03/business-process/java"
+         xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
+         xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+<partnerLinks>
+    <partnerLink name="hello"
+            myRole="hello"
+            partnerLinkType="tns:helloPLT"/>
+</partnerLinks>
+
+<variables>
+    <variable name="input" messageType="tns:helloRequest"/>
+    <variable name="output" messageType="tns:helloResponse"/>
+
+
+
+</variables>
+    <sequence>
+        <receive partnerLink="hello"
+              portType="tns:helloPT"
+              operation="sayHello"
+              variable="input"
+              createInstance="yes">
+        </receive>
+        <!--
+            Concat "Hello " and the name stored in the input
+
+         -->
+        <assign
+              name="Convert_input_variables">
+            <copy>
+                <from>concat('Hello ', $input.name)</from>
+                <to variable="output"  part="result"/>
+           </copy>
+        </assign>
+
+
+
+        <reply partnerLink="hello"
+               portType="tns:helloPT"
+              operation="sayHello"
+              variable="output">
+        </reply>
+    </sequence>
+</process>
Property changes on: branches/Orchestra_4_0/src/demos/hello/hello.bpel
___________________________________________________________________
Name: svn:keywords
   + Id

Added: branches/Orchestra_4_0/src/demos/hello/hello.conf (698 => 701)


--- branches/Orchestra_4_0/src/demo/hello/hello.conf	2007-07-12 13:55:02 UTC (rev 698)
+++ branches/Orchestra_4_0/src/demos/hello/hello.conf	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ns:orchestraSettings xmlns:ns="http://www.example.org/orchestra-config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.example.org/orchestra-config orchestra-config.xsd ">
+  <outputSettings>
+    <traceLevel>debug</traceLevel>
+    <tracedModules>all</tracedModules>
+  </outputSettings>
+  <engineInternalSettings>
+    <exitOnStaticAnalysisErrors>false</exitOnStaticAnalysisErrors>
+  </engineInternalSettings>
+</ns:orchestraSettings>
Property changes on: branches/Orchestra_4_0/src/demos/hello/hello.conf
___________________________________________________________________
Name: svn:keywords
   + Id

Added: branches/Orchestra_4_0/src/demos/hello/hello.wsdl (698 => 701)


--- branches/Orchestra_4_0/src/demo/hello/hello.wsdl	2007-07-12 13:55:02 UTC (rev 698)
+++ branches/Orchestra_4_0/src/demos/hello/hello.wsdl	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,48 @@
+<definitions name="hello"
+             targetNamespace="http://orchestra.objectweb.org/demos/hello"
+             xmlns:tns="http://orchestra.objectweb.org/demos/hello"
+             xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+             xmlns="http://schemas.xmlsoap.org/wsdl/"
+             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+
+  <plnk:partnerLinkType name="helloPLT">
+    <plnk:role name="hello" portType="tns:helloPT"/>
+  </plnk:partnerLinkType>
+
+
+  <message name="helloRequest">
+    <part name="name"  type="xsd:string" />
+  </message>
+
+  <message name="helloResponse">
+    <part name="result" type="xsd:string" />
+  </message>
+
+  <portType name="helloPT">
+    <operation name="sayHello">
+      <input message="tns:helloRequest"/>
+      <output message="tns:helloResponse"/>
+    </operation>
+  </portType>
+
+  <binding name="helloPTSOAPBinding" type="tns:helloPT">
+    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+    <operation name="sayHello">
+      <input>
+        <soap:body use="literal" />
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+    </operation>
+  </binding>
+
+  <service name="helloServiceBP">
+    <port name="helloPT" binding="tns:helloPTSOAPBinding">
+      <soap:address location="http://localhost:8080/axis/services/helloPT"/>
+    </port>
+  </service>
+
+</definitions>
Property changes on: branches/Orchestra_4_0/src/demos/hello/hello.wsdl
___________________________________________________________________
Name: svn:keywords
   + Id

Added: branches/Orchestra_4_0/src/demos/hello/server.policy (698 => 701)


--- branches/Orchestra_4_0/src/demo/hello/server.policy	2007-07-12 13:55:02 UTC (rev 698)
+++ branches/Orchestra_4_0/src/demos/hello/server.policy	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,7 @@
+grant
+{
+   permission javax.management.MBeanServerPermission "*";
+   permission javax.management.MBeanTrustPermission "register";
+   permission javax.management.MBeanPermission "*", "*";
+   permission java.security.AllPermission;
+};
Property changes on: branches/Orchestra_4_0/src/demos/hello/server.policy
___________________________________________________________________
Name: svn:keywords
   + Id

Added: branches/Orchestra_4_0/src/demos/weather/WeatherDeploy.java (698 => 701)


--- branches/Orchestra_4_0/src/demo/weather/WeatherDeploy.java	2007-07-12 13:55:02 UTC (rev 698)
+++ branches/Orchestra_4_0/src/demos/weather/WeatherDeploy.java	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,198 @@
+/**
+ * Copyright (C) 2007  Bull S. A. S.
+ * Bull, Rue Jean Jaures, B.P.68, 78340, Les Clayes-sous-Bois
+ * This library is free software; you can redistribute it and/or modify it under the terms
+ * of the GNU Lesser General Public License as published by the Free Software Foundation
+ * version 2.1 of the License.
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+ * Floor, Boston, MA  02110-1301, USA.
+ *
+ * WeatherDeploy.java
+ *
+ * @author Goulven Le Jeune, Charles Souillard, Candy Chlad, Stanislas Giraudet De Boudemange
+ *
+ * Created on : 12 juin 07
+ *
+ * $Id$
+ **/
+package weather;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.management.MBeanServer;
+import javax.management.MBeanServerFactory;
+import javax.management.ObjectName;
+import javax.management.remote.JMXConnectorServer;
+import javax.management.remote.JMXConnectorServerFactory;
+import javax.management.remote.JMXServiceURL;
+
+import org.objectweb.orchestra.def.Process;
+import org.objectweb.orchestra.deployment.ProcessDeployer;
+import org.objectweb.orchestra.webservices.axis.AxisServicePublisher;
+
+/**
+ *
+ * WeatherDeploy.java.
+ *
+ * @author Goulven Le Jeune, Charles Souillard, Candy Chlad, Stanislas Giraudet De Boudemange
+ *
+ * Created on : Jul 5, 2007
+ */
+public class WeatherDeploy {
+
+    /**
+     * Name of the process.
+     */
+    private String processName="weather";
+
+    /**
+     * ProcessDeployer.
+     */
+    private  ProcessDeployer processDeployer;
+
+    /** The base path for all Orchestra test resources. */
+    private  String demosDirPath =
+        "src/demo/weather/";
+
+    /** The base path for all Orchestra test resources. */
+    private  String testDirPath = "src/test/java/org/objectweb/orchestra/test/";
+
+    /** The relative path from the testDirPath to the Orchestra configuration file. */
+    private  String confEngineFile = "resources/orchestra-engine.conf";
+
+
+    /** The relative path from the demoDirPath to the Orchestra configuration file. */
+    private  String confFile = "weather.conf";
+
+    /** The relative path from the demoDirPath to the geocoder wsdl File. */
+    private  String geocoderFile = "geocoder/GeoCoder.wsdl";
+
+    /** The relative path from the demoDirPath to the geocoder wsdl File. */
+    private  String nwsFile = "nws/ndfdXML.wsdl";
+
+     /**
+     * Name of the process created.
+     */
+    private String processNameCreated;
+
+    /** Link to the process used during the demo. */
+    private  Process process;
+
+
+    /** Port of the rmi registry.*/
+    private final int PORT=9999;
+
+    /**
+     * Defaut constructor.
+     *It deploy the processDeployer, the weather process, and the web services.
+     */
+    public WeatherDeploy(){
+
+        try{
+            if (System.getSecurityManager() == null) {
+                System.setSecurityManager(new SecurityManager());
+            }
+            //start rmiregistry
+            System.out.println("+Launch the RMI registry on the port:"+this.PORT);
+            java.rmi.registry.LocateRegistry.createRegistry(PORT);
+
+
+            //create a MBean server
+            MBeanServer mbs = MBeanServerFactory.createMBeanServer();
+
+            String domain = mbs.getDefaultDomain();
+            String mbeanClassName = "org.objectweb.orchestra.deployment.ProcessDeployer";
+            String mbeanObjectNameStr =
+               domain + ":type=" + mbeanClassName + ",index=1";
+
+            //create the MBean
+            System.out.println("\n>>> Create the " + mbeanClassName
+                    +" MBean within the MBeanServer");
+            System.out.println("\tObjectName = " + mbeanObjectNameStr);
+            ObjectName mbeanObjectName=null;
+
+            try {
+               mbeanObjectName = ObjectName.getInstance(mbeanObjectNameStr);
+               AxisServicePublisher wsPublisher=new AxisServicePublisher();
+               File confFile=new File(testDirPath + confEngineFile);
+               Object[] params={confFile, wsPublisher, PORT};
+               String[] signature={"java.io.File", "org.objectweb.orchestra.webservices.ServicePublisher", "int"};
+               mbs.createMBean(mbeanClassName, mbeanObjectName, params, signature);
+
+
+            } catch (Exception e) {
+                System.out.println("\t!!! Could not create the " + mbeanClassName + " MBean !!!");
+                e.printStackTrace();
+                System.out.println("\nEXITING...\n");
+                System.exit(1);
+            }
+
+            //deploy the process
+            System.out.println("+Begining of the weather process deployment.");
+
+//          we add partner wsdl files
+            List<File> listOfWsdlPartnerFiles=new ArrayList<File>();
+            listOfWsdlPartnerFiles.add(new File(demosDirPath+geocoderFile));
+            listOfWsdlPartnerFiles.add(new File(demosDirPath+nwsFile));
+            Object[] params={
+                    processName,
+                    new File(demosDirPath+"/"+processName+".bpel"),
+                    new File(demosDirPath+"/"+processName+".wsdl"),
+                    listOfWsdlPartnerFiles,
+                    new File(demosDirPath+"/"+processName+".conf")
+                    };
+            String[] deploySignature={"java.lang.String", "java.io.File", "java.io.File", "java.util.List", "java.io.File"};
+            mbs.invoke(mbeanObjectName, "deploy", params, deploySignature);
+
+
+            //an RMI connector server is created so that operations can be performed on the MBeans remotely
+            System.out.println("Register the server bean in the RMI registry:");
+            System.out.println("rmi://localhost:"+this.PORT+"/server_"+this.processName);
+            JMXServiceURL url =
+                new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:"+this.PORT+"/Orchestra_4_ProcessDeployer");
+            JMXConnectorServer cs =
+                JMXConnectorServerFactory.newJMXConnectorServer(url, null, mbs);
+            cs.start();
+
+
+            //cs.stop();
+
+
+        }catch(Exception ex){
+            System.err.println("Unable to create the JMX bean of ProcessDeployer");
+            ex.printStackTrace();
+        }
+
+
+        System.out.println("+Begining of the weather process deployment.");
+
+        try{
+            System.out.println("Waiting forever...");
+            Thread.sleep(Long.MAX_VALUE);
+        }catch(Exception ex){
+            System.err.println("Can't wait all this time");
+            ex.printStackTrace();
+        }
+
+
+    }
+
+
+
+
+
+     public static void main(String[] args) {
+        WeatherDeploy weather=new WeatherDeploy();
+    }
+
+
+
+}
+
+
Property changes on: branches/Orchestra_4_0/src/demos/weather/WeatherDeploy.java
___________________________________________________________________
Name: svn:keywords
   + Id

Added: branches/Orchestra_4_0/src/demos/weather/geocoder/GeoCoder.wsdl (698 => 701)


--- branches/Orchestra_4_0/src/demo/weather/geocoder/GeoCoder.wsdl	2007-07-12 13:55:02 UTC (rev 698)
+++ branches/Orchestra_4_0/src/demos/weather/geocoder/GeoCoder.wsdl	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="utf-8" ?> 
+<definitions name="GeoCoder"
+   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+   xmlns="http://schemas.xmlsoap.org/wsdl/"
+   xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" 
+   xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
+  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+   xmlns:tns="http://rpc.geocoder.us/Geo/Coder/US/"
+   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+   targetNamespace="http://rpc.geocoder.us/Geo/Coder/US/">
+
+	<types>
+     <xsd:schema 
+                 targetNamespace="http://rpc.geocoder.us/Geo/Coder/US/"
+                 elementFormDefault="unqualified"   >
+  
+     <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
+
+     <xsd:complexType name="ArrayOf_GeocoderResult">
+		  	<xsd:complexContent>
+				   <xsd:restriction base="soapenc:Array">
+					    <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="tns:GeocoderResult[]"/>
+				   </xsd:restriction>
+			  </xsd:complexContent>
+     </xsd:complexType>
+      
+   		<xsd:complexType name="GeocoderResult">
+			<xsd:all>
+				<xsd:element name="zip" type="xsd:int"/>
+				<xsd:element name="state" type="xsd:string"/>
+				<xsd:element name="city" type="xsd:string"/>
+				<xsd:element name="lat" type="xsd:float"/>
+				<xsd:element name="long" type="xsd:float"/>
+                <xsd:element name="number" type="xsd:int"/>
+                <xsd:element name="suffix" type="xsd:string"/>
+                <xsd:element name="prefix" type="xsd:string"/>
+                <xsd:element name="type" type="xsd:string"/>
+                <xsd:element name="street" type="xsd:string"/>
+                <xsd:element name="suffix1" type="xsd:string"/>
+                <xsd:element name="prefix1" type="xsd:string"/>
+                <xsd:element name="type1" type="xsd:string"/>
+                <xsd:element name="street1" type="xsd:string"/>
+                <xsd:element name="suffix2" type="xsd:string"/>
+                <xsd:element name="prefix2" type="xsd:string"/>
+                <xsd:element name="type2" type="xsd:string"/>
+                <xsd:element name="street2" type="xsd:string"/>
+			</xsd:all>
+		</xsd:complexType>
+		
+    <xsd:complexType name="ArrayOf_GeocoderAddressResult">
+			<xsd:complexContent>
+				<xsd:restriction base="soapenc:Array">
+					<xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="tns:GeocoderAddressResult[]"/>
+				</xsd:restriction>
+			</xsd:complexContent>
+    </xsd:complexType>
+        
+   		<xsd:complexType name="GeocoderAddressResult">
+			<xsd:all>
+				<xsd:element name="number" type="xsd:int"/>
+				<xsd:element name="zip" type="xsd:int"/>
+				<xsd:element name="suffix" type="xsd:string"/>
+				<xsd:element name="prefix" type="xsd:string"/>
+				<xsd:element name="type" type="xsd:string"/>
+				<xsd:element name="street" type="xsd:string"/>
+				<xsd:element name="state" type="xsd:string"/>
+				<xsd:element name="city" type="xsd:string"/>
+				<xsd:element name="lat" type="xsd:float"/>
+				<xsd:element name="long" type="xsd:float"/>
+			</xsd:all>
+		</xsd:complexType>
+
+    <xsd:complexType name="ArrayOf_GeocoderIntersectionResult">
+			<xsd:complexContent>
+				<xsd:restriction base="soapenc:Array">
+					<xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="tns:GeocoderIntersectionResult[]"/>
+				</xsd:restriction>
+			</xsd:complexContent>
+    </xsd:complexType>
+        
+   		<xsd:complexType name="GeocoderIntersectionResult">
+			<xsd:all>
+				<xsd:element name="zip" type="xsd:int"/>
+				<xsd:element name="suffix1" type="xsd:string"/>
+				<xsd:element name="prefix1" type="xsd:string"/>
+				<xsd:element name="type1" type="xsd:string"/>
+				<xsd:element name="street1" type="xsd:string"/>
+				<xsd:element name="suffix2" type="xsd:string"/>
+				<xsd:element name="prefix2" type="xsd:string"/>
+				<xsd:element name="type2" type="xsd:string"/>
+				<xsd:element name="street2" type="xsd:string"/>
+				<xsd:element name="state" type="xsd:string"/>
+				<xsd:element name="city" type="xsd:string"/>
+				<xsd:element name="lat" type="xsd:float"/>
+				<xsd:element name="long" type="xsd:float"/>
+			</xsd:all>
+		</xsd:complexType>
+
+    
+      </xsd:schema>
+   </types>
+
+   <message name="geocodeRequest">
+      <part name="location" type="xsd:string"/>
+   </message>
+   <message name="geocodeResponse">
+      <part name="results" type="tns:ArrayOf_GeocoderResult"/>
+   </message>
+   
+   <message name="geocodeAddressRequest">
+      <part name="address" type="xsd:string"/>
+   </message>
+   <message name="geocodeAddressResponse">
+      <part name="results" type="tns:ArrayOf_GeocoderAddressResult"/>
+   </message>
+
+   <message name="geocodeIntersectionRequest">
+      <part name="intersection" type="xsd:string"/>
+   </message>
+   <message name="geocodeIntersectionResponse">
+      <part name="results" type="tns:ArrayOf_GeocoderIntersectionResult"/>
+   </message>
+  
+   <portType name="GeoCode_PortType">
+      <operation name="geocode">
+         <input message="tns:geocodeRequest"/>
+         <output message="tns:geocodeAddressResponse"/>
+      </operation>
+      <operation name="geocode_address">
+         <input message="tns:geocodeAddressRequest"/>
+         <output message="tns:geocodeAddressResponse"/>
+      </operation>
+      <operation name="geocode_intersection">
+         <input message="tns:geocodeIntersectionRequest"/>
+         <output message="tns:geocodeIntersectionResponse"/>
+      </operation>
+     
+   </portType>
+   
+   <binding name="GeoCode_Binding" type="tns:GeoCode_PortType">
+      <soap:binding style="rpc" 
+         transport="http://schemas.xmlsoap.org/soap/http"/>
+      <operation name="geocode">
+         <soap:operation style="rpc" soapAction="http://rpc.geocoder.us/Geo/Coder/US#geocode"/>
+         <input>
+            <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+               namespace="http://rpc.geocoder.us/Geo/Coder/US/"
+               use="encoded"/>
+         </input>
+         <output>
+            <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+               namespace="http://rpc.geocoder.us/Geo/Coder/US/"
+               use="encoded"/>
+         </output>
+      </operation>
+      <operation name="geocode_address">
+         <soap:operation style="rpc" soapAction="http://rpc.geocoder.us/Geo/Coder/US#geocode_address"/>
+         <input>
+            <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+               namespace="http://rpc.geocoder.us/Geo/Coder/US/"
+               use="encoded"/>
+         </input>
+         <output>
+            <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+               namespace="http://rpc.geocoder.us/Geo/Coder/US/"
+               use="encoded"/>
+         </output>
+      </operation>
+   
+      <operation name="geocode_intersection">
+         <soap:operation style="rpc" soapAction="http://rpc.geocoder.us/Geo/Coder/US#geocode_intersection"/>
+         <input>
+            <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+               namespace="http://rpc.geocoder.us/Geo/Coder/US/"
+               use="encoded"/>
+         </input>
+         <output>
+            <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+               namespace="http://rpc.geocoder.us/Geo/Coder/US/"
+               use="encoded"/>
+         </output>
+      </operation>
+     
+   </binding>
+   
+   <service name="GeoCode_Service">
+      <documentation>WSDL File for Geo Coder - Written by Scott Gunn (scott_gunn*AT*email.com)</documentation>
+      <port binding="tns:GeoCode_Binding" name="GeoCode_Port">
+        <soap:address 
+            location="http://rpc.geocoder.us/service/soap/"/>
+      </port>
+   </service>
+</definitions>
+
+
+
Property changes on: branches/Orchestra_4_0/src/demos/weather/geocoder/GeoCoder.wsdl
___________________________________________________________________
Name: svn:keywords
   + Id

Added: branches/Orchestra_4_0/src/demos/weather/nws/ndfdXML.wsdl (698 => 701)


--- branches/Orchestra_4_0/src/demo/weather/nws/ndfdXML.wsdl	2007-07-12 13:55:02 UTC (rev 698)
+++ branches/Orchestra_4_0/src/demos/weather/nws/ndfdXML.wsdl	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="utf-8"?>
+<definitions 
+    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
+    xmlns:si="http://soapinterop.org/xsd"
+    xmlns:tns="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl"
+    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+    xmlns="http://schemas.xmlsoap.org/wsdl/"
+    targetNamespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl"
+    >
+
+<types>
+ <xsd:schema targetNamespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl">
+   <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
+   <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
+   <xsd:complexType name="weatherParametersType">
+    <xsd:all>
+     <xsd:element name="maxt" type="xsd:boolean"/>
+     <xsd:element name="mint" type="xsd:boolean"/>
+     <xsd:element name="temp" type="xsd:boolean"/>
+     <xsd:element name="dew" type="xsd:boolean"/>
+     <xsd:element name="pop12" type="xsd:boolean"/>
+     <xsd:element name="qpf" type="xsd:boolean"/>
+     <xsd:element name="sky" type="xsd:boolean"/>
+     <xsd:element name="snow" type="xsd:boolean"/>
+     <xsd:element name="wspd" type="xsd:boolean"/>
+     <xsd:element name="wdir" type="xsd:boolean"/>
+     <xsd:element name="wx" type="xsd:boolean"/>
+     <xsd:element name="waveh" type="xsd:boolean"/>
+     <xsd:element name="icons" type="xsd:boolean"/>
+     <xsd:element name="rh" type="xsd:boolean"/>
+     <xsd:element name="appt" type="xsd:boolean"/>
+    </xsd:all>
+   </xsd:complexType>
+  </xsd:schema>
+</types>
+
+<message name="NDFDgenRequest">
+  <part name="latitude" type="xsd:decimal" />
+  <part name="longitude" type="xsd:decimal" />
+  <part name="product" type="xsd:string" />
+  <part name="startTime" type="xsd:dateTime" />
+  <part name="endTime" type="xsd:dateTime" />
+  <part name="weatherParameters" type="tns:weatherParametersType" />
+</message>
+
+<message name="NDFDgenResponse">
+  <part name="dwmlOut" type="xsd:string" />
+</message>
+
+<message name="NDFDgenByDayRequest">
+  <part name="latitude" type="xsd:decimal" />
+  <part name="longitude" type="xsd:decimal" />
+  <part name="startDate" type="xsd:date" />
+  <part name="numDays" type="xsd:integer" />
+  <part name="format" type="xsd:string" />
+</message>
+
+<message name="NDFDgenByDayResponse">
+  <part name="dwmlByDayOut" type="xsd:string" />
+</message>
+
+<portType name="ndfdXMLPortType">
+  <operation name="NDFDgen">
+  <documentation>Returns National Weather Service digital weather forecast data.  Supports latitudes and longitudes for the Continental United States only.  Allowable values for the input variable &quot;product&quot; are &quot;time-series&quot; and &quot;glance&quot;.  For both products, a start and end time are required.  For the time-series product, the input variable &quot;weatherParameters&quot; has array elements set to &quot;true&quot; to indicate which weather parameters are being requested.  If an array element is set to &quot;false&quot;, data for that weather parameter are not to be returned.</documentation>
+  <input message="tns:NDFDgenRequest"/>
+  <output message="tns:NDFDgenResponse"/>
+</operation>
+
+<operation name="NDFDgenByDay">
+  <documentation>Returns National Weather Service digital weather forecast data.  Supports latitudes and longitudes for the Continental United States only.  Allowable values for the input variable &quot;format&quot; are &quot;24 hourly&quot; and &quot;12 hourly&quot;.  The input variable &quot;startDate&quot; is a date string representing the first day of data to be returned. The input variable &quot;numDays&quot; is the integer number of days for which the user wants data.</documentation>
+  <input message="tns:NDFDgenByDayRequest"/>
+  <output message="tns:NDFDgenByDayResponse"/>
+</operation>
+</portType>
+
+<binding name="ndfdXMLBinding" type="tns:ndfdXMLPortType">
+  <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+  <operation name="NDFDgen">
+    <soap:operation soapAction="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl#NDFDgen" style="rpc"/>
+    <input>
+    <soap:body use="encoded" namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+    </input>
+    <output>
+    <soap:body use="encoded" namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output></operation><operation name="NDFDgenByDay">
+    <soap:operation soapAction="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl#NDFDgenByDay" style="rpc"/>
+    <input>
+    <soap:body use="encoded" namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+    </input>
+    <output>
+    <soap:body use="encoded" namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+    </output>
+    </operation>
+  </binding>
+    
+    <service name="ndfdXML">
+      <port name="ndfdXMLPort" binding="tns:ndfdXMLBinding">
+      <soap:address location="http://www.weather.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php"/>
+      </port>
+    </service>
+</definitions>
Property changes on: branches/Orchestra_4_0/src/demos/weather/nws/ndfdXML.wsdl
___________________________________________________________________
Name: svn:keywords
   + Id

Added: branches/Orchestra_4_0/src/demos/weather/server.policy (698 => 701)


--- branches/Orchestra_4_0/src/demo/weather/server.policy	2007-07-12 13:55:02 UTC (rev 698)
+++ branches/Orchestra_4_0/src/demos/weather/server.policy	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,7 @@
+grant
+{
+   permission javax.management.MBeanServerPermission "*";
+   permission javax.management.MBeanTrustPermission "register";
+   permission javax.management.MBeanPermission "*", "*";
+   permission java.security.AllPermission;
+};
Property changes on: branches/Orchestra_4_0/src/demos/weather/server.policy
___________________________________________________________________
Name: svn:keywords
   + Id

Added: branches/Orchestra_4_0/src/demos/weather/weather.bpel (698 => 701)


--- branches/Orchestra_4_0/src/demo/weather/weather.bpel	2007-07-12 13:55:02 UTC (rev 698)
+++ branches/Orchestra_4_0/src/demos/weather/weather.bpel	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,111 @@
+<process name="weather"
+         targetNamespace="http://orchestra.objectweb.org/samples/weather"
+         bpelj:xmlBinding="JAXRPC11"
+         xmlns:p9807="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl"
+         xmlns:p3859="http://orchestra.objectweb.org/samples/weather"
+         xmlns:p2210="http://rpc.geocoder.us/Geo/Coder/US/"
+         xmlns:bpelj="http://schemas.xmlsoap.org/ws/2003/03/business-process/java"
+         xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
+         xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+<partnerLinks>
+    <partnerLink name="NationalWeatherService"
+            partnerRole="service"
+            partnerLinkType="p3859:NWSService"/>
+    <partnerLink name="weather"
+            myRole="service"
+            partnerLinkType="p3859:weatherPLT"/>
+    <partnerLink name="geocoder"
+            partnerRole="service"
+            partnerLinkType="p3859:GeoCoderService"/>
+</partnerLinks>
+<variables>
+    <variable name="weatherRequest" messageType="p3859:weatherSoapRequest"/>
+    <variable name="weatherResponse" messageType="p3859:weatherSoapResponse"/>
+    <variable name="nwsRequest" messageType="p9807:NDFDgenByDayRequest"/>
+    <variable name="nwsResponse" messageType="p9807:NDFDgenByDayResponse"/>
+    <variable name="geocodeRequest" messageType="p2210:geocodeRequest"/>
+    <variable name="geocodeResponse" messageType="p2210:geocodeAddressResponse"/>
+</variables>
+    <sequence>
+        <receive partnerLink="weather"
+              portType="p3859:weatherPT"
+              operation="process"
+              variable="weatherRequest" createInstance="yes">
+        </receive>
+        <!--
+            Put "location" in variable for geocoder input.
+
+         -->
+        <assign
+              name="Convert_input_variables">
+            <copy>
+                <from variable="weatherRequest"  part="location">
+                <query>p3859:location</query>
+                </from>
+                <to variable="geocodeRequest"  part="location"/>
+           </copy>
+        </assign>
+        <!--
+            Call geocoder to get latitude/longitude of the location.
+          -->
+        <invoke partnerLink="geocoder"
+              portType="p2210:GeoCode_PortType"
+              operation="geocode"
+              inputVariable="geocodeRequest"
+              outputVariable="geocodeResponse">
+        </invoke>
+        <!--
+            Now build the input data needed by the National Weather Service
+         -->
+        <assign
+              name="Build_NWS_Request">
+            <copy>
+                <from variable="geocodeResponse"  part="results">
+                `<query>p2210:lat</query>
+                </from>
+                <to variable="nwsRequest"  part="latitude"/>
+           </copy>
+            <copy>
+                <from variable="geocodeResponse"  part="results">
+                <query>p2210:long</query>
+                </from>
+                <to variable="nwsRequest"  part="longitude"/>
+           </copy>
+            <copy>
+                <from variable="weatherRequest"  part="location">
+                <query>p3859:date</query>
+                </from>
+                <to variable="nwsRequest"  part="startDate"/>
+           </copy>
+            <copy>
+                <from>number(1)</from>
+                <to variable="nwsRequest"  part="numDays"/>
+           </copy>
+            <copy>
+                <from>string('24 hourly')</from>
+                <to variable="nwsRequest"  part="format"/>
+           </copy>
+        </assign>
+        <invoke partnerLink="NationalWeatherService"
+              portType="p9807:ndfdXMLPortType"
+              operation="NDFDgenByDay"
+              inputVariable="nwsRequest"
+                outputVariable="nwsResponse"
+              name="InvokeNWS">
+        </invoke>
+        <assign>
+            <copy>
+                <from variable="nwsResponse"  part="dwmlByDayOut"/>
+                <to variable="weatherResponse"  part="result">
+
+                </to>
+           </copy>
+        </assign>
+
+        <reply partnerLink="weather"
+              portType="p3859:weatherPT"
+              operation="process"
+              variable="weatherResponse">
+        </reply>
+    </sequence>
+</process>
Property changes on: branches/Orchestra_4_0/src/demos/weather/weather.bpel
___________________________________________________________________
Name: svn:keywords
   + Id

Added: branches/Orchestra_4_0/src/demos/weather/weather.conf (698 => 701)


--- branches/Orchestra_4_0/src/demo/weather/weather.conf	2007-07-12 13:55:02 UTC (rev 698)
+++ branches/Orchestra_4_0/src/demos/weather/weather.conf	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ns:orchestraSettings xmlns:ns="http://www.example.org/orchestra-config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.example.org/orchestra-config orchestra-config.xsd ">
+  <outputSettings>
+    <traceLevel>debug</traceLevel>
+    <tracedModules>all</tracedModules>
+  </outputSettings>
+  <engineInternalSettings>
+    <exitOnStaticAnalysisErrors>false</exitOnStaticAnalysisErrors>
+  </engineInternalSettings>
+</ns:orchestraSettings>
Property changes on: branches/Orchestra_4_0/src/demos/weather/weather.conf
___________________________________________________________________
Name: svn:keywords
   + Id

Added: branches/Orchestra_4_0/src/demos/weather/weather.wsdl (698 => 701)


--- branches/Orchestra_4_0/src/demo/weather/weather.wsdl	2007-07-12 13:55:02 UTC (rev 698)
+++ branches/Orchestra_4_0/src/demos/weather/weather.wsdl	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,90 @@
+<definitions name="weather"
+             targetNamespace="http://orchestra.objectweb.org/samples/weather"
+             xmlns:p3859="http://orchestra.objectweb.org/samples/weather"
+             xmlns:p9807="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl"
+             xmlns:p2212="http://rpc.geocoder.us/Geo/Coder/US/"
+             xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+             xmlns="http://schemas.xmlsoap.org/wsdl/"
+             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+
+  <plnk:partnerLinkType name="weatherPLT">
+    <plnk:role name="service" portType="p3859:weatherPT"/>
+  </plnk:partnerLinkType>
+
+  <plnk:partnerLinkType name="GeoCoderService">
+    <plnk:role name="service"  portType="p2212:GeoCode_PortType"/>
+  </plnk:partnerLinkType>
+
+  <plnk:partnerLinkType name="NWSService">
+    <plnk:role name="service" portType="p9807:ndfdXMLPortType"/>
+  </plnk:partnerLinkType>
+<!--
+  <import namespace="http://rpc.geocoder.us/Geo/Coder/US/"
+          location="src/demo/java/org/objectweb/orchestra/weather/geocoder/GeoCoder.wsdl"/>
+  <import namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl"
+          location="src/demo/java/org/objectweb/orchestra/weather/nws/ndfdXML.wsdl"/>
+-->
+
+
+  <types>
+    <xsd:schema targetNamespace="http://orchestra.objectweb.org/samples/weather"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+      <xsd:complexType name="locationType">
+        <xsd:all>
+          <xsd:element name="location" type="xsd:string"/>
+          <xsd:element name="date" type="xsd:date" />
+        </xsd:all>
+      </xsd:complexType>
+
+      <xsd:complexType name="outputType">
+        <xsd:all>
+          <xsd:element name="result" type="xsd:string"/>
+        </xsd:all>
+      </xsd:complexType>
+
+    </xsd:schema>
+
+
+
+  </types>
+
+
+
+  <message name="weatherSoapRequest">
+    <part name="location"  type="p3859:locationType" />
+  </message>
+
+  <message name="weatherSoapResponse">
+    <part name="result" type="p3859:outputType" />
+  </message>
+
+  <portType name="weatherPT">
+    <operation name="process">
+      <input message="p3859:weatherSoapRequest"/>
+      <output message="p3859:weatherSoapResponse"/>
+    </operation>
+  </portType>
+
+  <binding name="weatherPTSOAPBinding" type="p3859:weatherPT">
+    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+    <operation name="process">
+      <input>
+        <soap:body use="literal" namespace="http://orchestra.objectweb.org/samples/weather"
+                   encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </input>
+      <output>
+        <soap:body use="literal" namespace="http://orchestra.objectweb.org/samples/weather"
+                   encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+      </output>
+    </operation>
+  </binding>
+
+  <service name="weatherServiceBP">
+    <port name="weatherPT" binding="p3859:weatherPTSOAPBinding">
+      <soap:address location="http://localhost:8080/axis/services/weatherPT"/>
+    </port>
+  </service>
+
+</definitions>
Property changes on: branches/Orchestra_4_0/src/demos/weather/weather.wsdl
___________________________________________________________________
Name: svn:keywords
   + Id

Added: branches/Orchestra_4_0/src/demos/weather2/README.txt (698 => 701)


--- branches/Orchestra_4_0/src/demo/weather2/README.txt	2007-07-12 13:55:02 UTC (rev 698)
+++ branches/Orchestra_4_0/src/demos/weather2/README.txt	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,57 @@
+This process is the weather2 process:
+It takes a name as an location: for example "Grenoble,Paris".
+The location is a city, followed by the name of the country. No blank are allowed.
+"Grenoble,France"=>right
+"Grenoble, France"=>wrong
+This process uses an external web service:
+http://www.webservicex.net/globalweather.asmx
+
+which take a 2 parameters: a city and a country, and return the meteo of this location, if found.
+This web service uses the DOCUMENT style, whith a LITERAL use.
+
+Once the process is deployed, ot could be tested by the Weather2Call, which is an example of
+client for this webservice.
+The process created uses also a DOCUMENT/LITERAL style.
+
+Here is a list of things to do to launch the process:
+
+1 - Install a Tomcat container (5.5.17) and set the CATALINA_HOME environment
+    variable to this directory.
+
+2 - Then create a CATALINA_BASE directory (copy conf, logs, shared, temp,
+    webapps and work directories from CATALINA_HOME) and set the CATALINA_BASE
+    environment variable.
+
+3 - Download the axis 1.4 release. Unzip the downloaded archive (this will
+    create an axis-1.4 directory). Now we will call this directory AXIS_HOME.
+
+4 - Copy the AXIS_HOME/webapps/axis directory to the CATALINA_BASE/webapps
+    directory.
+
+5 - Copy Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/axis/ArchiveLoader.jws
+    to the CATALINA_BASE/webapps/axis directory.
+
+6 - Copy Orchestra_4_0/orchestra_4_0.jar to CATALINA_BASE/webapps/axis/WEB-INF/lib.
+    Copy Orchestra_4_0/src/main/resources/xercesImpl.jar to CATALINA_BASE/webapps/axis/WEB-INF/lib.
+    Copy Orchestra_4_0/src/main/resources/xsom.jar to CATALINA_BASE/webapps/axis/WEB-INF/lib.
+
+7 - Configure the tomcat container catalina.policy file to allow RMI connections
+    (located in $CATALINA_BASE/conf/catalina.policy).
+    For example, only to be sure that the test works fine, you may want to allow
+    all permissions. To do so, insert the following line in the policy file:
+    grant {
+        permission java.security.AllPermission;
+    };
+
+8 - Launch tomcat with the security option:
+    $CATALINA_HOME/bin/startup.sh -security
+
+9 - Compile and launch the HelloDeploy example. The HelloDeploy example must be
+    launched with the following argument for the JVM:
+    java -Djava.security.policy=server.policy
+
+10 - The process should be deployed. You can test it with Client given in the demo: Weather2Call.
+
+
+
+ => It should work fine :-)
Property changes on: branches/Orchestra_4_0/src/demos/weather2/README.txt
___________________________________________________________________
Name: svn:keywords
   + Id

Added: branches/Orchestra_4_0/src/demos/weather2/Weather2Call.java (698 => 701)


--- branches/Orchestra_4_0/src/demo/weather2/Weather2Call.java	2007-07-12 13:55:02 UTC (rev 698)
+++ branches/Orchestra_4_0/src/demos/weather2/Weather2Call.java	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,87 @@
+package weather2;
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.apache.axis.client.Call;
+import org.apache.axis.client.Service;
+import org.apache.axis.constants.Style;
+import org.apache.axis.constants.Use;
+import org.apache.axis.message.SOAPBodyElement;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.helpers.XMLFilterImpl;
+
+
+/**
+ * This class is an example of the call done on the web service created by
+ * the Weather2 demo.
+ * You have first to deploy the Weather2 demo (execute the main method of Weather2Deploy for example)
+ * and then you can launch this main, which will call the getWeather operation.
+ * @author giraudbs
+ *
+ */
+public final class Weather2Call {
+    /**
+     * private constructor: this class has not to be instanciated.
+     *
+     */
+    private Weather2Call(){
+
+    }
+
+    /**
+     * execute the call of the getWeather method.
+     * @param args - no args.
+     */
+    public static void main(final String [] args) {
+        try {
+
+            String endpoint ="http://localhost:8080/axis/services/weather2PT";
+
+            System.out.println("Create the Service");
+            Service  service = new Service();
+
+            System.out.println("Create the  call");
+            Call     call    = (Call) service.createCall();
+            call.setOperationStyle(Style.DOCUMENT);
+            call.setOperationUse(Use.LITERAL);
+
+            System.out.println("Configure the end point Call");
+            call.setTargetEndpointAddress(new java.net.URL(endpoint));
+
+            call.setOperationName(new QName("http://orchestra.objectweb.org/demos/weather2", "getWeather"));
+                System.out.println("Invoke the operation.");
+
+
+                DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
+                dbFactory.setValidating(true);
+                dbFactory.setNamespaceAware(true);
+                dbFactory.setIgnoringElementContentWhitespace(true);
+                DocumentBuilder builder;
+                builder= dbFactory.newDocumentBuilder();
+                ErrorHandler eh = new XMLFilterImpl();
+                builder.setErrorHandler(eh);
+
+                Document document=builder.getDOMImplementation().createDocument(null, null, null);
+
+                Element rootElement=document.createElementNS("http://orchestra.objectweb.org/demos/weather2", "getWeather");
+
+                Element countryName=document.createElementNS("http://orchestra.objectweb.org/demos/weather2", "cityCountry");
+                rootElement.appendChild(countryName);
+                countryName.setTextContent("Grenoble,France");
+                document.appendChild(rootElement);
+
+
+                Object[] params={new SOAPBodyElement(rootElement)};
+               Object result=call.invoke(params);
+
+                System.out.println("Sent 'Grenoble,France!', got '" + result + "'");
+
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+}
Property changes on: branches/Orchestra_4_0/src/demos/weather2/Weather2Call.java
___________________________________________________________________
Name: svn:keywords
   + Id

Added: branches/Orchestra_4_0/src/demos/weather2/Weather2Deploy.java (698 => 701)


--- branches/Orchestra_4_0/src/demo/weather2/Weather2Deploy.java	2007-07-12 13:55:02 UTC (rev 698)
+++ branches/Orchestra_4_0/src/demos/weather2/Weather2Deploy.java	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,151 @@
+/**
+ * Copyright (C) 2007  Bull S. A. S.
+ * Bull, Rue Jean Jaures, B.P.68, 78340, Les Clayes-sous-Bois
+ * This library is free software; you can redistribute it and/or modify it under the terms
+ * of the GNU Lesser General Public License as published by the Free Software Foundation
+ * version 2.1 of the License.
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+ * Floor, Boston, MA  02110-1301, USA.
+ *
+ * Weather2Deploy.java
+ *
+ * @author Goulven Le Jeune, Charles Souillard, Candy Chlad, Stanislas Giraudet De Boudemange
+ *
+ * Created on : Jul 9, 2007
+ *
+ * $Id$
+ **/
+package weather2;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.management.remote.JMXConnector;
+import javax.management.remote.JMXConnectorFactory;
+import javax.management.remote.JMXServiceURL;
+
+
+/**
+ * Weather2Deploy.java.
+ *
+ * @author Goulven Le Jeune, Charles Souillard, Candy Chlad, Stanislas Giraudet De Boudemange
+ *
+ * Created on : Jul 9, 2007
+ */
+public class Weather2Deploy {
+     /**
+     * Name of the process.
+     */
+    private String processName="weather2";
+
+
+    /** The relative path from the demoDirPath to the webserviceX wsdl File. */
+    private  String webServiceX = "webserviceX/webserviceX.wsdl";
+
+
+    /**
+     * The absolute path to weather2 files.
+     */
+    private String weather2Path="";
+
+    /** Port of the rmi registry.*/
+    private final int port=9999;
+
+
+    /**
+     * Constructor with a path to the weather2 files.
+     * @param weather2Path Path of the weather2 directory.
+     */
+    public Weather2Deploy(final String weather2Path){
+        this.weather2Path=weather2Path;
+        deploy();
+    }
+
+    /**
+     * Defaut constructor.
+     *It deploy the processDeployer, the weather process, and the web services.
+     */
+    public Weather2Deploy(){
+        deploy();
+    }
+
+
+    /**
+     * Deploy the process.
+     *
+     */
+    public void deploy(){
+
+        try{
+            if (System.getSecurityManager() == null) {
+                System.setSecurityManager(new SecurityManager());
+            }
+
+
+            // Create an RMI connector client
+            //
+            JMXServiceURL url =
+                new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:"+port+"/Orchestra_4_ProcessDeployer");
+
+            JMXConnector jmxc = JMXConnectorFactory.connect(url, null);
+            MBeanServerConnection mbsc = jmxc.getMBeanServerConnection();
+            String domain = mbsc.getDefaultDomain();
+
+            //deploy the process
+            System.out.println("+Begining of the weather process deployment.");
+
+//          we add partner wsdl files
+            List<File> listOfWsdlPartnerFiles=new ArrayList<File>();
+            listOfWsdlPartnerFiles.add(new File(weather2Path+webServiceX));
+
+            Object[] params={
+                    processName,
+                    new File(weather2Path+processName+".bpel"),
+                    new File(weather2Path+processName+".wsdl"),
+                    listOfWsdlPartnerFiles,
+                    new File(weather2Path+processName+".conf")
+                    };
+            String mbeanClassName = "org.objectweb.orchestra.deployment.ProcessDeployer";
+            String mbeanObjectNameStr =
+                domain + ":type=" + mbeanClassName + ",index=1";
+            ObjectName mbeanObjectName= ObjectName.getInstance(mbeanObjectNameStr);
+
+
+            String[] deploySignature={"java.lang.String", "java.io.File", "java.io.File", "java.util.List", "java.io.File"};
+            mbsc.invoke(mbeanObjectName, "deploy", params, deploySignature);
+
+        }catch(Exception ex){
+            System.err.println("Unable to create the JMX bean of ProcessDeployer");
+            ex.printStackTrace();
+        }
+
+    }
+
+
+
+    /**
+     * Launch the deployment.
+     * @param args - no args.
+     */
+     public static void main(final String[] args) {
+         /*
+          * one optional arg: the directory of weather2 file.
+          */
+         if (args.length==0){
+             new Weather2Deploy();
+         }else{
+             new Weather2Deploy(args[0]);
+         }
+    }
+
+
+}
+
+
Property changes on: branches/Orchestra_4_0/src/demos/weather2/Weather2Deploy.java
___________________________________________________________________
Name: svn:keywords
   + Id

Added: branches/Orchestra_4_0/src/demos/weather2/server.policy (698 => 701)


--- branches/Orchestra_4_0/src/demo/weather2/server.policy	2007-07-12 13:55:02 UTC (rev 698)
+++ branches/Orchestra_4_0/src/demos/weather2/server.policy	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,7 @@
+grant
+{
+   permission javax.management.MBeanServerPermission "*";
+   permission javax.management.MBeanTrustPermission "register";
+   permission javax.management.MBeanPermission "*", "*";
+   permission java.security.AllPermission;
+};
Property changes on: branches/Orchestra_4_0/src/demos/weather2/server.policy
___________________________________________________________________
Name: svn:keywords
   + Id

Added: branches/Orchestra_4_0/src/demos/weather2/weather2.bpel (698 => 701)


--- branches/Orchestra_4_0/src/demo/weather2/weather2.bpel	2007-07-12 13:55:02 UTC (rev 698)
+++ branches/Orchestra_4_0/src/demos/weather2/weather2.bpel	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,107 @@
+<process name="weather2"
+         targetNamespace="http://orchestra.objectweb.org/demos/weather2"
+         xmlns:tns="http://orchestra.objectweb.org/demos/weather2"
+         xmlns:wsx="http://www.webserviceX.NET"
+         xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+         xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+
+<partnerLinks>
+    <partnerLink name="webServiceXPL"
+            partnerRole="service"
+            partnerLinkType="tns:webServiceXPLT"/>
+    <partnerLink name="weather2PL"
+            myRole="service"
+            partnerLinkType="tns:weather2PLT"/>
+</partnerLinks>
+
+
+<variables>
+    <variable name="weatherRequest" messageType="tns:weather2SoapRequest"/>
+    <variable name="weatherRequest2" messageType="tns:weather2SoapRequest"/>
+    <variable name="weatherResponse" messageType="tns:weather2SoapResponse"/>
+    <variable name="webServiceXIn" messageType="wsx:GetWeatherSoapIn"/>
+    <variable name="webServiceXOut" messageType="wsx:GetWeatherSoapOut"/>
+     <variable name="string" type="xsd:string"/>
+</variables>
+
+    <sequence>
+        <receive partnerLink="weather2PL"
+              portType="tns:weather2PT"
+              operation="getWeather"
+              variable="weatherRequest" createInstance="yes">
+        </receive>
+        <!--
+            Separate the city from the conuntry of the input Variable
+            Grenoble, France  =>
+              Grenoble
+              France
+
+         -->
+        <assign  name="Convert_input_variables">
+
+
+          <copy>
+            <from><literal  xmlns:wsx="http://www.webserviceX.NET"><wsx:GetWeather><wsx:CityName/><wsx:CountryName/></wsx:GetWeather></literal>
+            </from>
+            <to variable="webServiceXIn"  part="parameters"/>
+          </copy>
+
+          <copy>
+            <from><literal  xmlns:weather2="http://orchestra.objectweb.org/demos/weather2"><weather2:getWeatherResponse><weather2:weather/></weather2:getWeatherResponse></literal>
+            </from>
+            <to variable="weatherResponse"  part="result"/>
+          </copy>
+
+          <copy>
+          <from variable="weatherRequest" part="location">
+          <query>/tns:getWeather/tns:cityCountry</query>
+          </from>
+          <to>$string</to>
+          </copy>
+
+
+            <copy>
+                <from>substring-before($string, ",")</from>
+                <to variable="webServiceXIn"  part="parameters">
+                <query>/wsx:GetWeather/wsx:CityName</query>
+                </to>
+           </copy>
+           <copy>
+                <from> substring-after($string, ",")</from>
+                <to variable="webServiceXIn"  part="parameters">
+                <query>/wsx:GetWeather/wsx:CountryName</query>
+                </to>
+           </copy>
+        </assign>
+        <!--
+            Call GetWeather operation of the webServiceX
+          -->
+        <invoke partnerLink="webServiceXPL"
+              portType="wsx:GlobalWeatherSoap"
+              operation="GetWeather"
+              inputVariable="webServiceXIn"
+              outputVariable="webServiceXOut">
+        </invoke>
+        <!--
+            Now build the output variable
+         -->
+        <assign   name="Build_Weather_Response">
+            <copy>
+                <from variable="webServiceXOut"  part="parameters">
+                `<query>wsx:GetWeatherResult/text()</query>
+                </from>
+                <to variable="weatherResponse"  part="result">
+                  <query>/tns:getWeatherResponse/tns:weather</query>
+                </to>
+           </copy>
+
+        </assign>
+
+        <reply partnerLink="weather2PL"
+              portType="tns:weather2PT"
+              operation="getWeather"
+              variable="weatherResponse">
+        </reply>
+    </sequence>
+</process>
Property changes on: branches/Orchestra_4_0/src/demos/weather2/weather2.bpel
___________________________________________________________________
Name: svn:keywords
   + Id

Added: branches/Orchestra_4_0/src/demos/weather2/weather2.conf (698 => 701)


--- branches/Orchestra_4_0/src/demo/weather2/weather2.conf	2007-07-12 13:55:02 UTC (rev 698)
+++ branches/Orchestra_4_0/src/demos/weather2/weather2.conf	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ns:orchestraSettings xmlns:ns="http://www.example.org/orchestra-config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.example.org/orchestra-config orchestra-config.xsd ">
+  <outputSettings>
+    <traceLevel>debug</traceLevel>
+    <tracedModules>all</tracedModules>
+  </outputSettings>
+  <engineInternalSettings>
+    <exitOnStaticAnalysisErrors>false</exitOnStaticAnalysisErrors>
+  </engineInternalSettings>
+</ns:orchestraSettings>
Property changes on: branches/Orchestra_4_0/src/demos/weather2/weather2.conf
___________________________________________________________________
Name: svn:keywords
   + Id

Added: branches/Orchestra_4_0/src/demos/weather2/weather2.wsdl (698 => 701)


--- branches/Orchestra_4_0/src/demo/weather2/weather2.wsdl	2007-07-12 13:55:02 UTC (rev 698)
+++ branches/Orchestra_4_0/src/demos/weather2/weather2.wsdl	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,83 @@
+<definitions name="weather"
+             targetNamespace="http://orchestra.objectweb.org/demos/weather2"
+             xmlns:tns="http://orchestra.objectweb.org/demos/weather2"
+             xmlns:wsx="http://www.webserviceX.NET"
+             xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+             xmlns="http://schemas.xmlsoap.org/wsdl/"
+             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+
+  <plnk:partnerLinkType name="weather2PLT">
+    <plnk:role name="service" portType="tns:weather2PT"/>
+  </plnk:partnerLinkType>
+
+  <plnk:partnerLinkType name="webServiceXPLT">
+    <plnk:role name="service" portType="wsx:GlobalWeatherSoap"/>
+  </plnk:partnerLinkType>
+
+
+
+  <types>
+    <xsd:schema targetNamespace="http://orchestra.objectweb.org/demos/weather2"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <xsd:element name="getWeather">
+        <xsd:complexType>
+          <xsd:sequence>
+            <xsd:element name="cityCountry" type="xsd:string" />
+          </xsd:sequence>
+        </xsd:complexType>
+      </xsd:element>
+
+          <xsd:element name="getWeatherResponse">
+        <xsd:complexType>
+          <xsd:sequence>
+            <xsd:element name="weather" type="xsd:string" />
+          </xsd:sequence>
+        </xsd:complexType>
+      </xsd:element>
+
+
+
+    </xsd:schema>
+
+
+
+  </types>
+
+
+
+  <message name="weather2SoapRequest">
+    <part name="location"  element="tns:getWeather" />
+  </message>
+
+  <message name="weather2SoapResponse">
+    <part name="result" element="tns:getWeatherResponse" />
+  </message>
+
+  <portType name="weather2PT">
+    <operation name="getWeather">
+      <input message="tns:weather2SoapRequest"/>
+      <output message="tns:weather2SoapResponse"/>
+    </operation>
+  </portType>
+
+  <binding name="weather2PTSOAPBinding" type="tns:weather2PT">
+    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+    <operation name="getWeather">
+      <input>
+        <soap:body use="literal" namespace="http://orchestra.objectweb.org/demos/weather2" />
+      </input>
+      <output>
+        <soap:body use="literal" namespace="http://orchestra.objectweb.org/demos/weather2" />
+      </output>
+    </operation>
+  </binding>
+
+  <service name="weatherServiceBP">
+    <port name="weather2PT" binding="tns:weather2PTSOAPBinding">
+      <soap:address location="http://localhost:8080/axis/services/weather2PT"/>
+    </port>
+  </service>
+
+</definitions>
Property changes on: branches/Orchestra_4_0/src/demos/weather2/weather2.wsdl
___________________________________________________________________
Name: svn:keywords
   + Id

Added: branches/Orchestra_4_0/src/demos/weather2/webserviceX/webserviceX.wsdl (698 => 701)


--- branches/Orchestra_4_0/src/demo/weather2/webserviceX/webserviceX.wsdl	2007-07-12 13:55:02 UTC (rev 698)
+++ branches/Orchestra_4_0/src/demos/weather2/webserviceX/webserviceX.wsdl	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,168 @@
+<wsdl:definitions targetNamespace="http://www.webserviceX.NET"
+  xmlns:tns="http://www.webserviceX.NET"
+  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+  xmlns:s="http://www.w3.org/2001/XMLSchema"
+  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+  <wsdl:types>
+    <s:schema elementFormDefault="qualified"
+      targetNamespace="http://www.webserviceX.NET">
+      <s:element name="GetWeather">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1"
+              name="CityName" type="s:string" />
+            <s:element minOccurs="0" maxOccurs="1"
+              name="CountryName" type="s:string" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+
+      <s:element name="GetWeatherResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1"
+              name="GetWeatherResult" type="s:string" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+
+      <s:element name="GetCitiesByCountry">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1"
+              name="CountryName" type="s:string" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+
+      <s:element name="GetCitiesByCountryResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1"
+              name="GetCitiesByCountryResult" type="s:string" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+      <s:element name="string" nillable="true" type="s:string" />
+    </s:schema>
+  </wsdl:types>
+
+  <wsdl:message name="GetWeatherSoapIn">
+    <wsdl:part name="parameters" element="tns:GetWeather" />
+  </wsdl:message>
+
+  <wsdl:message name="GetWeatherSoapOut">
+    <wsdl:part name="parameters" element="tns:GetWeatherResponse" />
+  </wsdl:message>
+
+  <wsdl:message name="GetCitiesByCountrySoapIn">
+    <wsdl:part name="parameters" element="tns:GetCitiesByCountry" />
+  </wsdl:message>
+
+  <wsdl:message name="GetCitiesByCountrySoapOut">
+    <wsdl:part name="parameters"
+      element="tns:GetCitiesByCountryResponse" />
+  </wsdl:message>
+
+  <wsdl:message name="GetWeatherHttpGetIn">
+    <wsdl:part name="CityName" type="s:string" />
+    <wsdl:part name="CountryName" type="s:string" />
+  </wsdl:message>
+
+  <wsdl:message name="GetWeatherHttpGetOut">
+    <wsdl:part name="Body" element="tns:string" />
+  </wsdl:message>
+
+  <wsdl:message name="GetCitiesByCountryHttpGetIn">
+    <wsdl:part name="CountryName" type="s:string" />
+  </wsdl:message>
+
+  <wsdl:message name="GetCitiesByCountryHttpGetOut">
+    <wsdl:part name="Body" element="tns:string" />
+  </wsdl:message>
+
+  <wsdl:message name="GetWeatherHttpPostIn">
+    <wsdl:part name="CityName" type="s:string" />
+    <wsdl:part name="CountryName" type="s:string" />
+  </wsdl:message>
+
+  <wsdl:message name="GetWeatherHttpPostOut">
+    <wsdl:part name="Body" element="tns:string" />
+  </wsdl:message>
+
+  <wsdl:message name="GetCitiesByCountryHttpPostIn">
+    <wsdl:part name="CountryName" type="s:string" />
+  </wsdl:message>
+
+  <wsdl:message name="GetCitiesByCountryHttpPostOut">
+    <wsdl:part name="Body" element="tns:string" />
+  </wsdl:message>
+
+  <wsdl:portType name="GlobalWeatherSoap">
+    <wsdl:operation name="GetWeather">
+      <wsdl:documentation>
+        Get weather report for all major cities around the
+        world.
+      </wsdl:documentation>
+      <wsdl:input message="tns:GetWeatherSoapIn" />
+      <wsdl:output message="tns:GetWeatherSoapOut" />
+    </wsdl:operation>
+
+    <wsdl:operation name="GetCitiesByCountry">
+      <wsdl:documentation>
+        Get all major cities by country name(full / part).
+      </wsdl:documentation>
+      <wsdl:input message="tns:GetCitiesByCountrySoapIn" />
+      <wsdl:output message="tns:GetCitiesByCountrySoapOut" />
+    </wsdl:operation>
+  </wsdl:portType>
+
+
+
+
+  <wsdl:binding name="GlobalWeatherSoap"
+    type="tns:GlobalWeatherSoap">
+    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
+      style="document" />
+
+    <wsdl:operation name="GetWeather">
+      <soap:operation
+        soapAction="http://www.webserviceX.NET/GetWeather" style="document" />
+
+      <wsdl:input>
+        <soap:body use="literal" />
+      </wsdl:input>
+
+      <wsdl:output>
+        <soap:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+
+    <wsdl:operation name="GetCitiesByCountry">
+      <soap:operation
+        soapAction="http://www.webserviceX.NET/GetCitiesByCountry"
+        style="document" />
+
+      <wsdl:input>
+        <soap:body use="literal" />
+      </wsdl:input>
+
+      <wsdl:output>
+        <soap:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+
+
+
+
+  <wsdl:service name="GlobalWeather">
+
+    <wsdl:port name="GlobalWeatherSoap"
+      binding="tns:GlobalWeatherSoap">
+      <soap:address
+        location="http://www.webservicex.net/globalweather.asmx" />
+    </wsdl:port>
+
+  </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file
Property changes on: branches/Orchestra_4_0/src/demos/weather2/webserviceX/webserviceX.wsdl
___________________________________________________________________
Name: svn:keywords
   + Id

Added: branches/Orchestra_4_0/src/main/assembly/dep.xml (700 => 701)


--- branches/Orchestra_4_0/src/main/assembly/dep.xml	2007-07-16 14:52:05 UTC (rev 700)
+++ branches/Orchestra_4_0/src/main/assembly/dep.xml	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,76 @@
+<assembly>
+  <!-- TODO: a jarjar format would be better -->
+  <id>bin</id>
+  <formats>
+  <format>tar.gz</format>
+    <format>zip</format>
+  </formats>
+  <includeBaseDirectory>true</includeBaseDirectory>
+
+  <!-- Add dependencies in the lib directory. -->
+  <dependencySets>
+    <dependencySet>
+      <outputDirectory>lib</outputDirectory>
+    </dependencySet>
+  </dependencySets>
+
+
+  <fileSets>
+
+  <!-- Include orchestra_4_0_*.jar -->
+    <fileSet>
+      <directory>target</directory>
+      <outputDirectory>lib</outputDirectory>
+      <includes>
+        <include>*.jar</include>
+      </includes>
+    </fileSet>
+
+      <!-- Include ArchiveLoader.jws -->
+        <fileSet>
+      <directory>src/main/java/org/objectweb/orchestra/webservices/axis</directory>
+      <outputDirectory>lib/jws</outputDirectory>
+      <includes>
+        <include>ArchiveLoader.jws</include>
+      </includes>
+    </fileSet>
+
+    <fileSet>
+      <includes>
+        <include>README*</include>
+        <include>LICENSE*</include>
+        <include>NOTICE*</include>
+      </includes>
+    </fileSet>
+
+
+    <fileSet>
+      <directory>src/demos</directory>
+      <outputDirectory>demos</outputDirectory>
+    </fileSet>
+
+   <fileSet>
+      <directory>src/conf</directory>
+      <outputDirectory>conf</outputDirectory>
+    </fileSet>
+
+   <fileSet>
+      <directory>src/logs</directory>
+      <outputDirectory>logs</outputDirectory>
+    </fileSet>
+
+    <fileSet>
+      <directory>src/bin</directory>
+      <outputDirectory>bin</outputDirectory>
+    </fileSet>
+
+
+  </fileSets>
+
+
+
+
+
+
+</assembly>
+
Property changes on: branches/Orchestra_4_0/src/main/assembly/dep.xml
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/conf/Configuration.java (700 => 701)


--- branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/conf/Configuration.java	2007-07-16 14:52:05 UTC (rev 700)
+++ branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/conf/Configuration.java	2007-07-19 14:49:05 UTC (rev 701)
@@ -48,6 +48,9 @@
      */
     private String logFilePath = DEFAULT_LOG_FILE_PATH;
 
+    /**The port of the rmi registry.*/
+    private int rmiPort=DEFAULT_RMI_PORT;
+
     /**
      * The trace level that will be used to select relevant traces.
      */
@@ -96,8 +99,11 @@
 
     // Default values
     /** Default value for the logFilePath field. */
-    public static final String DEFAULT_LOG_FILE_PATH = "orchestra.log";
+    public static final String DEFAULT_LOG_FILE_PATH = "logs/orchestra.log";
 
+    /** Default value for the portRMI field. */
+    public static final int DEFAULT_RMI_PORT = 9999;
+
     /** Default value for the traceLevel field. */
     public static final int DEFAULT_TRACE_LEVEL = Trace.ALL;
 
@@ -260,6 +266,7 @@
         copy.workManagerPoolSize = new Integer(this.workManagerPoolSize);
         copy.setDefaultInformationItem(InformationItem.createInstance());
         copy.setQueryProcessor(QueryProcessor.createInstance());
+        copy.setRmiPort(this.rmiPort);
 
         return copy;
     }
@@ -285,7 +292,21 @@
         return s;
     }
 
+    /**
+     * @return the rmiPort
+     */
+    public int getRmiPort() {
+        return rmiPort;
+    }
 
+    /**
+     * @param rmiPort the rmiPort to set
+     */
+    public void setRmiPort(final int rmiPort) {
+        this.rmiPort = rmiPort;
+    }
+
+
 }
 
 

Modified: branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/deployment/ProcessDeployer.java (700 => 701)


--- branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/deployment/ProcessDeployer.java	2007-07-16 14:52:05 UTC (rev 700)
+++ branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/deployment/ProcessDeployer.java	2007-07-19 14:49:05 UTC (rev 701)
@@ -40,12 +40,12 @@
 import org.objectweb.orchestra.parsing.basis.DefaultConfigurationFileParser;
 import org.objectweb.orchestra.run.threads.WorkManager;
 import org.objectweb.orchestra.run.threads.WorkManagerFactory;
-import org.objectweb.orchestra.webservices.Invoker;
 import org.objectweb.orchestra.webservices.Receiver;
 import org.objectweb.orchestra.webservices.ServiceInvoker;
 import org.objectweb.orchestra.webservices.ServicePublisher;
 import org.objectweb.orchestra.webservices.ServiceReceiver;
 import org.objectweb.orchestra.webservices.SimpleInvoker;
+import org.objectweb.orchestra.webservices.axis.AxisInvoker;
 
 
 /**
@@ -56,7 +56,20 @@
  * Created on : Mar 1, 2007
  */
 public class ProcessDeployer implements ProcessDeployerMBean{
+
+
     /**
+     * Name of the orchestra configuration file.
+     */
+    private final static String engineConfString="orchestra.conf";
+
+    /**
+     * Path to the configuration Directory.
+     */
+    private String confDirectory;
+
+
+    /**
      * Repository of Process.
      */
     private ProcessRepository processRepository;
@@ -112,15 +125,16 @@
 
     /**
      * Create a new instance of a processDeployer.
-     * @param engineConfFile configuration file of the engine.
+     * @param confDirectory : path to the configuration directory.
      * @param ws : a reference to the web service deployer, which will deploy the web service of the process.
      * @param port : port of the rmi registry.
      */
-    public ProcessDeployer(final File engineConfFile, final ServicePublisher ws, final int port){
+    public ProcessDeployer(final String confDirectory, final ServicePublisher ws, final int port){
         useRmi=true;
         this.processRepository=new ProcessRepository();
         this.servicePublisher=ws;
-        setEngineConf(engineConfFile);
+        this.confDirectory=confDirectory;
+        setEngineConf(new File(confDirectory+engineConfString));
         setWorkManager();
         createReceiver(port);
         createInvoker(port);
@@ -135,7 +149,7 @@
      * @param port : port of the RMI registry
      */
     private void createInvoker(final int port){
-        this.invoker = new Invoker(port, useRmi, this.receiver);
+        this.invoker = new AxisInvoker(port, useRmi, this.receiver);
         if (useRmi){
             try {
                 String name = "Orchestra_4_Invoker";
@@ -144,9 +158,9 @@
                     (ServiceInvoker) UnicastRemoteObject.exportObject(invoker, port);
                 Registry registry = LocateRegistry.getRegistry(port);
                 registry.rebind(name, stub);
-                System.out.println("ServiceInvoker bound");
+                System.out.println("\t[ProcessDeployer] ServiceInvoker bound");
             } catch (Exception e) {
-                System.err.println("ServiceInvoker exception:");
+                System.err.println("\t[ProcessDeployer] ServiceInvoker exception:");
                 e.printStackTrace();
             }
         }
@@ -174,11 +188,11 @@
                     (ServiceReceiver) UnicastRemoteObject.exportObject(receiver, port);
                 Registry registry = LocateRegistry.getRegistry(port);
                 registry.rebind(name, stub);
-                System.out.println("ServiceReceiver bound");
+                System.out.println("\t[ProcessDeployer] ServiceReceiver bound");
 
 
             } catch (Exception e) {
-                System.err.println("ServiceReceiver exception:");
+                System.err.println("\t[ProcessDeployer] ServiceReceiver exception:");
                 e.printStackTrace();
             }
         }
@@ -230,7 +244,7 @@
         System.out.println(process.toString());
         System.out.println("\n+The tree is now deployed.");
 
-        if (!servicePublisher.deploy(wsdlResult.getWsdlDef(), processName, wsdlFile.toString())){
+        if (!servicePublisher.deploy(wsdlResult.getWsdlDef(), processName, wsdlFile.toString(), confDirectory)){
             System.err.println("The WSDL has not been deployed");
         }
 

Added: branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/deployment/ProcessDeployerLauncher.java (700 => 701)


--- branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/deployment/ProcessDeployerLauncher.java	2007-07-16 14:52:05 UTC (rev 700)
+++ branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/deployment/ProcessDeployerLauncher.java	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,181 @@
+/**
+ * Copyright (C) 2007  Bull S. A. S.
+ * Bull, Rue Jean Jaures, B.P.68, 78340, Les Clayes-sous-Bois
+ * This library is free software; you can redistribute it and/or modify it under the terms
+ * of the GNU Lesser General Public License as published by the Free Software Foundation
+ * version 2.1 of the License.
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+ * Floor, Boston, MA  02110-1301, USA.
+ *
+ * ProcessDeployerLauncher.java
+ *
+ * @author Goulven Le Jeune, Charles Souillard, Candy Chlad, Stanislas Giraudet De Boudemange
+ *
+ * Created on : Jul 16, 2007
+ *
+ * $Id$
+ **/
+package org.objectweb.orchestra.deployment;
+
+import java.io.File;
+
+import javax.management.MBeanServer;
+import javax.management.MBeanServerFactory;
+import javax.management.ObjectName;
+import javax.management.remote.JMXConnectorServer;
+import javax.management.remote.JMXConnectorServerFactory;
+import javax.management.remote.JMXServiceURL;
+
+import org.objectweb.orchestra.conf.Configuration;
+import org.objectweb.orchestra.parsing.ConfigurationFileParser;
+import org.objectweb.orchestra.webservices.axis.AxisServicePublisher;
+
+/**
+ * ProcessDeployerLauncher.java.
+ * Create an instance of the processDeployer, and publy it
+ * on a rmiRegistry.
+ *
+ * @author Goulven Le Jeune, Charles Souillard, Candy Chlad, Stanislas Giraudet De Boudemange
+ *
+ * Created on : Jul 16, 2007
+ */
+public class ProcessDeployerLauncher {
+
+    /**
+     * Name of the orchestra conf file.
+     */
+    public static final String ORCHESTRA_CONF_FILE_NAME="/conf/orchestra.conf";
+
+
+    /**
+     * Start the ProcessDeployer.
+     * args[0]: port of the rmi registry.
+     * args[1]: directory of the configuration file.
+     * @param args Arguments.
+     */
+     public static void main(final String[] args) {
+        try{
+
+            /*
+             * args 1: Orchestra home dir.
+             */
+             String orchestraDir;
+
+            if (args.length!=1){
+                System.err.println("Wrong nomber of arguments.");
+                System.err.println(help());
+                return;
+            }
+            try{
+                orchestraDir=args[0];
+            }catch(Exception ex){
+                System.err.println("Wrong type of arguments.");
+                System.err.println(help());
+                return;
+            }
+
+
+            // Configuration: the engine configuration is overriden by the process configuration.
+            ConfigurationFileParser cfp = new ConfigurationFileParser();
+            Configuration conf = (Configuration) cfp.getConfiguration(
+                    new File(orchestraDir+ProcessDeployerLauncher.ORCHESTRA_CONF_FILE_NAME), null);
+
+            int port=conf.getRmiPort();
+
+
+
+
+
+
+
+
+
+            if (System.getSecurityManager() == null) {
+                System.setSecurityManager(new SecurityManager());
+            }
+            //start rmiregistry
+            System.out.println("\t[ProcessDeployerLauncher] Launch the RMI registry on the port:"+port);
+            java.rmi.registry.LocateRegistry.createRegistry(port);
+
+
+            //create a MBean server
+            MBeanServer mbs = MBeanServerFactory.createMBeanServer();
+
+            String domain = mbs.getDefaultDomain();
+            String mbeanClassName = "org.objectweb.orchestra.deployment.ProcessDeployer";
+            String mbeanObjectNameStr =
+               domain + ":type=" + mbeanClassName + ",index=1";
+
+            //create the MBean
+            System.out.println("\t[ProcessDeployerLauncher] Create the " + mbeanClassName
+                    +" MBean within the MBeanServer");
+           ObjectName mbeanObjectName=null;
+
+            try {
+               mbeanObjectName = ObjectName.getInstance(mbeanObjectNameStr);
+               AxisServicePublisher wsPublisher=new AxisServicePublisher();
+               File confFile=new File(orchestraDir + ProcessDeployerLauncher.ORCHESTRA_CONF_FILE_NAME);
+
+
+               Object[] params={orchestraDir+"/conf/", wsPublisher, port};
+               String[] signature={"java.lang.String",
+                       "org.objectweb.orchestra.webservices.ServicePublisher", "int"};
+               mbs.createMBean(mbeanClassName, mbeanObjectName, params, signature);
+
+
+            } catch (Exception e) {
+                System.out.println("\t!!! Could not create the " + mbeanClassName + " MBean !!!");
+                e.printStackTrace();
+                System.out.println("\nEXITING...\n");
+                System.exit(1);
+            }
+
+
+            //an RMI connector server is created so that operations can be performed on the MBeans remotely
+            System.out.println("\t[ProcessDeployerLauncher] Register the server bean in the RMI registry:");
+            System.out.println("\t[ProcessDeployerLauncher] JNDI name:   //localhost:"+port+"/Orchestra_4_ProcessDeployer");
+            JMXServiceURL url =
+                new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:"+port+"/Orchestra_4_ProcessDeployer");
+            JMXConnectorServer cs =
+                JMXConnectorServerFactory.newJMXConnectorServer(url, null, mbs);
+            cs.start();
+
+
+            //cs.stop();
+
+
+        }catch(Exception ex){
+            System.err.println("\t[ProcessDeployerLauncher] Unable to create the JMX bean of ProcessDeployer");
+            ex.printStackTrace();
+        }
+
+
+        System.out.println("\t[ProcessDeployerLauncher] Begining of the weather process deployment.");
+
+        try{
+            System.out.println("\t[ProcessDeployerLauncher] ProcessDeployer is started...");
+            Thread.sleep(Long.MAX_VALUE);
+        }catch(Exception ex){
+            System.err.println("\t[ProcessDeployerLauncher] Can't wait all this time");
+            ex.printStackTrace();
+        }
+    }
+
+
+
+    /**
+     *
+     * @return a string that describe how to call this function.
+     */
+    public static String help(){
+        return "\t[ProcessDeployerLauncher] HELP: not yet implemented.";
+    }
+
+
+}
+
+
Property changes on: branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/deployment/ProcessDeployerLauncher.java
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/parsing/NsSchemaMapping.java (700 => 701)


--- branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/parsing/NsSchemaMapping.java	2007-07-16 14:52:05 UTC (rev 700)
+++ branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/parsing/NsSchemaMapping.java	2007-07-19 14:49:05 UTC (rev 701)
@@ -44,7 +44,8 @@
     /**
      * Prefix to use for config file.
      */
-    public static final String CONFIG_PREFIX = "src"+SEP+"main"+SEP+"java"+SEP+PREFIX;
+    public static final String CONFIG_PREFIX = PREFIX;
+    //public static final String CONFIG_PREFIX = "src"+SEP+"main"+SEP+"java"+SEP+PREFIX;
     /**
      * XML schema xsd file name.
      */

Modified: branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/parsing/basis/DefaultConfigurationFileParser.java (700 => 701)


--- branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/parsing/basis/DefaultConfigurationFileParser.java	2007-07-16 14:52:05 UTC (rev 700)
+++ branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/parsing/basis/DefaultConfigurationFileParser.java	2007-07-19 14:49:05 UTC (rev 701)
@@ -81,7 +81,9 @@
 
             // Create a Schema with a Schema factory
             SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
-            Schema schema = schemaFactory.newSchema((new File(getSchema()).toURL()));
+
+            //look for the schema in the Orchestra archive.
+            Schema schema = schemaFactory.newSchema(getClass().getClassLoader().getResource(getSchema()));
             parserFactory.setSchema(schema);
 
             // Parse the configuration file with the validating parser

Modified: branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/parsing/schemas/orchestra-config.xsd (700 => 701)


--- branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/parsing/schemas/orchestra-config.xsd	2007-07-16 14:52:05 UTC (rev 700)
+++ branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/parsing/schemas/orchestra-config.xsd	2007-07-19 14:49:05 UTC (rev 701)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema targetNamespace="http://www.example.org/orchestra-config"
+<xsd:schema targetNamespace="http://orchestra.objectweb.org/orchestra-config"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-  xmlns:ns="http://www.example.org/orchestra-config">
+  xmlns:ns="http://orchestra.objectweb.org/orchestra-config">
 
   <xsd:import></xsd:import>
 
@@ -35,6 +35,7 @@
   <xsd:choice>
     <xsd:element name="exitOnStaticAnalysisErrors" type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
     <xsd:element name="workManagerPoolSize" type="xsd:int" minOccurs="0" maxOccurs="1"/>
+    <xsd:element name="rmiPort" type="xsd:int" minOccurs="1" maxOccurs="1"/>
   </xsd:choice>
   </xsd:complexType>
 

Deleted: branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/AxisServicePublisher.java (700 => 701)


--- branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/AxisServicePublisher.java	2007-07-16 14:52:05 UTC (rev 700)
+++ branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/AxisServicePublisher.java	2007-07-19 14:49:05 UTC (rev 701)
@@ -1,76 +0,0 @@
-/**
- * Copyright (C) 2007  Bull S. A. S.
- * Bull, Rue Jean Jaures, B.P.68, 78340, Les Clayes-sous-Bois
- * This library is free software; you can redistribute it and/or modify it under the terms
- * of the GNU Lesser General Public License as published by the Free Software Foundation
- * version 2.1 of the License.
- * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License along with this
- * program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA  02110-1301, USA.
- *
- * AxisServicePublisher.java
- *
- * @author Goulven Le Jeune, Charles Souillard, Candy Chlad, Stanislas Giraudet De Boudemange
- *
- * Created on : Jun 26, 2007
- *
- * $Id$
- **/
-package org.objectweb.orchestra.webservices;
-
-import javax.wsdl.Definition;
-
-import org.objectweb.orchestra.def.Process;
-import org.objectweb.orchestra.webservices.axis.Axis1Deployer;
-
-/**
- * AxisServicePublisher.java.
- * Implementation of the service publisher with axis.
- *
- * @author Goulven Le Jeune, Charles Souillard, Candy Chlad, Stanislas Giraudet De Boudemange
- *
- * Created on : Jun 26, 2007
- */
-public class AxisServicePublisher implements ServicePublisher {
-
-
-    /**
-     * Default constructor of the class.
-     *
-     */
-    public AxisServicePublisher(){
-
-    }
-
-
-
-
-    /**
-     * Deploys the Web Services classes of the wsdl representing the interface of
-     * a BPEL process.
-     * @param wsdlDefinition the wsdl definition of the process
-     * @param processName the name of the BPEL process
-     * @param wsdlUrl - url of the wsdl file to deploy.
-     * @return true, if deployed
-     */
-    public boolean deploy(final Definition wsdlDefinition, final String processName, final String wsdlUrl) {
-        Axis1Deployer axisDeployer=new Axis1Deployer(processName, wsdlUrl);
-        return axisDeployer.deploy(wsdlDefinition);
-
-    }
-
-    /**
-     * Undeploys the Web Service of the process named processName.
-     * @param processName the name of the process to be undeployed
-     */
-    public void undeploy(final String processName) {
-
-        //TODO
-    }
-
-}
-
-

Deleted: branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/Invoker.java (700 => 701)


--- branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/Invoker.java	2007-07-16 14:52:05 UTC (rev 700)
+++ branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/Invoker.java	2007-07-19 14:49:05 UTC (rev 701)
@@ -1,400 +0,0 @@
-/**
- * Copyright (C) 2007  Bull S. A. S.
- * Bull, Rue Jean Jaures, B.P.68, 78340, Les Clayes-sous-Bois
- * This library is free software; you can redistribute it and/or modify it under the terms
- * of the GNU Lesser General Public License as published by the Free Software Foundation
- * version 2.1 of the License.
- * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License along with this
- * program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA  02110-1301, USA.
- *
- * Invoker.java
- *
- * @author Goulven Le Jeune, Charles Souillard, Candy Chlad, Stanislas Giraudet De Boudemange
- *
- * Created on : Jul 3, 2007
- *
- * $Id$
- **/
-package org.objectweb.orchestra.webservices;
-
-import java.net.MalformedURLException;
-import java.rmi.RemoteException;
-import java.rmi.registry.LocateRegistry;
-import java.rmi.registry.Registry;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Vector;
-
-import javax.wsdl.Binding;
-import javax.wsdl.BindingOperation;
-import javax.wsdl.Operation;
-import javax.wsdl.Part;
-import javax.wsdl.PortType;
-import javax.wsdl.extensions.ExtensibilityElement;
-import javax.wsdl.extensions.soap.SOAPBinding;
-import javax.wsdl.extensions.soap.SOAPBody;
-import javax.wsdl.extensions.soap.SOAPOperation;
-import javax.xml.namespace.QName;
-import javax.xml.rpc.ServiceException;
-
-import org.apache.axis.client.Call;
-import org.apache.axis.client.Service;
-import org.apache.axis.constants.Style;
-import org.apache.axis.constants.Use;
-import org.apache.axis.message.SOAPBodyElement;
-import org.objectweb.orchestra.parsing.WsdlXmlParseResult;
-import org.objectweb.orchestra.run.RunTime;
-import org.objectweb.orchestra.xml.InformationItem;
-import org.objectweb.orchestra.xml.Message;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-
-/**
- * Invoker.java.
- *
- * @author Goulven Le Jeune, Charles Souillard, Candy Chlad, Stanislas Giraudet De Boudemange
- *
- * Created on : Jul 3, 2007
- */
-public class Invoker implements ServiceInvoker {
-
-
-    /**The QName of the soap binding element in WSDL.*/
-    private static final QName SOAP_BINDING=new QName("http://schemas.xmlsoap.org/wsdl/soap/", "binding");
-
-    /** The QName of the soap operation element in WSDL.*/
-    private static final QName SOAP_OPERATION=new QName("http://schemas.xmlsoap.org/wsdl/soap/", "operation");
-
-    /** The QName of the soap body element in WSDL.*/
-    private static final QName SOAP_BODY=new QName("http://schemas.xmlsoap.org/wsdl/soap/", "body");
-
-    /** Defaut style. */
-    private static final Style DEFAUT_STYLE=Style.DOCUMENT;
-
-    /** Defaut use. */
-    private static final Use DEFAUT_USE=Use.LITERAL;
-
-
-    /**
-     * True if the RMI is used to access waitingMessageClass.
-     */
-    private boolean useRMI;
-
-
-    /**
-     * ServiceReceiver of the process.
-     */
-    private ServiceReceiver receiver;
-
-    /**
-     * Idf of message send to the process, to find back the sender to give him the response.
-     */
-    private static Integer idf=0;
-
-    /**
-     * Port of the rmiregistry.
-     */
-    private int port;
-    /**
-     * Hash Map of sender.
-     * Keys:idf of sender
-     * Values: WaitingMessageClassName in the RMI registry
-     */
-    private HashMap<String, String> senders;
-
-    /**
-     * Hash Map of sender.
-     * Keys:idf of sender
-     * Values: WaitingMessageClassName
-     */
-    private HashMap<String, WaitingMessageClass> sendersWithoutRmi;
-
-    /**
-     * private construtor. Only one instance of this class could be create.
-     * @param port : port of the rmiregistry.
-     * @param useRmi : True if the RMI is used to access waitingMessageClass.
-     * @param receiver : ServiceReceiver of the process.
-     */
-    public Invoker(final int port, final boolean useRmi, final ServiceReceiver receiver){
-        this.receiver=receiver;
-
-        //TODO :allow the configuration of these properties.
-        System.getProperties().put("http.proxyHost", "intra0");
-        System.getProperties().put("http.proxyPort", "8080");
-        System.getProperties().put("http.nonProxyHosts", "localhost|*.frec.bull.fr");
-
-        this.port=port;
-        this.useRMI=useRmi;
-        if (useRmi){
-            senders=new HashMap<String, String>();
-        }else{
-            sendersWithoutRmi=new HashMap<String, WaitingMessageClass>();
-        }
-    }
-
-    /**
-     * Signal a new sender.
-     * @param waitingClassName The name of class that wait the response in the RMI registry.
-     * @return the idf
-     * @throws RemoteException - ex
-     */
-    public String newSender(final String waitingClassName)throws RemoteException{
-        if (useRMI){
-            String senderIdf=getIdf();
-            synchronized (senders) {
-                senders.put(senderIdf, waitingClassName);
-            }
-            return senderIdf;
-        }
-        return null;
-    }
-
-    /**
-     * Signal a new sender.
-     * @param waitingClass The class that wait the response.
-     * @return the idf
-     * @throws RemoteException - ex
-     */
-    public String newSender(final WaitingMessageClass waitingClass)throws RemoteException{
-        if (!useRMI){
-            String senderIdf=getIdf();
-            synchronized (sendersWithoutRmi) {
-                sendersWithoutRmi.put(senderIdf, waitingClass);
-            }
-            return senderIdf;
-        }
-        return null;
-    }
-
-    /**
-     * Sends a message to a partner during an invocation. This calls an operation of another Web Service.
-     * @param message message to send to the partner
-     * @param endPoint endPoint of the partner called
-     * @param operation operation of the partner
-     * @param portType PortType of the partner
-     * @param runTime runTime of the activity which is calling this method. It can be used to give
-     * an answer to that activity.
-     * @param wsdlDefinition Definition of the wsdl.
-     * @throws RemoteException -ex
-     */
-    public void invokeCall(final Message message, final String endPoint,
-            final Operation operation, final PortType portType,
-            final RunTime runTime, final WsdlXmlParseResult wsdlDefinition) throws RemoteException{
-        try{
-
-            /*
-             * we take the first binding of the wsdl definition which bind the portType
-             * given in parameter.
-             */
-            Binding binding=wsdlDefinition.getBindings(portType.getQName()).get(0);
-
-            //style used for the operation (RPC or document)
-            String style=null;
-            //URI of soapAction
-            String soapAction=null;
-            //Use used for the input of the operation
-            String use=null;
-
-
-            //we for the defaut style (Document) or (RPC) to use for operations.
-            for (Object elem:binding.getExtensibilityElements()){
-                QName elementQName=((ExtensibilityElement) elem).getElementType();
-                if (elementQName.equals(SOAP_BINDING)){
-                    SOAPBinding soapBinding=(SOAPBinding) elem;
-                    style=soapBinding.getStyle();
-                }
-
-            }
-
-            //get particular configuration for operation.
-            BindingOperation opBinding=binding.getBindingOperation(operation.getName(), null, null);
-            for (Object elem:opBinding.getExtensibilityElements()){
-                QName elementQName=((ExtensibilityElement) elem).getElementType();
-                if (elementQName.equals(SOAP_OPERATION)){
-                    SOAPOperation soapOperation=(SOAPOperation) elem;
-                    style=soapOperation.getStyle();
-                    soapAction=soapOperation.getSoapActionURI();
-                }
-            }
-
-            //get the use of the Input (Literal or encoded)
-            for (Object elem:opBinding.getBindingInput().getExtensibilityElements()){
-                QName elementQName=((ExtensibilityElement) elem).getElementType();
-                if (elementQName.equals(SOAP_BODY)){
-                    SOAPBody soapBody=(SOAPBody) elem;
-                    use=soapBody.getUse();
-                }
-            }
-
-            System.out.println("Create the  call to the endPoint['"+endPoint+"']");
-            /*
-             *Create an axis service with these configurations to call a web service.
-             */
-            Service  service = new Service();
-            //we build the Call object to call the web service.
-            Call call=(Call) service.createCall();
-            call.setTargetEndpointAddress(new java.net.URL(endPoint));
-            call.setOperation(operation.getName());
-
-            //style of the call.
-            if (style==null){
-                //we put the defaut style.
-                style=DEFAUT_STYLE.getName();
-            }
-            call.setOperationStyle(style);
-            //SoapAction of the call.
-            if (soapAction!=null){
-                call.setSOAPActionURI(soapAction);
-            }
-
-            //use of the call.
-            if (use==null){
-                use=DEFAUT_USE.getName();
-            }
-
-            call.setOperationUse(Use.LITERAL);
-
-
-
-            /*
-             * Build params of the operation.
-             */
-            Object[] params=null;
-
-            if (style.equals(Style.DOCUMENT_STR) && use.equals(Use.LITERAL_STR)){
-                params=buildSOAPDocumentLiteralParams(message, operation);
-            }
-
-            //make the call !!
-            Vector result=(Vector) call.invoke(params);
-
-            //we have now to make the BPEL response from the result.
-
-            Message messageReturned=null;
-            if (style.equals(Style.DOCUMENT_STR) && use.equals(Use.LITERAL_STR)){
-                messageReturned=buildSOAPDocumentLiteralMessage(result, operation);
-            }
-            receiver.invokeResponse(messageReturned, runTime);
-
-        }catch(ServiceException ex){
-            System.err.println("Error when create the call from the service.");
-            ex.printStackTrace();
-        }catch(MalformedURLException ex){
-            System.err.println("Error when create end point reference URL");
-            ex.printStackTrace();
-        }
-
-
-
-    }
-
-
-
-    /**
-     * Build the array of SOAPBodyElements which will be in the body element
-     * of the SOAP message, from the BLEP message and the operation used.
-     * To be compliant with the Basic profile, the body would have only one SOAPBodyElement.
-     * @param message BPEL message, which contains parts. (only one part to be compliant with the basic profile).
-     * @param operation WSDL operation.
-     * @return the params of the operation. This params should be an array of one SOAPBodyElement to be compliant
-     * with the basic profile.
-     */
-    public static Object[] buildSOAPDocumentLiteralParams(final Message message, final Operation operation){
-        Vector<Element> soapBodyElements=new Vector<Element>();
-        Map parts=operation.getInput().getMessage().getParts();
-        for (Object partObj:parts.values()){
-            soapBodyElements.add((Element) message.getPart(((Part) partObj).getName()).getRootElement());
-        }
-
-
-        //parameters of the SWDL operation
-        Object[] params=new Object[soapBodyElements.size()];
-        int i=0;
-        for (Element soapBodyElement:soapBodyElements){
-            params[i]=new SOAPBodyElement(soapBodyElement);
-            i++;
-        }
-
-        return params;
-    }
-
-    /**
-     * Build the PBEL Message from the result of the call for a document style
-     * and an literal use.
-     * To be compliant with the Basic profile, the result would have only one element.
-     * @param elementsOfResult Node elements which make the result of the operation call.
-     * @param operation WSDL operation.
-     * @return the new BPEL Message.
-     */
-    public static Message buildSOAPDocumentLiteralMessage(final Vector elementsOfResult, final Operation operation){
-         HashMap <String, InformationItem> parts=new HashMap<String, InformationItem>();
-         int index=0;
-         for (Object partObj:operation.getOutput().getMessage().getParts().values()){
-             String partName=((Part) partObj).getName();
-             InformationItem responsePart=InformationItem.createInstance((Node) elementsOfResult.get(index));
-             parts.put(partName, responsePart);
-         }
-          return new Message(parts);
-    }
-
-
-
-    /**
-     * Replies to a user that has sent a message. This method is called by
-     * a &lt;reply&gt; activity.
-     * @param message message of the response
-     * @param idf identifier of the user that has initially sent a message.
-     * The response will be sent to that identifier.
-     * @throws RemoteException - ex
-     */
-    public void reply(final Message message, final String idf) throws RemoteException{
-        if(useRMI){
-            if (senders.containsKey(idf)){
-                String className=senders.get(idf);
-                try{
-                    if (System.getSecurityManager() == null) {
-                        System.setSecurityManager(new SecurityManager());
-                    }
-                    Registry registry = LocateRegistry.getRegistry(this.port);
-                    WaitingMessageClass waitingclass=(WaitingMessageClass) registry.lookup(className);
-                    waitingclass.setMessageReturned(idf, message);
-                }catch(Exception ex){
-                    ex.printStackTrace();
-                }
-                synchronized (senders) {
-                    senders.remove(idf);
-                }
-            }
-        }else{
-            if (sendersWithoutRmi.containsKey(idf)){
-                System.out.println("We have found the partner idf");
-                WaitingMessageClass waitingClass=sendersWithoutRmi.get(idf);
-
-                waitingClass.setMessageReturned(idf, message);
-
-                synchronized (sendersWithoutRmi) {
-                    sendersWithoutRmi.remove(idf);
-                }
-            }
-        }
-    }
-
-    /**
-     * @return the idf
-     */
-    private static String getIdf() {
-        synchronized (idf) {
-            idf++;
-            return idf.toString();
-        }
-
-    }
-
-}
-
-

Modified: branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/Receiver.java (700 => 701)


--- branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/Receiver.java	2007-07-16 14:52:05 UTC (rev 700)
+++ branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/Receiver.java	2007-07-19 14:49:05 UTC (rev 701)
@@ -68,8 +68,8 @@
             final String idf) throws RemoteException{
 
         processRepository.getProcess(processName).inputCall(operation, portType, idf, false, message);
-        // TODO Auto-generated method stub
 
+
     }
 
     /**

Modified: branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/ServicePublisher.java (700 => 701)


--- branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/ServicePublisher.java	2007-07-16 14:52:05 UTC (rev 700)
+++ branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/ServicePublisher.java	2007-07-19 14:49:05 UTC (rev 701)
@@ -38,9 +38,10 @@
      * @param wsdlDefinition the wsdl definition of the process
      * @param processName the name pf the BPEL process
      * @param wsdlUrl - url of the wsdl file to deploy.
+     * @param confDirectory - Absolute path to the configuration directory.
      * @return true, if deployed
      */
-    boolean deploy(Definition wsdlDefinition, String processName, final String wsdlUrl);
+    boolean deploy(Definition wsdlDefinition, String processName, final String wsdlUrl, final String confDirectory);
 
     /**
      * Undeploys the Web Service of the process named processName.

Modified: branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/WSDeployer.java (700 => 701)


--- branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/WSDeployer.java	2007-07-16 14:52:05 UTC (rev 700)
+++ branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/WSDeployer.java	2007-07-19 14:49:05 UTC (rev 701)
@@ -85,7 +85,7 @@
     /**
      * Directory of the web service package.
      */
-    public static final String  WEBSERICE_DIR="src/main/java/org/objectweb/orchestra/webservices/";
+    public static final String  WEBSERICE_DIR="org/objectweb/orchestra/webservices/";
 
     /**
      * List of problems found in the wsdl file.
@@ -98,12 +98,20 @@
     private String wsId;
 
     /**
+     *  Absolute path to the conf directory.
+     */
+    protected String confDirectory;
+
+
+    /**
      * Default constructor.
      * @param wsId - wsId
+     * @param confDirectory Absolute path to the conf directory.
      */
-    protected WSDeployer(final String wsId) {
+    protected WSDeployer(final String wsId, final String confDirectory){
         this.wsId = wsId;
         this.problems = new ArrayList<Problem>();
+        this.confDirectory=confDirectory;
     }
 
 
@@ -506,11 +514,14 @@
 
     /**
      * Return the ws engine currently used.
-     * @return the ws engine currently used.
+     * @param wsId - id of the WS : in our case, processName
+     * @param wsdlUrl - url of the wsdl file to deploy.
+     * @param confDirectory - Absolute path to the conf directory.
+     * @return the WSDeployer used.
      */
-    public static WSDeployer getWSDeployer(final String wsId, final String wsdlUrl) {
+    public static WSDeployer getWSDeployer(final String wsId, final String wsdlUrl, final String confDirectory) {
         // TODO make the choice done from configuration file
-        return new Axis1Deployer(wsId, wsdlUrl);
+        return new Axis1Deployer(wsId, wsdlUrl, confDirectory);
     }
 
     /**

Modified: branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/axis/Axis1Deployer.java (700 => 701)


--- branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/axis/Axis1Deployer.java	2007-07-16 14:52:05 UTC (rev 700)
+++ branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/axis/Axis1Deployer.java	2007-07-19 14:49:05 UTC (rev 701)
@@ -101,6 +101,8 @@
     public static final String JDK_VERSION = "1.5";
     /** utility variable to define ant environment.*/
     public static final String ANT_ENV = "antEnv";
+    /** configuration file name.*/
+    public static final String AXIS_CONF_FILE="axis-conf.xml";
 
     /** ant project. */
     private Project antProject;
@@ -117,9 +119,10 @@
      * Default constructor.
      * @param wsId - id of the WS : in our case, processName
      * @param wsdlUrl - url of the wsdl file to deploy.
+     * @param confDirectory - Absolute path to the conf directory.
      */
-    public Axis1Deployer(final String wsId, final String wsdlUrl) {
-        super(wsId);
+    public Axis1Deployer(final String wsId, final String wsdlUrl, final String confDirectory) {
+        super(wsId, confDirectory);
         this.wsdlUrl = wsdlUrl;
         setAntProject();
         this.catalinaBase = this.antProject.getProperty(ANT_ENV+".CATALINA_BASE");
@@ -134,7 +137,8 @@
      */
     private File getAxisConfFile() {
         //return new File(this.catalinaBase+File.separator+"conf"+File.separator+"axis-conf.xml");
-        return new File(WSDeployer.WEBSERICE_DIR+"axis/axis-conf.xml");
+        return new File(this.confDirectory+AXIS_CONF_FILE);
+
     }
 
     /**
@@ -357,6 +361,7 @@
         String isLoadedJarUrl = archiveLoaderUrl+"?method="+method+"&jarFile=../lib/"+getWSJarFileName();
 
         int iter = this.conf.getNbOfVerificationCalls();
+
         long timeToSleep = this.conf.getTimeBetweenVerificationCalls();
 
         int i=0;
@@ -533,6 +538,7 @@
      */
     private File updateWsddFile(final File wsddFile) {
         //parse wsdd file
+
         WsddXmlParser parser = new WsddXmlParser();
         XmlParseResult result = parser.parseFile(wsddFile);
         Document wsddDoc = result.getDocument();
@@ -776,7 +782,7 @@
         try {
             // Prepare the DOM document for writing
             Source source = new DOMSource(doc);
-            Result result = new StreamResult(file);
+            Result result = new StreamResult("file://" + file.getAbsolutePath());
             // Write the DOM document to the file
             Transformer xformer = TransformerFactory.newInstance().newTransformer();
             xformer.transform(source, result);

Added: branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/axis/AxisInvoker.java (700 => 701)


--- branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/axis/AxisInvoker.java	2007-07-16 14:52:05 UTC (rev 700)
+++ branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/axis/AxisInvoker.java	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,403 @@
+/**
+ * Copyright (C) 2007  Bull S. A. S.
+ * Bull, Rue Jean Jaures, B.P.68, 78340, Les Clayes-sous-Bois
+ * This library is free software; you can redistribute it and/or modify it under the terms
+ * of the GNU Lesser General Public License as published by the Free Software Foundation
+ * version 2.1 of the License.
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+ * Floor, Boston, MA  02110-1301, USA.
+ *
+ * Invoker.java
+ *
+ * @author Goulven Le Jeune, Charles Souillard, Candy Chlad, Stanislas Giraudet De Boudemange
+ *
+ * Created on : Jul 3, 2007
+ *
+ * $Id$
+ **/
+package org.objectweb.orchestra.webservices.axis;
+
+import java.net.MalformedURLException;
+import java.rmi.RemoteException;
+import java.rmi.registry.LocateRegistry;
+import java.rmi.registry.Registry;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Vector;
+
+import javax.wsdl.Binding;
+import javax.wsdl.BindingOperation;
+import javax.wsdl.Operation;
+import javax.wsdl.Part;
+import javax.wsdl.PortType;
+import javax.wsdl.extensions.ExtensibilityElement;
+import javax.wsdl.extensions.soap.SOAPBinding;
+import javax.wsdl.extensions.soap.SOAPBody;
+import javax.wsdl.extensions.soap.SOAPOperation;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.ServiceException;
+
+import org.apache.axis.client.Call;
+import org.apache.axis.client.Service;
+import org.apache.axis.constants.Style;
+import org.apache.axis.constants.Use;
+import org.apache.axis.message.SOAPBodyElement;
+import org.objectweb.orchestra.parsing.WsdlXmlParseResult;
+import org.objectweb.orchestra.run.RunTime;
+import org.objectweb.orchestra.webservices.ServiceInvoker;
+import org.objectweb.orchestra.webservices.ServiceReceiver;
+import org.objectweb.orchestra.webservices.WaitingMessageClass;
+import org.objectweb.orchestra.xml.InformationItem;
+import org.objectweb.orchestra.xml.Message;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+
+/**
+ * Invoker.java.
+ *
+ * @author Goulven Le Jeune, Charles Souillard, Candy Chlad, Stanislas Giraudet De Boudemange
+ *
+ * Created on : Jul 3, 2007
+ */
+public class AxisInvoker implements ServiceInvoker {
+
+
+    /**The QName of the soap binding element in WSDL.*/
+    private static final QName SOAP_BINDING=new QName("http://schemas.xmlsoap.org/wsdl/soap/", "binding");
+
+    /** The QName of the soap operation element in WSDL.*/
+    private static final QName SOAP_OPERATION=new QName("http://schemas.xmlsoap.org/wsdl/soap/", "operation");
+
+    /** The QName of the soap body element in WSDL.*/
+    private static final QName SOAP_BODY=new QName("http://schemas.xmlsoap.org/wsdl/soap/", "body");
+
+    /** Defaut style. */
+    private static final Style DEFAUT_STYLE=Style.DOCUMENT;
+
+    /** Defaut use. */
+    private static final Use DEFAUT_USE=Use.LITERAL;
+
+
+    /**
+     * True if the RMI is used to access waitingMessageClass.
+     */
+    private boolean useRMI;
+
+
+    /**
+     * ServiceReceiver of the process.
+     */
+    private ServiceReceiver receiver;
+
+    /**
+     * Idf of message send to the process, to find back the sender to give him the response.
+     */
+    private static Integer idf=0;
+
+    /**
+     * Port of the rmiregistry.
+     */
+    private int port;
+    /**
+     * Hash Map of sender.
+     * Keys:idf of sender
+     * Values: WaitingMessageClassName in the RMI registry
+     */
+    private HashMap<String, String> senders;
+
+    /**
+     * Hash Map of sender.
+     * Keys:idf of sender
+     * Values: WaitingMessageClassName
+     */
+    private HashMap<String, WaitingMessageClass> sendersWithoutRmi;
+
+    /**
+     * private construtor. Only one instance of this class could be create.
+     * @param port : port of the rmiregistry.
+     * @param useRmi : True if the RMI is used to access waitingMessageClass.
+     * @param receiver : ServiceReceiver of the process.
+     */
+    public AxisInvoker(final int port, final boolean useRmi, final ServiceReceiver receiver){
+        this.receiver=receiver;
+
+        //TODO :allow the configuration of these properties.
+        System.getProperties().put("http.proxyHost", "intra0");
+        System.getProperties().put("http.proxyPort", "8080");
+        System.getProperties().put("http.nonProxyHosts", "localhost|*.frec.bull.fr");
+
+        this.port=port;
+        this.useRMI=useRmi;
+        if (useRmi){
+            senders=new HashMap<String, String>();
+        }else{
+            sendersWithoutRmi=new HashMap<String, WaitingMessageClass>();
+        }
+    }
+
+    /**
+     * Signal a new sender.
+     * @param waitingClassName The name of class that wait the response in the RMI registry.
+     * @return the idf
+     * @throws RemoteException - ex
+     */
+    public String newSender(final String waitingClassName)throws RemoteException{
+        if (useRMI){
+            String senderIdf=getIdf();
+            synchronized (senders) {
+                senders.put(senderIdf, waitingClassName);
+            }
+            return senderIdf;
+        }
+        return null;
+    }
+
+    /**
+     * Signal a new sender.
+     * @param waitingClass The class that wait the response.
+     * @return the idf
+     * @throws RemoteException - ex
+     */
+    public String newSender(final WaitingMessageClass waitingClass)throws RemoteException{
+        if (!useRMI){
+            String senderIdf=getIdf();
+            synchronized (sendersWithoutRmi) {
+                sendersWithoutRmi.put(senderIdf, waitingClass);
+            }
+            return senderIdf;
+        }
+        return null;
+    }
+
+    /**
+     * Sends a message to a partner during an invocation. This calls an operation of another Web Service.
+     * @param message message to send to the partner
+     * @param endPoint endPoint of the partner called
+     * @param operation operation of the partner
+     * @param portType PortType of the partner
+     * @param runTime runTime of the activity which is calling this method. It can be used to give
+     * an answer to that activity.
+     * @param wsdlDefinition Definition of the wsdl.
+     * @throws RemoteException -ex
+     */
+    public void invokeCall(final Message message, final String endPoint,
+            final Operation operation, final PortType portType,
+            final RunTime runTime, final WsdlXmlParseResult wsdlDefinition) throws RemoteException{
+        try{
+
+            /*
+             * we take the first binding of the wsdl definition which bind the portType
+             * given in parameter.
+             */
+            Binding binding=wsdlDefinition.getBindings(portType.getQName()).get(0);
+
+            //style used for the operation (RPC or document)
+            String style=null;
+            //URI of soapAction
+            String soapAction=null;
+            //Use used for the input of the operation
+            String use=null;
+
+
+            //we for the defaut style (Document) or (RPC) to use for operations.
+            for (Object elem:binding.getExtensibilityElements()){
+                QName elementQName=((ExtensibilityElement) elem).getElementType();
+                if (elementQName.equals(SOAP_BINDING)){
+                    SOAPBinding soapBinding=(SOAPBinding) elem;
+                    style=soapBinding.getStyle();
+                }
+
+            }
+
+            //get particular configuration for operation.
+            BindingOperation opBinding=binding.getBindingOperation(operation.getName(), null, null);
+            for (Object elem:opBinding.getExtensibilityElements()){
+                QName elementQName=((ExtensibilityElement) elem).getElementType();
+                if (elementQName.equals(SOAP_OPERATION)){
+                    SOAPOperation soapOperation=(SOAPOperation) elem;
+                    style=soapOperation.getStyle();
+                    soapAction=soapOperation.getSoapActionURI();
+                }
+            }
+
+            //get the use of the Input (Literal or encoded)
+            for (Object elem:opBinding.getBindingInput().getExtensibilityElements()){
+                QName elementQName=((ExtensibilityElement) elem).getElementType();
+                if (elementQName.equals(SOAP_BODY)){
+                    SOAPBody soapBody=(SOAPBody) elem;
+                    use=soapBody.getUse();
+                }
+            }
+
+            System.out.println("Create the  call to the endPoint['"+endPoint+"']");
+            /*
+             *Create an axis service with these configurations to call a web service.
+             */
+            Service  service = new Service();
+            //we build the Call object to call the web service.
+            Call call=(Call) service.createCall();
+            call.setTargetEndpointAddress(new java.net.URL(endPoint));
+            call.setOperation(operation.getName());
+
+            //style of the call.
+            if (style==null){
+                //we put the defaut style.
+                style=DEFAUT_STYLE.getName();
+            }
+            call.setOperationStyle(style);
+            //SoapAction of the call.
+            if (soapAction!=null){
+                call.setSOAPActionURI(soapAction);
+            }
+
+            //use of the call.
+            if (use==null){
+                use=DEFAUT_USE.getName();
+            }
+
+            call.setOperationUse(Use.LITERAL);
+
+
+
+            /*
+             * Build params of the operation.
+             */
+            Object[] params=null;
+
+            if (style.equals(Style.DOCUMENT_STR) && use.equals(Use.LITERAL_STR)){
+                params=buildSOAPDocumentLiteralParams(message, operation);
+            }
+
+            //make the call !!
+            Vector result=(Vector) call.invoke(params);
+
+            //we have now to make the BPEL response from the result.
+
+            Message messageReturned=null;
+            if (style.equals(Style.DOCUMENT_STR) && use.equals(Use.LITERAL_STR)){
+                messageReturned=buildSOAPDocumentLiteralMessage(result, operation);
+            }
+            receiver.invokeResponse(messageReturned, runTime);
+
+        }catch(ServiceException ex){
+            System.err.println("Error when create the call from the service.");
+            ex.printStackTrace();
+        }catch(MalformedURLException ex){
+            System.err.println("Error when create end point reference URL");
+            ex.printStackTrace();
+        }
+
+
+
+    }
+
+
+
+    /**
+     * Build the array of SOAPBodyElements which will be in the body element
+     * of the SOAP message, from the BLEP message and the operation used.
+     * To be compliant with the Basic profile, the body would have only one SOAPBodyElement.
+     * @param message BPEL message, which contains parts. (only one part to be compliant with the basic profile).
+     * @param operation WSDL operation.
+     * @return the params of the operation. This params should be an array of one SOAPBodyElement to be compliant
+     * with the basic profile.
+     */
+    public static Object[] buildSOAPDocumentLiteralParams(final Message message, final Operation operation){
+        Vector<Element> soapBodyElements=new Vector<Element>();
+        Map parts=operation.getInput().getMessage().getParts();
+        for (Object partObj:parts.values()){
+            soapBodyElements.add((Element) message.getPart(((Part) partObj).getName()).getRootElement());
+        }
+
+
+        //parameters of the SWDL operation
+        Object[] params=new Object[soapBodyElements.size()];
+        int i=0;
+        for (Element soapBodyElement:soapBodyElements){
+            params[i]=new SOAPBodyElement(soapBodyElement);
+            i++;
+        }
+
+        return params;
+    }
+
+    /**
+     * Build the PBEL Message from the result of the call for a document style
+     * and an literal use.
+     * To be compliant with the Basic profile, the result would have only one element.
+     * @param elementsOfResult Node elements which make the result of the operation call.
+     * @param operation WSDL operation.
+     * @return the new BPEL Message.
+     */
+    public static Message buildSOAPDocumentLiteralMessage(final Vector elementsOfResult, final Operation operation){
+         HashMap <String, InformationItem> parts=new HashMap<String, InformationItem>();
+         int index=0;
+         for (Object partObj:operation.getOutput().getMessage().getParts().values()){
+             String partName=((Part) partObj).getName();
+             InformationItem responsePart=InformationItem.createInstance((Node) elementsOfResult.get(index));
+             parts.put(partName, responsePart);
+         }
+          return new Message(parts);
+    }
+
+
+
+    /**
+     * Replies to a user that has sent a message. This method is called by
+     * a &lt;reply&gt; activity.
+     * @param message message of the response
+     * @param idf identifier of the user that has initially sent a message.
+     * The response will be sent to that identifier.
+     * @throws RemoteException - ex
+     */
+    public void reply(final Message message, final String idf) throws RemoteException{
+        if(useRMI){
+            if (senders.containsKey(idf)){
+                String className=senders.get(idf);
+                try{
+                    if (System.getSecurityManager() == null) {
+                        System.setSecurityManager(new SecurityManager());
+                    }
+                    Registry registry = LocateRegistry.getRegistry(this.port);
+                    WaitingMessageClass waitingclass=(WaitingMessageClass) registry.lookup(className);
+                    waitingclass.setMessageReturned(idf, message);
+                }catch(Exception ex){
+                    ex.printStackTrace();
+                }
+                synchronized (senders) {
+                    senders.remove(idf);
+                }
+            }
+        }else{
+            if (sendersWithoutRmi.containsKey(idf)){
+                System.out.println("We have found the partner idf");
+                WaitingMessageClass waitingClass=sendersWithoutRmi.get(idf);
+
+                waitingClass.setMessageReturned(idf, message);
+
+                synchronized (sendersWithoutRmi) {
+                    sendersWithoutRmi.remove(idf);
+                }
+            }
+        }
+    }
+
+    /**
+     * @return the idf
+     */
+    private static String getIdf() {
+        synchronized (idf) {
+            idf++;
+            return idf.toString();
+        }
+
+    }
+
+}
+
+
Property changes on: branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/axis/AxisInvoker.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/axis/AxisServicePublisher.java (from rev 698, branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/AxisServicePublisher.java) (698 => 701)


--- branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/AxisServicePublisher.java	2007-07-12 13:55:02 UTC (rev 698)
+++ branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/axis/AxisServicePublisher.java	2007-07-19 14:49:05 UTC (rev 701)
@@ -0,0 +1,75 @@
+/**
+ * Copyright (C) 2007  Bull S. A. S.
+ * Bull, Rue Jean Jaures, B.P.68, 78340, Les Clayes-sous-Bois
+ * This library is free software; you can redistribute it and/or modify it under the terms
+ * of the GNU Lesser General Public License as published by the Free Software Foundation
+ * version 2.1 of the License.
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+ * Floor, Boston, MA  02110-1301, USA.
+ *
+ * AxisServicePublisher.java
+ *
+ * @author Goulven Le Jeune, Charles Souillard, Candy Chlad, Stanislas Giraudet De Boudemange
+ *
+ * Created on : Jun 26, 2007
+ *
+ * $Id$
+ **/
+package org.objectweb.orchestra.webservices.axis;
+
+import javax.wsdl.Definition;
+
+import org.objectweb.orchestra.def.Process;
+import org.objectweb.orchestra.webservices.ServicePublisher;
+
+/**
+ * AxisServicePublisher.java.
+ * Implementation of the service publisher with axis.
+ *
+ * @author Goulven Le Jeune, Charles Souillard, Candy Chlad, Stanislas Giraudet De Boudemange
+ *
+ * Created on : Jun 26, 2007
+ */
+public class AxisServicePublisher implements ServicePublisher {
+
+
+    /**
+     * Default constructor of the class.
+     *
+     */
+    public AxisServicePublisher(){
+
+    }
+
+    /**
+     * Deploys the Web Services classes of the wsdl representing the interface of
+     * a BPEL process.
+     * @param wsdlDefinition the wsdl definition of the process
+     * @param processName the name of the BPEL process
+     * @param wsdlUrl - url of the wsdl file to deploy.
+     * @param confDirectory - Absolute path to the configuration directory.
+     * @return true, if deployed
+     */
+    public boolean deploy(final Definition wsdlDefinition, final String processName,
+            final String wsdlUrl, final String confDirectory) {
+        Axis1Deployer axisDeployer=new Axis1Deployer(processName, wsdlUrl, confDirectory);
+        return axisDeployer.deploy(wsdlDefinition);
+
+    }
+
+    /**
+     * Undeploys the Web Service of the process named processName.
+     * @param processName the name of the process to be undeployed
+     */
+    public void undeploy(final String processName) {
+
+        //TODO
+    }
+
+}
+
+

Property changes: branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/axis/AxisServicePublisher.java


Name: svn:keywords
   + Id

Deleted: branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/axis/axis-conf.xml (700 => 701)


--- branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/axis/axis-conf.xml	2007-07-16 14:52:05 UTC (rev 700)
+++ branches/Orchestra_4_0/src/main/java/org/objectweb/orchestra/webservices/axis/axis-conf.xml	2007-07-19 14:49:05 UTC (rev 701)
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<orchestraAxisSettings
-	xmlns="http://www.example.org/orchestra-axis-config">
-	<host>localhost</host>
-	<port>8080</port>
-	<webappName>axis</webappName>
-	<servletPath>services</servletPath>
-	<typeMapping>1.3</typeMapping>
-	<getVersionSvc>Version?method=getVersion</getVersionSvc>
-	<javaOutputFolder>orchestra-tmp-generated</javaOutputFolder>
-	<timeBetweenVerificationCalls>2000</timeBetweenVerificationCalls>
-	<nbOfVerificationCalls>10</nbOfVerificationCalls>
-</orchestraAxisSettings>
\ No newline at end of file

Modified: branches/Orchestra_4_0/src/test/java/org/objectweb/orchestra/test/resources/orchestra-engine.conf (700 => 701)


--- branches/Orchestra_4_0/src/test/java/org/objectweb/orchestra/test/resources/orchestra-engine.conf	2007-07-16 14:52:05 UTC (rev 700)
+++ branches/Orchestra_4_0/src/test/java/org/objectweb/orchestra/test/resources/orchestra-engine.conf	2007-07-19 14:49:05 UTC (rev 701)
@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<ns:orchestraSettings xmlns:ns="http://www.example.org/orchestra-config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.example.org/orchestra-config orchestra-config.xsd ">
+<ns:orchestraSettings xmlns:ns="http://orchestra.objectweb.org/orchestra-config"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://orchestra.objectweb.org/orchestra-config orchestra-config.xsd ">
   <outputSettings>
     <logFilePath>orchestra.log</logFilePath>
     <traceLevel>debug</traceLevel>
@@ -7,5 +9,6 @@
   </outputSettings>
   <engineInternalSettings>
     <exitOnStaticAnalysisErrors>false</exitOnStaticAnalysisErrors>
+    <rmiPort>9999</rmiPort>
   </engineInternalSettings>
 </ns:orchestraSettings>


<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 2006-2007, OW2 Consortium | contact | webmaster.