servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r535212 - in /incubator/servicemix/trunk/samples/loan-broker: ./ loan-broker-bpe-su/ loan-broker-jms-su/src/main/resources/ loan-broker-lw-su/src/main/java/loanbroker/ loan-broker-ode-su/ loan-broker-ode-su/src/ loan-broker-ode-su/src/main/...
Date Fri, 04 May 2007 12:41:04 GMT
Author: gnodet
Date: Fri May  4 05:41:03 2007
New Revision: 535212

URL: http://svn.apache.org/viewvc?view=rev&rev=535212
Log:
SM-946: Upgrade loan-broker example to use Apache Ode

Added:
    incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/
      - copied from r526604, incubator/servicemix/trunk/samples/loan-broker/loan-broker-bpe-su/
    incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/pom.xml
      - copied, changed from r534991, incubator/servicemix/trunk/samples/loan-broker/loan-broker-bpe-su/pom.xml
    incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/
      - copied from r534991, incubator/servicemix/trunk/samples/loan-broker/loan-broker-bpe-su/src/
    incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/main/resources/deploy.xml   (with props)
Removed:
    incubator/servicemix/trunk/samples/loan-broker/loan-broker-bpe-su/
Modified:
    incubator/servicemix/trunk/samples/loan-broker/README.txt
    incubator/servicemix/trunk/samples/loan-broker/build.xml
    incubator/servicemix/trunk/samples/loan-broker/loan-broker-jms-su/src/main/resources/xbean.xml
    incubator/servicemix/trunk/samples/loan-broker/loan-broker-lw-su/src/main/java/loanbroker/CreditAgency.java
    incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/main/resources/bank.wsdl
    incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/main/resources/creditagency.wsdl
    incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/main/resources/loanbroker.bpel
    incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/main/resources/loanbroker.wsdl
    incubator/servicemix/trunk/samples/loan-broker/loan-broker-sa/pom.xml
    incubator/servicemix/trunk/samples/loan-broker/pom.xml
    incubator/servicemix/trunk/samples/loan-broker/src/main/java/JMSClient.java

Modified: incubator/servicemix/trunk/samples/loan-broker/README.txt
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/loan-broker/README.txt?view=diff&rev=535212&r1=535211&r2=535212
==============================================================================
--- incubator/servicemix/trunk/samples/loan-broker/README.txt (original)
+++ incubator/servicemix/trunk/samples/loan-broker/README.txt Fri May  4 05:41:03 2007
@@ -27,6 +27,12 @@
   bin/servicemix
 in the root dir of this ditribution.
 
+This example depends on Apache Ode JBI Service Engine which has not been
+released yet.  You will need to build it yourself (more informations at
+http://incubator.apache.org/ode/getting-ode.html).  You will need to copy
+the Service Engine installer to the install directory of this distribution
+prior to the following instructions.
+
 To run this sample, launch the following commands:
   mvn install jbi:projectDeploy
 

Modified: incubator/servicemix/trunk/samples/loan-broker/build.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/loan-broker/build.xml?view=diff&rev=535212&r1=535211&r2=535212
==============================================================================
--- incubator/servicemix/trunk/samples/loan-broker/build.xml (original)
+++ incubator/servicemix/trunk/samples/loan-broker/build.xml Fri May  4 05:41:03 2007
@@ -17,115 +17,54 @@
     limitations under the License.
 
 -->
-<project name="bpel-bpe" default="run" basedir=".">
+<project name="loan-broker-client" default="run" basedir=".">
+
+  <property name="class.dir" value="classes"/>
 
-  <property name="build.dir" value="build"/>
-  <property name="comp.build.dir" value="${build.dir}/components"/>
-  <property name="client.build.dir" value="${build.dir}/client"/>
-  
-  <property name="src.dir" value="src"/>
-  <property name="comp.src.dir" value="${src.dir}/components"/>
-  <property name="client.src.dir" value="${src.dir}/main/java"/>
-  <property name="su.bpe.src.dir" value="${src.dir}/bpe-su"/>
-  <property name="su.lw.src.dir" value="${src.dir}/lw-su"/>
-  <property name="sa.src.dir" value="${src.dir}/sa"/>
-  
   <target name="clean">
     <delete dir="target" quiet="true"/>
-    <delete dir="${build.dir}" quiet="true"/>
+    <delete dir="${class.dir}" quiet="true"/>
   </target>
 
   <target name="init">
-    <mkdir dir="${build.dir}"/>
-    <!--mkdir dir="${comp.build.dir}"/-->
-    <mkdir dir="${client.build.dir}"/>
+    <mkdir dir="${class.dir}"/>
+    <mkdir dir="lib"/>
 
-    <get src="http://repo.mergere.com/maven2/lingo/lingo/1.0/lingo-1.0.jar"
-         dest="../../lib/optional/lingo-1.0.jar" 
-         usetimestamp="true" />
-    <get src="http://repo.mergere.com/maven2/commons-pool/commons-pool/1.2/commons-pool-1.2.jar"
-         dest="../../lib/optional/commons-pool-1.2.jar" 
-         usetimestamp="true" />
-    <get src="http://repo.mergere.com/maven2/commons-collections/commons-collections/3.1/commons-collections-3.1.jar"
-         dest="../../lib/optional/commons-collections-3.1.jar" 
-         usetimestamp="true" />
-    <get src="http://repo.mergere.com/maven2/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar"
-         dest="../../lib/optional/concurrent-1.3.4.jar" 
+    <get src="http://repo.mergere.com/maven2/org/logicblaze/lingo/lingo/1.3/lingo-1.3.jar"
+         dest="lib/lingo-1.3.jar" 
          usetimestamp="true" />
 
     <path id="javac.classpath">
-      <pathelement path="${comp.build.dir}"/>
-      <pathelement path="${client.build.dir}"/>
+      <pathelement path="${class.dir}"/>
       <pathelement path="../../conf"/>
       <fileset dir="../../lib">
         <include name="**/*.jar"/>
       </fileset>
-      <fileset dir="../../lib/optional">
-        <include name="*.jar"/>
+      <fileset dir="lib">
+        <include name="**/*.jar"/>
       </fileset>
     </path>
-    
   </target>
 
-  <target name="build-components" depends="init" description="Build components">
-    <javac srcdir="${comp.src.dir}" destdir="${comp.build.dir}" debug="on" source="1.4" target="1.4">
+  <target name="compile" depends="init" description="Compile all Java">
+    <javac srcdir="." destdir="${class.dir}">
       <classpath refid="javac.classpath"/>
     </javac>
   </target>
-  
-  <target name="build-lw-su" depends="build-components" description="Build the engine service unit">
-    <zip destfile="${build.dir}/lw-su.zip">
-      <fileset dir="${comp.build.dir}"/>
-      <fileset dir="${su.lw.src.dir}"/>
-    </zip>
-  </target>
-
-  <target name="build-bpe-su" depends="init" description="Build the bpe service unit">
-    <zip destfile="${build.dir}/bpe-su.zip">
-      <fileset dir="${su.bpe.src.dir}"/>
-    </zip>
-  </target>
 
-  <target name="build-sa" depends="build-bpe-su, build-lw-su" description="Build the service assembly">
-    <zip destfile="${build.dir}/bpe-demo-sa.zip">
-      <fileset dir="${build.dir}" includes="bpe-su.zip"/>
-      <fileset dir="${build.dir}" includes="lw-su.zip"/>
-      <fileset dir="${sa.src.dir}"/>
-    </zip>
-  </target>
-  
-  <target name="setup" depends="build-sa" description="Setup servicemix">
-    <mkdir dir="install"/>
-    <mkdir dir="deploy"/>
-    <copy todir="install">
-      <fileset dir="../../components" includes="*bpe*"/>
-      <fileset dir="../../components" includes="*lwcontainer*"/>
-    </copy>
-    <copy file="${build.dir}/bpe-demo-sa.zip" todir="deploy"/>
-    <copy todir="../../lib/optional">
-      <fileset dir="../../components/lib" includes="servicemix-components*.jar"/>
-    </copy>
-  </target>
-
-  <target name="build-client" depends="init" description="Build components">
-    <javac srcdir="${client.src.dir}" destdir="${client.build.dir}" debug="on" source="1.4" target="1.4">
-      <classpath refid="javac.classpath"/>
-    </javac>
-  </target>
-  
-  <target name="run" depends="build-client" description="Runs the example client">
-    <echo>Running exsample client</echo>
+  <target name="run" depends="compile" description="Runs the example client">
+    <echo>Running example client</echo>
     <java classname="JMSClient" fork="yes" maxmemory="100M">
       <classpath refid="javac.classpath"/>
     </java>
   </target>
-	
-  <target name="run-loop" depends="build-client" description="Runs the example client">
-    <echo>Running exsample client</echo>
+
+  <target name="run-loop" depends="compile" description="Runs the example client in a loop">
+    <echo>Running example client in a loop</echo>
     <java classname="JMSClient" fork="yes" maxmemory="100M">
       <classpath refid="javac.classpath"/>
       <arg value="100000"/>
     </java>
   </target>
-	
+
 </project>

Modified: incubator/servicemix/trunk/samples/loan-broker/loan-broker-jms-su/src/main/resources/xbean.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/loan-broker/loan-broker-jms-su/src/main/resources/xbean.xml?view=diff&rev=535212&r1=535211&r2=535212
==============================================================================
--- incubator/servicemix/trunk/samples/loan-broker/loan-broker-jms-su/src/main/resources/xbean.xml (original)
+++ incubator/servicemix/trunk/samples/loan-broker/loan-broker-jms-su/src/main/resources/xbean.xml Fri May  4 05:41:03 2007
@@ -21,7 +21,7 @@
        xmlns:lb="urn:logicblaze:soa:loanbroker">
 
   <jms:endpoint service="lb:LoanBrokerService"
-                endpoint="endpoint"
+                endpoint="broker"
                 targetService="lb:LoanBrokerService"
                 defaultOperation="lb:getLoanQuote" 
                 role="consumer"

Modified: incubator/servicemix/trunk/samples/loan-broker/loan-broker-lw-su/src/main/java/loanbroker/CreditAgency.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/loan-broker/loan-broker-lw-su/src/main/java/loanbroker/CreditAgency.java?view=diff&rev=535212&r1=535211&r2=535212
==============================================================================
--- incubator/servicemix/trunk/samples/loan-broker/loan-broker-lw-su/src/main/java/loanbroker/CreditAgency.java (original)
+++ incubator/servicemix/trunk/samples/loan-broker/loan-broker-lw-su/src/main/java/loanbroker/CreditAgency.java Fri May  4 05:41:03 2007
@@ -52,7 +52,7 @@
             return;
         }
         try {
-            Document doc = (Document) new SourceTransformer().toDOMNode(inOut.getInMessage());
+            Document doc = new SourceTransformer().toDOMDocument(inOut.getInMessage());
             String ssn = textValueOfXPath(doc, "//*[local-name()='ssn']");
             if (ssn == null || ssn.length() == 0) {
                 fail(exchange, new NullPointerException());
@@ -112,4 +112,4 @@
             return null;
         }
     }
-}
\ No newline at end of file
+}

Copied: incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/pom.xml (from r534991, incubator/servicemix/trunk/samples/loan-broker/loan-broker-bpe-su/pom.xml)
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/pom.xml?view=diff&rev=535212&p1=incubator/servicemix/trunk/samples/loan-broker/loan-broker-bpe-su/pom.xml&r1=534991&p2=incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/pom.xml&r2=535212
==============================================================================
--- incubator/servicemix/trunk/samples/loan-broker/loan-broker-bpe-su/pom.xml (original)
+++ incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/pom.xml Fri May  4 05:41:03 2007
@@ -28,24 +28,57 @@
     </parent>
 
     <groupId>org.apache.servicemix.samples.loan-broker</groupId>
-    <artifactId>loan-broker-bpe-su</artifactId>
+    <artifactId>loan-broker-ode-su</artifactId>
     <packaging>jbi-service-unit</packaging>
-    <name>ServiceMix :: Samples :: Loan Broker :: BPE</name>
+    <name>ServiceMix :: Samples :: Loan Broker :: Ode</name>
 
     <dependencies>
         <dependency>
-            <groupId>org.apache.servicemix</groupId>
-            <artifactId>servicemix-bpe</artifactId>
-            <version>3.2-incubating-SNAPSHOT</version>
+            <groupId>org.apache.ode</groupId>
+            <artifactId>ode-tools</artifactId>
+            <version>${ode-version}</version>
+            <scope>test</scope>
         </dependency>
     </dependencies>
 
+    <properties>
+        <ode-version>2.0-SNAPSHOT</ode-version>
+        <componentName>OdeBpelEngine</componentName>
+    </properties>
+
     <build>
         <plugins>
             <plugin>
                 <groupId>org.apache.servicemix.tooling</groupId>
                 <artifactId>jbi-maven-plugin</artifactId>
                 <extensions>true</extensions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>compile-bpel</id>
+                        <phase>validate</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <tasks>
+                                <taskdef classname="org.apache.ode.tools.bpelc.ant.BpelCTask" name="bpelc">
+                                    <classpath>
+                                        <pathelement path="${basedir}/target/classes" />
+                                        <path refid="maven.test.classpath" />
+                                    </classpath>
+                                </taskdef>
+                                <mkdir dir="${basedir}/target/bpel/" />
+                                <bpelc targetDir="${basedir}/target/bpel/">
+                                    <bpel url="${basedir}/src/main/resources/loanbroker.bpel" />
+                                </bpelc>
+                            </tasks>
+                        </configuration>
+                    </execution>
+                </executions>
             </plugin>
         </plugins>
     </build>

Modified: incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/main/resources/bank.wsdl
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/main/resources/bank.wsdl?view=diff&rev=535212&r1=534991&r2=535212
==============================================================================
--- incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/main/resources/bank.wsdl (original)
+++ incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/main/resources/bank.wsdl Fri May  4 05:41:03 2007
@@ -20,15 +20,13 @@
 <!-- $Rev: 356052 $ $Date: 2005-12-11 14:41:20 -0800 (dim., 11 déc. 2005) $ -->
 <definitions targetNamespace="urn:logicblaze:soa:bank"
 	xmlns:tns="urn:logicblaze:soa:bank"
-	xmlns:typens="urn:logicblaze:soa:bank:types"
 	xmlns="http://schemas.xmlsoap.org/wsdl/"
-	xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
-	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-	xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
+	xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+	xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 
 	<types>
 		<xsd:schema
-			targetNamespace="urn:logicblaze:soa:bank:types"
+			targetNamespace="urn:logicblaze:soa:bank"
 			xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 
 			<xsd:complexType name="getLoanQuoteRequest">
@@ -47,15 +45,18 @@
 				</xsd:sequence>
 			</xsd:complexType>
 
+			<xsd:element name="getLoanQuoteRequest" type="tns:getLoanQuoteRequest" />
+			<xsd:element name="getLoanQuoteResponse" type="tns:getLoanQuoteResponse" />
+
 		</xsd:schema>
 	</types>
 
 	<message name="getLoanQuoteRequest">
-		<part name="payload" type="typens:getLoanQuoteRequest" />
+		<part name="payload" element="tns:getLoanQuoteRequest" />
 	</message>
 
 	<message name="getLoanQuoteResponse">
-		<part name="payload" type="typens:getLoanQuoteResponse" />
+		<part name="payload" element="tns:getLoanQuoteResponse" />
 	</message>
 
 	<portType name="Bank">
@@ -64,5 +65,9 @@
 			<output message="tns:getLoanQuoteResponse" />
 		</operation>
 	</portType>
+
+	<plnk:partnerLinkType name="BankPL">
+		<plnk:role name="BankService" portType="tns:Bank" />
+	</plnk:partnerLinkType>
 
 </definitions>

Modified: incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/main/resources/creditagency.wsdl
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/main/resources/creditagency.wsdl?view=diff&rev=535212&r1=534991&r2=535212
==============================================================================
--- incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/main/resources/creditagency.wsdl (original)
+++ incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/main/resources/creditagency.wsdl Fri May  4 05:41:03 2007
@@ -20,15 +20,13 @@
 <!-- $Rev: 356052 $ $Date: 2005-12-11 14:41:20 -0800 (dim., 11 déc. 2005) $ -->
 <definitions targetNamespace="urn:logicblaze:soa:creditagency"
 	xmlns:tns="urn:logicblaze:soa:creditagency"
-	xmlns:typens="urn:logicblaze:soa:creditagency:types"
 	xmlns="http://schemas.xmlsoap.org/wsdl/"
-	xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
-	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-	xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
+	xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+	xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 
 	<types>
 		<xsd:schema
-			targetNamespace="urn:logicblaze:soa:creditagency:types"
+			targetNamespace="urn:logicblaze:soa:creditagency"
 			xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 
 			<xsd:complexType name="getCreditScoreRequest">
@@ -61,33 +59,44 @@
 				</xsd:sequence>
 			</xsd:complexType>
 
+			<xsd:complexType name="invalidSSNFault">
+				<xsd:sequence>
+					<xsd:element name="ssn" type="xsd:string" />
+				</xsd:sequence>
+			</xsd:complexType>
+
+			<xsd:element name="getCreditScoreRequest" type="tns:getCreditScoreRequest" />
+			<xsd:element name="getCreditScoreResponse" type="tns:getCreditScoreResponse" />
+			<xsd:element name="getCreditHistoryLengthRequest" type="tns:getCreditHistoryLengthRequest" />
+			<xsd:element name="getCreditHistoryLengthResponse" type="tns:getCreditHistoryLengthResponse" />
+			<xsd:element name="unknownSSNFault" type="tns:unknownSSNFault" />
+			<xsd:element name="invalidSSNFault" type="tns:invalidSSNFault" />
+
 		</xsd:schema>
 	</types>
 
 	<message name="getCreditScoreRequest">
-		<part name="payload" type="typens:getCreditScoreRequest" />
+		<part name="payload" element="tns:getCreditScoreRequest" />
 	</message>
 
 	<message name="getCreditScoreResponse">
-		<part name="payload" type="typens:getCreditScoreResponse" />
+		<part name="payload" element="tns:getCreditScoreResponse" />
 	</message>
 
 	<message name="getCreditHistoryLengthRequest">
-		<part name="payload"
-			type="typens:getCreditHistoryLengthRequest" />
+		<part name="payload" element="tns:getCreditHistoryLengthRequest" />
 	</message>
 
 	<message name="getCreditHistoryLengthResponse">
-		<part name="payload"
-			type="typens:getCreditHistoryLengthResponse" />
+		<part name="payload" element="tns:getCreditHistoryLengthResponse" />
 	</message>
 
 	<message name="unknownSSNFault">
-		<part name="payload" type="typens:unknownSSNFault" />
+		<part name="payload" element="tns:unknownSSNFault" />
 	</message>
 
 	<message name="invalidSSNFault">
-		<part name="payload" type="typens:invalidSSNFault" />
+		<part name="payload" element="tns:invalidSSNFault" />
 	</message>
 
 	<portType name="CreditAgency">
@@ -104,5 +113,9 @@
 			</fault>
 		</operation>
 	</portType>
+
+	<plnk:partnerLinkType name="CreditAgencyPL">
+		<plnk:role name="CreditAgencyService" portType="tns:CreditAgency" />
+	</plnk:partnerLinkType>
 
 </definitions>

Added: incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/main/resources/deploy.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/main/resources/deploy.xml?view=auto&rev=535212
==============================================================================
--- incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/main/resources/deploy.xml (added)
+++ incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/main/resources/deploy.xml Fri May  4 05:41:03 2007
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03" 
+        xmlns:lb="urn:logicblaze:soa:loanbroker"
+        xmlns:ca="urn:logicblaze:soa:creditagency"
+        xmlns:bk="urn:logicblaze:soa:bank">
+
+  <process name="lb:LoanBrokerService">
+    <active>true</active>
+    <provide partnerLink="LoanBroker">
+      <service name="lb:LoanBrokerService" port="broker" />
+    </provide>
+    <invoke partnerLink="CreditAgency">
+      <service name="ca:CreditAgencyService" port="agency" />
+    </invoke>
+    <invoke partnerLink="Bank1">
+      <service name="bk:Bank1" port="bank" />
+    </invoke>
+    <invoke partnerLink="Bank2">
+      <service name="bk:Bank2" port="bank" />
+    </invoke>
+    <invoke partnerLink="Bank3">
+      <service name="bk:Bank3" port="bank" />
+    </invoke>
+    <invoke partnerLink="Bank4">
+      <service name="bk:Bank4" port="bank" />
+    </invoke>
+    <invoke partnerLink="Bank5">
+      <service name="bk:Bank5" port="bank" />
+    </invoke>
+  </process>
+
+</deploy>

Propchange: incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/main/resources/deploy.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/main/resources/deploy.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/main/resources/deploy.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/main/resources/loanbroker.bpel
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/main/resources/loanbroker.bpel?view=diff&rev=535212&r1=534991&r2=535212
==============================================================================
--- incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/main/resources/loanbroker.bpel (original)
+++ incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/main/resources/loanbroker.bpel Fri May  4 05:41:03 2007
@@ -18,16 +18,28 @@
 
 -->
 <!-- $Rev: 356052 $ $Date: 2005-12-11 14:41:20 -0800 (dim., 11 déc. 2005) $ -->
-<bpel:process name="loanbrokerProcess"
+<bpel:process name="LoanBrokerService"
 	targetNamespace="urn:logicblaze:soa:loanbroker"
+	suppressJoinFailure="yes"
+	exitOnStandardFault="yes"
+	expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
 	xmlns:tns="urn:logicblaze:soa:loanbroker"
 	xmlns:ca="urn:logicblaze:soa:creditagency"
 	xmlns:bk="urn:logicblaze:soa:bank"
-	xmlns:svc="urn:logicblaze:soa:service" suppressJoinFailure="yes"
-	xmlns:bpel="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xmlns:sm="http://servicemix.apache.org/schemas/bpe/1.0"
-	xsi:schemaLocation="http://schemas.xmlsoap.org/ws/2003/03/business-process/ http://schemas.xmlsoap.org/ws/2003/03/business-process/">
+	xmlns:svc="urn:logicblaze:soa:service"
+	xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+
+	<bpel:import importType="http://schemas.xmlsoap.org/wsdl/" location="loanbroker.wsdl" namespace="urn:logicblaze:soa:loanbroker"/>
+
+	<bpel:partnerLinks>
+		<bpel:partnerLink myRole="LoanBrokerService" name="LoanBroker" partnerLinkType="tns:LoanBrokerPL"/>
+		<bpel:partnerLink partnerRole="CreditAgencyService" name="CreditAgency" partnerLinkType="ca:CreditAgencyPL"/>
+		<bpel:partnerLink partnerRole="BankService" name="Bank1" partnerLinkType="bk:BankPL"/>
+		<bpel:partnerLink partnerRole="BankService" name="Bank2" partnerLinkType="bk:BankPL"/>
+		<bpel:partnerLink partnerRole="BankService" name="Bank3" partnerLinkType="bk:BankPL"/>
+		<bpel:partnerLink partnerRole="BankService" name="Bank4" partnerLinkType="bk:BankPL"/>
+		<bpel:partnerLink partnerRole="BankService" name="Bank5" partnerLinkType="bk:BankPL"/>
+	</bpel:partnerLinks>
 
 	<bpel:variables>
 		<bpel:variable name="request" messageType="tns:getLoanQuoteRequest" />
@@ -51,11 +63,19 @@
 			<bpel:sequence>
 				<bpel:assign>
 					<bpel:copy>
-						<bpel:from variable="request" part="payload" query="/tns:getLoanQuoteRequest/tns:ssn" />
-						<bpel:to variable="invalidSSN" part="payload" query="/tns:invalidSSNFault/tns:ssn" />
+						<bpel:from>
+							<bpel:literal>
+								<tns:invalidSSNFault><tns:ssn/></tns:invalidSSNFault>
+							</bpel:literal>
+						</bpel:from>
+						<bpel:to>$invalidSSN.payload</bpel:to>
+					</bpel:copy>
+					<bpel:copy>
+						<bpel:from>$request.payload/tns:ssn</bpel:from>
+						<bpel:to>$invalidSSN.payload/tns:ssn</bpel:to>
 					</bpel:copy>
 				</bpel:assign>
-				<bpel:reply name="response" partnerLink="LoanBrokerResponse"
+				<bpel:reply name="response" partnerLink="LoanBroker"
 					portType="tns:LoanBroker" operation="getLoanQuote"
 					variable="invalidSSN" faultName="tns:InvalidSSN" >
 				</bpel:reply>
@@ -65,20 +85,28 @@
 			<bpel:sequence>
 				<bpel:assign>
 					<bpel:copy>
-						<bpel:from variable="request" part="payload" query="/tns:getLoanQuoteRequest/tns:ssn" />
-						<bpel:to variable="unknownSSN" part="payload" query="/tns:unknownSSNFault/tns:ssn" />
+						<bpel:from>
+							<bpel:literal>
+								<tns:unknownSSNFault><tns:ssn/></tns:unknownSSNFault>
+							</bpel:literal>
+						</bpel:from>
+						<bpel:to>$invalidSSN.payload</bpel:to>
+					</bpel:copy>
+					<bpel:copy>
+						<bpel:from>$request.payload/tns:ssn</bpel:from>
+						<bpel:to>$unknownSSN.payload/tns:ssn</bpel:to>
 					</bpel:copy>
 				</bpel:assign>
-				<bpel:reply name="response" partnerLink="LoanBrokerResponse"
+				<bpel:reply name="response" partnerLink="LoanBroker"
 					portType="tns:LoanBroker" operation="getLoanQuote"
-					variable="unknownSSN" faultName="tns:unknownSSN" >
+					variable="unknownSSN" faultName="tns:UnknownSSN" >
 				</bpel:reply>
 			</bpel:sequence>
 		</bpel:catch>
 	</bpel:faultHandlers>
 
 	<bpel:sequence>
-		<bpel:receive name="request" partnerLink="LoanBrokerRequest"
+		<bpel:receive name="request" partnerLink="LoanBroker"
 			portType="tns:LoanBroker" operation="getLoanQuote" variable="request"
 			createInstance="yes">
 		</bpel:receive>
@@ -89,8 +117,16 @@
 			<bpel:sequence>
 				<bpel:assign>
 					<bpel:copy>
-						<bpel:from variable="request" part="payload" query="/tns:getLoanQuoteRequest/tns:ssn" />
-						<bpel:to variable="ca-history-request" part="payload" query="/ca:getCreditHistoryLengthRequest/ca:ssn" />
+						<bpel:from>
+							<bpel:literal>
+								<ca:getCreditHistoryLengthRequest><ca:ssn/></ca:getCreditHistoryLengthRequest>
+							</bpel:literal>
+						</bpel:from>
+						<bpel:to>$ca-history-request.payload</bpel:to>
+					</bpel:copy>
+					<bpel:copy>
+						<bpel:from>$request.payload/tns:ssn</bpel:from>
+						<bpel:to>$ca-history-request.payload/ca:ssn</bpel:to>
 					</bpel:copy>
 				</bpel:assign>
 		
@@ -103,8 +139,16 @@
 			<bpel:sequence>
 				<bpel:assign>
 					<bpel:copy>
-						<bpel:from variable="request" part="payload" query="/tns:getLoanQuoteRequest/tns:ssn" />
-						<bpel:to variable="ca-score-request" part="payload" query="/ca:getCreditScoreRequest/ca:ssn" />
+						<bpel:from>
+							<bpel:literal>
+								<ca:getCreditScoreRequest><ca:ssn/></ca:getCreditScoreRequest>
+							</bpel:literal>
+						</bpel:from>
+						<bpel:to>$ca-score-request.payload</bpel:to>
+					</bpel:copy>
+					<bpel:copy>
+						<bpel:from>$request.payload/tns:ssn</bpel:from>
+						<bpel:to>$ca-score-request.payload/ca:ssn</bpel:to>
 					</bpel:copy>
 				</bpel:assign>
 		
@@ -117,130 +161,142 @@
 
 		<bpel:assign>
 			<bpel:copy>
-				<bpel:from variable="request" part="payload" query="/tns:getLoanQuoteRequest/tns:ssn" />
-				<bpel:to variable="bk-loanquote-request" part="payload" query="/bk:getLoanQuoteRequest/bk:ssn"/>
+				<bpel:from>
+					<bpel:literal>
+						<bk:getLoanQuoteRequest><bk:ssn/><bk:amount/><bk:duration/><bk:score/><bk:length/></bk:getLoanQuoteRequest>
+					</bpel:literal>
+				</bpel:from>
+				<bpel:to>$bk-loanquote-request.payload</bpel:to>
 			</bpel:copy>
 			<bpel:copy>
-				<bpel:from variable="request" part="payload" query="/tns:getLoanQuoteRequest/tns:amount" />
-				<bpel:to variable="bk-loanquote-request" part="payload" query="/bk:getLoanQuoteRequest/bk:amount"/>
+				<bpel:from>$request.payload/tns:ssn</bpel:from>
+				<bpel:to>$bk-loanquote-request.payload/bk:ssn</bpel:to>
 			</bpel:copy>
 			<bpel:copy>
-				<bpel:from variable="request" part="payload" query="/tns:getLoanQuoteRequest/tns:duration" />
-				<bpel:to variable="bk-loanquote-request" part="payload" query="/bk:getLoanQuoteRequest/bk:duration"/>
+				<bpel:from>$request.payload/tns:amount</bpel:from>
+				<bpel:to>$bk-loanquote-request.payload/bk:amount</bpel:to>
 			</bpel:copy>
 			<bpel:copy>
-				<bpel:from variable="ca-score-response" part="payload" query="/ca:getCreditScoreResponse/ca:score" />
-				<bpel:to variable="bk-loanquote-request" part="payload" query="/bk:getLoanQuoteRequest/bk:score"/>
+				<bpel:from>$request.payload/tns:duration</bpel:from>
+				<bpel:to>$bk-loanquote-request.payload/bk:duration</bpel:to>
 			</bpel:copy>
 			<bpel:copy>
-				<bpel:from variable="ca-history-response" part="payload" query="/ca:getCreditHistoryLengthResponse/ca:length" />
-				<bpel:to variable="bk-loanquote-request" part="payload" query="/bk:getLoanQuoteRequest/bk:length"/>
+				<bpel:from>$ca-score-response.payload/ca:score</bpel:from>
+				<bpel:to>$bk-loanquote-request.payload/bk:score</bpel:to>
+			</bpel:copy>
+			<bpel:copy>
+				<bpel:from>$ca-history-response.payload/ca:length</bpel:from>
+				<bpel:to>$bk-loanquote-request.payload/bk:length</bpel:to>
+			</bpel:copy>
+			<bpel:copy>
+				<bpel:from>
+					<bpel:literal>
+						<tns:getLoanQuoteResponse><tns:rate/></tns:getLoanQuoteResponse>
+					</bpel:literal>
+				</bpel:from>
+				<bpel:to>$response.payload</bpel:to>
 			</bpel:copy>
 		</bpel:assign>
 
-		<bpel:switch>
+		<bpel:if>
+			<bpel:condition>
+				$bk-loanquote-request.payload/bk:amount >= 75000.0 and
+				$bk-loanquote-request.payload/bk:score >= 600 and
+				$bk-loanquote-request.payload/bk:length >= 8
+			</bpel:condition>
+			<bpel:sequence>
+				<bpel:flow>
+					<bpel:invoke name="bank1" partnerLink="Bank1"
+							portType="bk:Bank" operation="getLoanQuote" 
+							inputVariable="bk-loanquote-request"
+							outputVariable="bk-loanquote-response-1" />
+							
+					<bpel:invoke name="bank2" partnerLink="Bank2"
+							portType="bk:Bank" operation="getLoanQuote" 
+							inputVariable="bk-loanquote-request"
+							outputVariable="bk-loanquote-response-2" />
+				</bpel:flow>
+				<bpel:if>
+					<bpel:condition>
+						$bk-loanquote-response-1.payload/bk:rate > $bk-loanquote-response-2.payload/bk:rate
+					</bpel:condition>
+					<bpel:assign>
+						<bpel:copy>
+							<bpel:from>$bk-loanquote-response-2.payload/bk:rate</bpel:from>
+							<bpel:to>$response.payload/tns:rate</bpel:to>
+						</bpel:copy>
+					</bpel:assign>
+					<bpel:else>
+						<bpel:assign>
+							<bpel:copy>
+								<bpel:from>$bk-loanquote-response-1.payload/bk:rate</bpel:from>
+								<bpel:to>$response.payload/tns:rate</bpel:to>
+							</bpel:copy>
+						</bpel:assign>
+					</bpel:else>
+				</bpel:if>
+			</bpel:sequence>
 		
-			<bpel:case condition="getVariableData('bk-loanquote-request', 'payload', '/bk:getLoanQuoteRequest/bk:amount') >= 75000.0 and
-			                      getVariableData('bk-loanquote-request', 'payload', '/bk:getLoanQuoteRequest/bk:score') >= 600 and
-			                      getVariableData('bk-loanquote-request', 'payload', '/bk:getLoanQuoteRequest/bk:length') >= 8">
+			<bpel:elseif>
+				<bpel:condition>
+					$bk-loanquote-request.payload/bk:amount >= 10000.0 and
+					$bk-loanquote-request.payload/bk:amount &lt; 75000.0 and
+					$bk-loanquote-request.payload/bk:score >= 400 and
+					$bk-loanquote-request.payload/bk:length >= 3
+				</bpel:condition>
 				<bpel:sequence>
-				    <bpel:flow>      
-						<bpel:invoke name="bank1" partnerLink="Bank1"
-								portType="bk:Bank" operation="getLoanQuote" 
-								inputVariable="bk-loanquote-request"
-								outputVariable="bk-loanquote-response-1" 
-								sm:endpoint="urn:logicblaze:soa:bank:Bank1:bank" />
-								
-						<bpel:invoke name="bank2" partnerLink="Bank2"
-								portType="bk:Bank" operation="getLoanQuote" 
-								inputVariable="bk-loanquote-request"
-								outputVariable="bk-loanquote-response-2" 
-								sm:endpoint="urn:logicblaze:soa:bank:Bank2:bank" />
-					</bpel:flow>
-					<bpel:switch>
-						<bpel:case condition="getVariableData('bk-loanquote-response-1', 'payload', '/bk:getLoanQuoteResponse/bk:rate') > 
-										      getVariableData('bk-loanquote-response-2', 'payload', '/bk:getLoanQuoteResponse/bk:rate')">
-							<bpel:assign>
-								<bpel:copy>
-									<bpel:from expression="getVariableData('bk-loanquote-response-2', 'payload', '/bk:getLoanQuoteResponse/bk:rate')" />
-									<bpel:to variable="response" part="payload" query="/tns:getLoanQuoteResponse/tns:rate" />
-								</bpel:copy>
-							</bpel:assign>
-						</bpel:case>
-						<bpel:otherwise>
-							<bpel:assign>
-								<bpel:copy>
-									<bpel:from expression="getVariableData('bk-loanquote-response-1', 'payload', '/bk:getLoanQuoteResponse/bk:rate')" />
-									<bpel:to variable="response" part="payload" query="/tns:getLoanQuoteResponse/tns:rate" />
-								</bpel:copy>
-							</bpel:assign>
-						</bpel:otherwise>
-					</bpel:switch>
-				</bpel:sequence>
-			</bpel:case>
-			
-			<bpel:case condition="getVariableData('bk-loanquote-request', 'payload', '/bk:getLoanQuoteRequest/bk:amount') >= 10000.0 and
-			                      getVariableData('bk-loanquote-request', 'payload', '/bk:getLoanQuoteRequest/bk:amount') &lt; 75000.0 and
-			                      getVariableData('bk-loanquote-request', 'payload', '/bk:getLoanQuoteRequest/bk:score') >= 400 and
-			                      getVariableData('bk-loanquote-request', 'payload', '/bk:getLoanQuoteRequest/bk:length') >= 3">
-			           
-			    <bpel:sequence>
-				    <bpel:flow>      
+					<bpel:flow>      
 						<bpel:invoke name="bank3" partnerLink="Bank3"
 								portType="bk:Bank" operation="getLoanQuote" 
 								inputVariable="bk-loanquote-request"
-								outputVariable="bk-loanquote-response-3" 
-								sm:endpoint="urn:logicblaze:soa:bank:Bank3:bank" />
-								
+								outputVariable="bk-loanquote-response-3" />
 						<bpel:invoke name="bank4" partnerLink="Bank4"
 								portType="bk:Bank" operation="getLoanQuote" 
 								inputVariable="bk-loanquote-request"
-								outputVariable="bk-loanquote-response-4" 
-								sm:endpoint="urn:logicblaze:soa:bank:Bank4:bank" />
+								outputVariable="bk-loanquote-response-4" />
 					</bpel:flow>
-					<bpel:switch>
-						<bpel:case condition="getVariableData('bk-loanquote-response-3', 'payload', '/bk:getLoanQuoteResponse/bk:rate') > 
-										      getVariableData('bk-loanquote-response-4', 'payload', '/bk:getLoanQuoteResponse/bk:rate')">
-							<bpel:assign>
-								<bpel:copy>
-									<bpel:from expression="getVariableData('bk-loanquote-response-4', 'payload', '/bk:getLoanQuoteResponse/bk:rate')" />
-									<bpel:to variable="response" part="payload" query="/tns:getLoanQuoteResponse/tns:rate" />
-								</bpel:copy>
-							</bpel:assign>
-						</bpel:case>
-						<bpel:otherwise>
+					<bpel:if>
+						<bpel:condition>
+							$bk-loanquote-response-3.payload/bk:rate > $bk-loanquote-response-4.payload/bk:rate
+						</bpel:condition>
+						<bpel:assign>
+							<bpel:copy>
+								<bpel:from>$bk-loanquote-response-4.payload/bk:rate</bpel:from>
+								<bpel:to>$response.payload/tns:rate</bpel:to>
+							</bpel:copy>
+						</bpel:assign>
+						<bpel:else>
 							<bpel:assign>
 								<bpel:copy>
-									<bpel:from expression="getVariableData('bk-loanquote-response-3', 'payload', '/bk:getLoanQuoteResponse/bk:rate')" />
-									<bpel:to variable="response" part="payload" query="/tns:getLoanQuoteResponse/tns:rate" />
+									<bpel:from>$bk-loanquote-response-3.payload/bk:rate</bpel:from>
+									<bpel:to>$response.payload/tns:rate</bpel:to>
 								</bpel:copy>
 							</bpel:assign>
-						</bpel:otherwise>
-					</bpel:switch>
+						</bpel:else>
+					</bpel:if>
 				</bpel:sequence>
-			</bpel:case>
-			
-			<bpel:otherwise>
+			</bpel:elseif>
+		
+			<bpel:else>
 			
 				<bpel:sequence>
 					<bpel:invoke name="bank5" partnerLink="Bank5"
 							portType="bk:Bank" operation="getLoanQuote" 
 							inputVariable="bk-loanquote-request"
-							outputVariable="bk-loanquote-response-5" 
-							sm:endpoint="urn:logicblaze:soa:bank:Bank5:bank" />
+							outputVariable="bk-loanquote-response-5" />
 					<bpel:assign>
 						<bpel:copy>
-							<bpel:from expression="getVariableData('bk-loanquote-response-5', 'payload', '/bk:getLoanQuoteResponse/bk:rate')" />
-							<bpel:to variable="response" part="payload" query="/tns:getLoanQuoteResponse/tns:rate" />
+							<bpel:from>$bk-loanquote-response-5.payload/bk:rate</bpel:from>
+							<bpel:to>$response.payload/tns:rate</bpel:to>
 						</bpel:copy>
 					</bpel:assign>
 				</bpel:sequence>
-
-			</bpel:otherwise>
-		
-		</bpel:switch>
+	
+			</bpel:else>
+	
+		</bpel:if>
 		
-		<bpel:reply name="response" partnerLink="LoanBrokerResponse"
+		<bpel:reply name="response" partnerLink="LoanBroker"
 			portType="tns:LoanBroker" operation="getLoanQuote"
 			variable="response" />
 

Modified: incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/main/resources/loanbroker.wsdl
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/main/resources/loanbroker.wsdl?view=diff&rev=535212&r1=534991&r2=535212
==============================================================================
--- incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/main/resources/loanbroker.wsdl (original)
+++ incubator/servicemix/trunk/samples/loan-broker/loan-broker-ode-su/src/main/resources/loanbroker.wsdl Fri May  4 05:41:03 2007
@@ -20,9 +20,8 @@
 <!-- $Rev: 356052 $ $Date: 2005-12-11 14:41:20 -0800 (dim., 11 déc. 2005) $ -->
 <definitions targetNamespace="urn:logicblaze:soa:loanbroker"
 	xmlns:tns="urn:logicblaze:soa:loanbroker"
-	xmlns:typens="urn:logicblaze:soa:loanbroker:types"
 	xmlns="http://schemas.xmlsoap.org/wsdl/"
-	xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
+	xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
 	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 	xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
 
@@ -35,7 +34,7 @@
 	<!-- type defs -->
 	<types>
 		<xsd:schema
-			targetNamespace="urn:logicblaze:soa:loanbroker:types"
+			targetNamespace="urn:logicblaze:soa:loanbroker"
 			xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 
 			<xsd:complexType name="getLoanQuoteRequest">
@@ -64,23 +63,28 @@
 				</xsd:sequence>
 			</xsd:complexType>
 
+			<xsd:element name="getLoanQuoteRequest" type="tns:getLoanQuoteRequest" />
+			<xsd:element name="getLoanQuoteResponse" type="tns:getLoanQuoteResponse" />
+			<xsd:element name="unknownSSNFault" type="tns:unknownSSNFault" />
+			<xsd:element name="invalidSSNFault" type="tns:invalidSSNFault" />
+
 		</xsd:schema>
 	</types>
 
 	<message name="getLoanQuoteRequest">
-		<part name="payload" type="typens:getLoanQuoteRequest" />
+		<part name="payload" element="tns:getLoanQuoteRequest" />
 	</message>
 
 	<message name="getLoanQuoteResponse">
-		<part name="payload" type="typens:getLoanQuoteResponse" />
+		<part name="payload" element="tns:getLoanQuoteResponse" />
 	</message>
 
 	<message name="unknownSSNFault">
-		<part name="payload" type="typens:unknownSSNFault" />
+		<part name="payload" element="tns:unknownSSNFault" />
 	</message>
 
 	<message name="invalidSSNFault">
-		<part name="payload" type="typens:invalidSSNFault" />
+		<part name="payload" element="tns:invalidSSNFault" />
 	</message>
 
 	<portType name="LoanBroker">
@@ -92,24 +96,8 @@
 		</operation>
 	</portType>
 
-	<!-- 
-		<plnk:partnerLinkType name="test1Request">
-		<plnk:role name="test1Service">
-		<plnk:portType name="test1PT"/>
-		</plnk:role>
-		</plnk:partnerLinkType>
-		
-		<plnk:partnerLinkType name="probeRequest">
-		<plnk:role name="probeService">
-		<plnk:portType name="prb:probeMessagePT"/>
-		</plnk:role>
-		</plnk:partnerLinkType>
-	-->
-
-	<binding name="LoanBroker" type="tns:LoanBroker">
-		<operation name="request"></operation>
-	</binding>
-	<service name="LoanBrokerService">
-		<port name="loanbroker" binding="tns:LoanBroker" />
-	</service>
+	<plnk:partnerLinkType name="LoanBrokerPL">
+		<plnk:role name="LoanBrokerService" portType="tns:LoanBroker" />
+	</plnk:partnerLinkType>
+
 </definitions>

Modified: incubator/servicemix/trunk/samples/loan-broker/loan-broker-sa/pom.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/loan-broker/loan-broker-sa/pom.xml?view=diff&rev=535212&r1=535211&r2=535212
==============================================================================
--- incubator/servicemix/trunk/samples/loan-broker/loan-broker-sa/pom.xml (original)
+++ incubator/servicemix/trunk/samples/loan-broker/loan-broker-sa/pom.xml Fri May  4 05:41:03 2007
@@ -35,7 +35,7 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.servicemix.samples.loan-broker</groupId>
-            <artifactId>loan-broker-bpe-su</artifactId>
+            <artifactId>loan-broker-ode-su</artifactId>
             <version>3.2-incubating-SNAPSHOT</version>
         </dependency>
         <dependency>

Modified: incubator/servicemix/trunk/samples/loan-broker/pom.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/loan-broker/pom.xml?view=diff&rev=535212&r1=535211&r2=535212
==============================================================================
--- incubator/servicemix/trunk/samples/loan-broker/pom.xml (original)
+++ incubator/servicemix/trunk/samples/loan-broker/pom.xml Fri May  4 05:41:03 2007
@@ -84,7 +84,7 @@
     
     <modules>
       <module>loan-broker-lw-su</module>
-      <module>loan-broker-bpe-su</module>
+      <module>loan-broker-ope-su</module>
       <module>loan-broker-jms-su</module>
       <module>loan-broker-sa</module>
     </modules>

Modified: incubator/servicemix/trunk/samples/loan-broker/src/main/java/JMSClient.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/loan-broker/src/main/java/JMSClient.java?view=diff&rev=535212&r1=535211&r2=535212
==============================================================================
--- incubator/servicemix/trunk/samples/loan-broker/src/main/java/JMSClient.java (original)
+++ incubator/servicemix/trunk/samples/loan-broker/src/main/java/JMSClient.java Fri May  4 05:41:03 2007
@@ -19,6 +19,7 @@
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.command.ActiveMQQueue;
 import org.logicblaze.lingo.jms.Requestor;
+import org.logicblaze.lingo.jms.JmsProducerConfig;
 import org.logicblaze.lingo.jms.impl.MultiplexingRequestor;
 import edu.emory.mathcs.backport.java.util.concurrent.ExecutorService;
 import edu.emory.mathcs.backport.java.util.concurrent.Executors;
@@ -31,11 +32,11 @@
  * @version $Revision$
  */
 public class JMSClient implements Runnable {
-    
+
     private static ConnectionFactory factory;
     private static CountDownLatch latch;
     private static Requestor requestor;
-    
+
     /**
      * main ...
      * 
@@ -47,8 +48,8 @@
         factory = new ActiveMQConnectionFactory("tcp://localhost:61616");
         Destination inQueue = new ActiveMQQueue("demo.org.servicemix.source");
         Destination outQueue = new ActiveMQQueue("demo.org.servicemix.output" + (int)(1000*Math.random()));
-        requestor = MultiplexingRequestor.newInstance(factory, inQueue, outQueue); 
-        
+        requestor = MultiplexingRequestor.newInstance(factory, new JmsProducerConfig(), inQueue, outQueue); 
+
         if (args.length == 0) {
             new JMSClient().run();
         } else {
@@ -67,23 +68,29 @@
         System.out.println("Closing.");
         requestor.close();
     }
-   
+
     public void run() {
         try {
             System.out.println("Sending request.");
-            String request = 
-"<getLoanQuoteRequest xmlns='urn:logicblaze:soa:loanbroker'>\n" +
-"  <ssn>102-24532-53254</ssn>\n" +
-"  <amount>" + Math.random() * 100000 + "</amount>\n" +
-"  <duration>" + (int) Math.random() * 48 + "</duration>\n" +
-"</getLoanQuoteRequest>";
+            double r = Math.random();
+
+            String request =
+                "<getLoanQuoteRequest xmlns='urn:logicblaze:soa:loanbroker'>\n" +
+                "  <ssn>102-24532-53254</ssn>\n" +
+                "  <amount>" + r * 100000 + "</amount>\n" +
+                "  <duration>" + (int) r * 48 + "</duration>\n" +
+                "  <score>" + (int) r * 48 + "</score>\n" +
+                "  <length>" + (int) r * 48 + "</length>\n" +
+                "</getLoanQuoteRequest>";
+
             TextMessage out = requestor.getSession().createTextMessage(request);
-            TextMessage in = (TextMessage) requestor.request(null, out);
+
+            TextMessage in = (TextMessage) requestor.request(null, out); 
             if (in == null) {
                 System.out.println("Response timed out.");
             }
             else {
-                System.out.println("Response: " + in.getText());
+                System.out.println("Response was: " + in.getText());
             }
         } catch (Exception e) {
             e.printStackTrace();
@@ -93,4 +100,5 @@
             }
         }
     }
+
 }



Mime
View raw message