servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r535118 - in /incubator/servicemix/branches/servicemix-3.1/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-broke...
Date Fri, 04 May 2007 07:19:12 GMT
Author: gnodet
Date: Fri May  4 00:19:11 2007
New Revision: 535118

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

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

Modified: incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/README.txt
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/README.txt?view=diff&rev=535118&r1=535117&r2=535118
==============================================================================
--- incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/README.txt (original)
+++ incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/README.txt Fri May  4 00:19:11 2007
@@ -27,8 +27,17 @@
   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
+
+You can run a client from the src/main/client folder by running
+  ant run
 
 For more information on this example please see
   http://incubator.apache.org/servicemix/loan-broker-bpel.html

Modified: incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-jms-su/src/main/resources/xbean.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-jms-su/src/main/resources/xbean.xml?view=diff&rev=535118&r1=535117&r2=535118
==============================================================================
--- incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-jms-su/src/main/resources/xbean.xml (original)
+++ incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-jms-su/src/main/resources/xbean.xml Fri May  4 00:19:11 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/branches/servicemix-3.1/samples/loan-broker/loan-broker-lw-su/src/main/java/loanbroker/CreditAgency.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-lw-su/src/main/java/loanbroker/CreditAgency.java?view=diff&rev=535118&r1=535117&r2=535118
==============================================================================
--- incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-lw-su/src/main/java/loanbroker/CreditAgency.java (original)
+++ incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-lw-su/src/main/java/loanbroker/CreditAgency.java Fri May  4 00:19:11 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/branches/servicemix-3.1/samples/loan-broker/loan-broker-ode-su/pom.xml (from r534991, incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-bpe-su/pom.xml)
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-ode-su/pom.xml?view=diff&rev=535118&p1=incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-bpe-su/pom.xml&r1=534991&p2=incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-ode-su/pom.xml&r2=535118
==============================================================================
--- incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-bpe-su/pom.xml (original)
+++ incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-ode-su/pom.xml Fri May  4 00:19:11 2007
@@ -1,51 +1,85 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-<!--
-
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.servicemix.samples</groupId>
-        <artifactId>loan-broker</artifactId>
-        <version>3.1.1-incubating</version>
-    </parent>
-
-    <groupId>org.apache.servicemix.samples.loan-broker</groupId>
-    <artifactId>loan-broker-bpe-su</artifactId>
-    <packaging>jbi-service-unit</packaging>
-    <name>ServiceMix :: Samples :: Loan Broker :: BPE</name>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.servicemix</groupId>
-            <artifactId>servicemix-bpe</artifactId>
-            <version>3.1.1-incubating</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.servicemix.tooling</groupId>
-                <artifactId>jbi-maven-plugin</artifactId>
-                <extensions>true</extensions>
-            </plugin>
-        </plugins>
-    </build>
-</project>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.servicemix.samples</groupId>
+        <artifactId>loan-broker</artifactId>
+        <version>3.1.1-incubating</version>
+    </parent>
+
+    <groupId>org.apache.servicemix.samples.loan-broker</groupId>
+    <artifactId>loan-broker-ode-su</artifactId>
+    <packaging>jbi-service-unit</packaging>
+    <name>ServiceMix :: Samples :: Loan Broker :: Ode</name>
+
+    <dependencies>
+        <dependency>
+            <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>
+</project>

Modified: incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-ode-su/src/main/resources/bank.wsdl
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-ode-su/src/main/resources/bank.wsdl?view=diff&rev=535118&r1=534991&r2=535118
==============================================================================
--- incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-ode-su/src/main/resources/bank.wsdl (original)
+++ incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-ode-su/src/main/resources/bank.wsdl Fri May  4 00:19:11 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/branches/servicemix-3.1/samples/loan-broker/loan-broker-ode-su/src/main/resources/creditagency.wsdl
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-ode-su/src/main/resources/creditagency.wsdl?view=diff&rev=535118&r1=534991&r2=535118
==============================================================================
--- incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-ode-su/src/main/resources/creditagency.wsdl (original)
+++ incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-ode-su/src/main/resources/creditagency.wsdl Fri May  4 00:19:11 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/branches/servicemix-3.1/samples/loan-broker/loan-broker-ode-su/src/main/resources/deploy.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-ode-su/src/main/resources/deploy.xml?view=auto&rev=535118
==============================================================================
--- incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-ode-su/src/main/resources/deploy.xml (added)
+++ incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-ode-su/src/main/resources/deploy.xml Fri May  4 00:19:11 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/branches/servicemix-3.1/samples/loan-broker/loan-broker-ode-su/src/main/resources/deploy.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

Modified: incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-ode-su/src/main/resources/loanbroker.bpel
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-ode-su/src/main/resources/loanbroker.bpel?view=diff&rev=535118&r1=534991&r2=535118
==============================================================================
--- incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-ode-su/src/main/resources/loanbroker.bpel (original)
+++ incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-ode-su/src/main/resources/loanbroker.bpel Fri May  4 00:19:11 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/branches/servicemix-3.1/samples/loan-broker/loan-broker-ode-su/src/main/resources/loanbroker.wsdl
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-ode-su/src/main/resources/loanbroker.wsdl?view=diff&rev=535118&r1=534991&r2=535118
==============================================================================
--- incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-ode-su/src/main/resources/loanbroker.wsdl (original)
+++ incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-ode-su/src/main/resources/loanbroker.wsdl Fri May  4 00:19:11 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/branches/servicemix-3.1/samples/loan-broker/loan-broker-sa/pom.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-sa/pom.xml?view=diff&rev=535118&r1=535117&r2=535118
==============================================================================
--- incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-sa/pom.xml (original)
+++ incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/loan-broker-sa/pom.xml Fri May  4 00:19:11 2007
@@ -34,7 +34,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.1.1-incubating</version>
         </dependency>
         <dependency>
@@ -59,4 +59,4 @@
         </plugins>
     </build>
 
-</project>
\ No newline at end of file
+</project>

Modified: incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/pom.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/pom.xml?view=diff&rev=535118&r1=535117&r2=535118
==============================================================================
--- incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/pom.xml (original)
+++ incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/pom.xml Fri May  4 00:19:11 2007
@@ -48,8 +48,8 @@
     </repositories>
     
     <modules>
+      <module>loan-broker-ode-su</module>
       <module>loan-broker-lw-su</module>
-      <module>loan-broker-bpe-su</module>
       <module>loan-broker-jms-su</module>
       <module>loan-broker-sa</module>
     </modules>
@@ -78,4 +78,4 @@
             </plugin>
         </plugins>
     </build>
-</project>
\ No newline at end of file
+</project>

Added: incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/src/main/client/JMSClient.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/src/main/client/JMSClient.java?view=auto&rev=535118
==============================================================================
--- incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/src/main/client/JMSClient.java (added)
+++ incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/src/main/client/JMSClient.java Fri May  4 00:19:11 2007
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import edu.emory.mathcs.backport.java.util.concurrent.CountDownLatch;
+
+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;
+import javax.jms.ConnectionFactory;
+import javax.jms.Destination;
+import javax.jms.Message;
+import javax.jms.TextMessage;
+
+/**
+ * @version $Revision$
+ */
+public class JMSClient implements Runnable {
+
+    private static ConnectionFactory factory;
+    private static CountDownLatch latch;
+    private static Requestor requestor;
+
+    /**
+     * main ...
+     * 
+     * @param args
+     * @throws Exception
+     */
+    public static void main(String[] args) throws Exception {
+        System.out.println("Connecting to JMS server.");
+        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, new JmsProducerConfig(), inQueue, outQueue); 
+
+        if (args.length == 0) {
+            new JMSClient().run();
+        } else {
+            int nb = Integer.parseInt(args[0]);
+            int th = 30;
+            if (args.length > 1) {
+                th = Integer.parseInt(args[1]);
+            }
+            latch = new CountDownLatch(nb);
+            ExecutorService threadPool = Executors.newFixedThreadPool(th);
+            for (int i = 0; i < nb; i++) {
+                threadPool.submit(new JMSClient());
+            }
+            latch.await();
+        }
+        System.out.println("Closing.");
+        requestor.close();
+    }
+
+    public void run() {
+        try {
+            System.out.println("Sending request.");
+            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); 
+            if (in == null) {
+                System.out.println("Response timed out.");
+            }
+            else {
+                System.out.println("Response was: " + in.getText());
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            if (latch != null) {
+                latch.countDown();
+            }
+        }
+    }
+
+}

Propchange: incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/src/main/client/JMSClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/src/main/client/JMSClient.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/src/main/client/JMSClient.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/src/main/client/build.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/src/main/client/build.xml?view=auto&rev=535118
==============================================================================
--- incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/src/main/client/build.xml (added)
+++ incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/src/main/client/build.xml Fri May  4 00:19:11 2007
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<project name="loan-broker-client" default="run" basedir=".">
+
+  <property name="class.dir" value="classes"/>
+
+  <target name="clean">
+    <delete dir="target" quiet="true"/>
+    <delete dir="${class.dir}" quiet="true"/>
+  </target>
+
+  <target name="init">
+    <mkdir dir="${class.dir}"/>
+    <mkdir dir="lib"/>
+
+    <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="${class.dir}"/>
+      <pathelement path="../../../../../conf"/>
+      <fileset dir="../../../../../lib">
+        <include name="**/*.jar"/>
+      </fileset>
+      <fileset dir="lib">
+        <include name="**/*.jar"/>
+      </fileset>
+    </path>
+  </target>
+  
+  <target name="compile" depends="init" description="Compile all Java">
+    <javac srcdir="." destdir="${class.dir}">
+      <classpath refid="javac.classpath"/>
+    </javac>
+  </target>
+
+  <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="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>

Propchange: incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/src/main/client/build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/src/main/client/build.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/servicemix/branches/servicemix-3.1/samples/loan-broker/src/main/client/build.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message