You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ge...@apache.org on 2008/07/16 15:36:06 UTC

svn commit: r677285 [2/3] - in /servicemix/smx4/features/trunk: ./ assembly/ assembly/src/main/descriptors/ assembly/src/main/distribution/text/examples/camel/ assembly/src/main/distribution/text/examples/cxf-wsdl-first/ assembly/src/main/distribution/...

Added: servicemix/smx4/features/trunk/examples/loan-broker-bpel/README.txt
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/loan-broker-bpel/README.txt?rev=677285&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/loan-broker-bpel/README.txt (added)
+++ servicemix/smx4/features/trunk/examples/loan-broker-bpel/README.txt Wed Jul 16 06:35:59 2008
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+
+Welcome to the Servicemix Loan Broker example
+=============================================
+
+This example is based on the great EIP book 
+(http://www.enterpriseintegrationpatterns.com/ComposedMessagingExample.html).
+It leverages the BPEL service engine, JMS binding component and some 
+lightweight components provided by ServiceMix.
+
+First start a ServiceMix server (if not already started) by running
+  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
+
+You can deploy the example on ServiceMix 4 in two different ways:
+- using hotdeploy: 
+   copy the loan-broker-sa/target/loan-broker-sa-${version}.jar to <servicemix_home>/deploy
+- using the ServiceMix console:
+   osgi install -s mvn:org.apache.servicemix.examples.loan-broker/loan-broker-sa/${version}/zip
+
+To test this sample, launch the following commands:
+  ant run
+
+For more information on this example please see
+  http://servicemix.apache.org/loan-broker-bpel.html

Added: servicemix/smx4/features/trunk/examples/loan-broker-bpel/build.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/loan-broker-bpel/build.xml?rev=677285&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/loan-broker-bpel/build.xml (added)
+++ servicemix/smx4/features/trunk/examples/loan-broker-bpel/build.xml Wed Jul 16 06:35:59 2008
@@ -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="target/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://repo1.maven.org/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="src/main/java" 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>

Added: servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-bean-su/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-bean-su/pom.xml?rev=677285&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-bean-su/pom.xml (added)
+++ servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-bean-su/pom.xml Wed Jul 16 06:35:59 2008
@@ -0,0 +1,53 @@
+<?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.examples</groupId>
+        <artifactId>loan-broker</artifactId>
+        <version>${servicemix.version}</version>
+    </parent>
+
+    <groupId>org.apache.servicemix.examples.loan-broker</groupId>
+    <artifactId>loan-broker-bean-su</artifactId>
+    <packaging>jbi-service-unit</packaging>
+    <name>ServiceMix :: Samples :: Loan Broker :: Bean</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+            <artifactId>servicemix-bean</artifactId>
+            <version>${components.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.servicemix.tooling</groupId>
+                <artifactId>jbi-maven-plugin</artifactId>
+                <version>${servicemix-jbi-plugin-version}</version>
+                <extensions>true</extensions>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Added: servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-bean-su/src/main/java/loanbroker/Bank.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-bean-su/src/main/java/loanbroker/Bank.java?rev=677285&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-bean-su/src/main/java/loanbroker/Bank.java (added)
+++ servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-bean-su/src/main/java/loanbroker/Bank.java Wed Jul 16 06:35:59 2008
@@ -0,0 +1,54 @@
+/*
+ * 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.
+ */
+package loanbroker;
+
+import javax.annotation.Resource;
+import javax.jbi.messaging.DeliveryChannel;
+import javax.jbi.messaging.ExchangeStatus;
+import javax.jbi.messaging.InOut;
+import javax.jbi.messaging.MessageExchange;
+import javax.jbi.messaging.MessagingException;
+import javax.jbi.messaging.NormalizedMessage;
+
+import org.apache.servicemix.MessageExchangeListener;
+import org.apache.servicemix.jbi.jaxp.StringSource;
+
+public class Bank implements MessageExchangeListener {
+    
+    @Resource
+    DeliveryChannel channel;
+    
+    public void onMessageExchange(MessageExchange exchange) throws MessagingException {
+        InOut inOut = (InOut) exchange;
+        if (inOut.getStatus() == ExchangeStatus.DONE) {
+            return;
+        } else if (inOut.getStatus() == ExchangeStatus.ERROR) {
+            return;
+        }
+        System.err.println(inOut.getService().getLocalPart() + " requested");
+        try {
+            String output = "<getLoanQuoteResponse xmlns=\"urn:logicblaze:soa:bank\"><rate>" + (Math.ceil(1000 * Math.random()) / 100) + "</rate></getLoanQuoteResponse>";
+            NormalizedMessage answer = inOut.createMessage();
+            answer.setContent(new StringSource(output));
+            inOut.setOutMessage(answer);
+            channel.send(inOut);
+        } catch (Exception e) {
+            inOut.setError(e);
+            channel.send(inOut);
+        }
+    }
+}

Added: servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-bean-su/src/main/resources/xbean.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-bean-su/src/main/resources/xbean.xml?rev=677285&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-bean-su/src/main/resources/xbean.xml (added)
+++ servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-bean-su/src/main/resources/xbean.xml Wed Jul 16 06:35:59 2008
@@ -0,0 +1,53 @@
+<?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.
+
+-->
+<beans xmlns:bean="http://servicemix.apache.org/bean/1.0" 
+	   xmlns:bk="urn:logicblaze:soa:bank">
+
+  <bean:endpoint service="bk:Bank1" endpoint="bank">
+      <bean:bean>
+          <bean class="loanbroker.Bank" />
+      </bean:bean>
+  </bean:endpoint>
+
+  <bean:endpoint service="bk:Bank2" endpoint="bank">
+      <bean:bean>
+          <bean class="loanbroker.Bank" />
+      </bean:bean>
+  </bean:endpoint>
+
+  <bean:endpoint service="bk:Bank3" endpoint="bank">
+      <bean:bean>
+          <bean class="loanbroker.Bank" />
+      </bean:bean>
+  </bean:endpoint>
+
+  <bean:endpoint service="bk:Bank4" endpoint="bank">
+      <bean:bean>
+          <bean class="loanbroker.Bank" />
+      </bean:bean>
+  </bean:endpoint>
+
+  <bean:endpoint service="bk:Bank5" endpoint="bank">
+      <bean:bean>
+          <bean class="loanbroker.Bank" />
+      </bean:bean>
+  </bean:endpoint>
+
+</beans>

Added: servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-drools-su/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-drools-su/pom.xml?rev=677285&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-drools-su/pom.xml (added)
+++ servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-drools-su/pom.xml Wed Jul 16 06:35:59 2008
@@ -0,0 +1,77 @@
+<?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.examples</groupId>
+        <artifactId>loan-broker</artifactId>
+        <version>${servicemix.version}</version>
+    </parent>
+
+    <groupId>org.apache.servicemix.examples.loan-broker</groupId>
+    <artifactId>loan-broker-drools-su</artifactId>
+    <packaging>jbi-service-unit</packaging>
+    <name>ServiceMix :: Samples :: Loan Broker :: Drools</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+            <artifactId>servicemix-drools</artifactId>
+            <version>${components.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.drools</groupId>
+            <artifactId>drools-compiler</artifactId>
+            <version>4.0.7</version>
+            <scope>test</scope>
+            <exclusions>
+              <exclusion>
+                <groupId>jung</groupId>
+                <artifactId>jung</artifactId>
+              </exclusion>
+              <exclusion>
+                <groupId>xstream</groupId>
+                <artifactId>xstream</artifactId>
+              </exclusion>
+              <exclusion>
+                <groupId>xpp3</groupId>
+                <artifactId>xpp3</artifactId>
+              </exclusion>
+              <exclusion>
+                <groupId>org.apache.commons</groupId>
+                <artifactId>commons-jci-janino</artifactId>
+              </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.servicemix.tooling</groupId>
+                <artifactId>jbi-maven-plugin</artifactId>
+                <version>${servicemix-jbi-plugin-version}</version>
+                <extensions>true</extensions>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Added: servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-drools-su/src/main/resources/credit-agency.drl
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-drools-su/src/main/resources/credit-agency.drl?rev=677285&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-drools-su/src/main/resources/credit-agency.drl (added)
+++ servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-drools-su/src/main/resources/credit-agency.drl Wed Jul 16 06:35:59 2008
@@ -0,0 +1,59 @@
+/*
+ * 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.
+ */
+package org.apache.servicemix.drools
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.servicemix.drools.model.Exchange;
+
+global org.apache.servicemix.drools.model.JbiHelper jbi;
+
+rule UnkownOperation
+	when
+		me : Exchange( status == Exchange.ACTIVE, $in : in != null,
+					   operation != "{urn:logicblaze:soa:creditagency}getCreditHistoryLength", 
+		               operation != "{urn:logicblaze:soa:creditagency}getCreditScore" )
+	then
+		jbi.fault("<UnknownOperation xmlns='urn:logicblaze:soa:creditagency'/>");
+end
+
+/*
+rule BadSSN
+	when
+		me : Exchange( status == Exchange.ACTIVE, $in : in != null )
+		eval( $in.xpath("/*:ssn/text() <= 0") )
+	then
+		jbi.fault("<InvalidSSN xmlns='urn:logicblaze:soa:creditagency'><ssn>" + x + </ssn></InvalidSSN>");
+end
+*/
+
+rule CreditHistory
+	when
+		me : Exchange( status == Exchange.ACTIVE, $in : in != null,
+					   operation == "{urn:logicblaze:soa:creditagency}getCreditHistoryLength" )
+	then
+		jbi.answer("<getCreditHistoryLengthResponse xmlns='urn:logicblaze:soa:creditagency'><length>" + 100 + "</length></getCreditHistoryLengthResponse>");
+end
+
+rule CreditScore
+	when
+		me : Exchange( status == Exchange.ACTIVE, $in : in != null,
+		               operation == "{urn:logicblaze:soa:creditagency}getCreditScore" )
+	then
+		jbi.answer("<getCreditScoreResponse xmlns='urn:logicblaze:soa:creditagency'><score>" + 1000 + "</score></getCreditScoreResponse>");
+end
+

Added: servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-drools-su/src/main/resources/xbean.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-drools-su/src/main/resources/xbean.xml?rev=677285&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-drools-su/src/main/resources/xbean.xml (added)
+++ servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-drools-su/src/main/resources/xbean.xml Wed Jul 16 06:35:59 2008
@@ -0,0 +1,35 @@
+<?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.
+
+-->
+<beans xmlns:drools="http://servicemix.apache.org/drools/1.0"
+       xmlns:ca="urn:logicblaze:soa:creditagency">
+
+  <drools:endpoint service="ca:CreditAgencyService"
+                   endpoint="agency"
+                   ruleBaseResource="classpath:credit-agency.drl"
+                   namespaceContext="#nsContext" />
+
+
+  <drools:namespace-context id="nsContext">
+    <drools:namespaces>
+      <drools:namespace prefix="ca">urn:logicblaze:soa:creditagency</drools:namespace>
+    </drools:namespaces>
+  </drools:namespace-context>
+
+</beans>

Added: servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-drools-su/src/test/java/loanbroker/CreditAgencyTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-drools-su/src/test/java/loanbroker/CreditAgencyTest.java?rev=677285&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-drools-su/src/test/java/loanbroker/CreditAgencyTest.java (added)
+++ servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-drools-su/src/test/java/loanbroker/CreditAgencyTest.java Wed Jul 16 06:35:59 2008
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+package loanbroker;
+
+import javax.jbi.messaging.ExchangeStatus;
+import javax.jbi.messaging.InOnly;
+import javax.jbi.messaging.InOut;
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Element;
+
+import org.apache.servicemix.client.DefaultServiceMixClient;
+import org.apache.servicemix.client.ServiceMixClient;
+import org.apache.servicemix.drools.DroolsComponent;
+import org.apache.servicemix.drools.DroolsEndpoint;
+import org.apache.servicemix.jbi.container.JBIContainer;
+import org.apache.servicemix.jbi.jaxp.SourceTransformer;
+import org.apache.servicemix.jbi.jaxp.StringSource;
+import org.apache.servicemix.tck.ReceiverComponent;
+import org.springframework.core.io.ClassPathResource;
+
+import junit.framework.TestCase;
+
+public class CreditAgencyTest extends TestCase {
+
+    private JBIContainer jbi;
+    private DroolsComponent drools;
+    private ServiceMixClient client;
+    
+    protected void setUp() throws Exception {
+        super.setUp();
+        jbi = new JBIContainer();
+        jbi.setEmbedded(true);
+        jbi.init();
+        client = new DefaultServiceMixClient(jbi);
+    }
+    
+    protected void tearDown() throws Exception {
+        jbi.shutDown();
+    }
+    
+    public void testCreditHistory() throws Exception {
+        drools = new DroolsComponent();
+        DroolsEndpoint endpoint = new DroolsEndpoint(drools.getServiceUnit(),
+                                                     new QName("drools"), "endpoint");
+        endpoint.setRuleBaseResource(new ClassPathResource("credit-agency.drl"));
+        drools.setEndpoints(new DroolsEndpoint[] {endpoint });
+        jbi.activateComponent(drools, "servicemix-drools");
+        
+        jbi.start();
+        
+        InOut me = client.createInOutExchange();
+        me.setService(new QName("drools"));
+        me.setOperation(new QName("urn:logicblaze:soa:creditagency", "getCreditHistoryLength"));
+        me.getInMessage().setContent(new StringSource("<getCreditHistoryLengthRequest xmlns='urn:logicblaze:soa:creditagency'><ssn>123456</ssn></getCreditHistoryLengthRequest>"));
+        client.sendSync(me);
+        Element e = new SourceTransformer().toDOMElement(me.getOutMessage());
+        assertEquals("getCreditHistoryLengthResponse", e.getLocalName());
+        client.done(me);
+        
+        Thread.sleep(50);
+    }
+
+}

Added: servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-drools-su/src/test/resources/log4j-tests.properties
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-drools-su/src/test/resources/log4j-tests.properties?rev=677285&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-drools-su/src/test/resources/log4j-tests.properties (added)
+++ servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-drools-su/src/test/resources/log4j-tests.properties Wed Jul 16 06:35:59 2008
@@ -0,0 +1,41 @@
+# 
+# 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.
+#
+#
+
+#
+# The logging properties used during tests..
+#
+log4j.rootLogger=DEBUG, out
+
+log4j.logger.org.apache.activemq=INFO
+log4j.logger.org.apache.activemq.spring=WARN
+log4j.logger.org.apache.activemq.store.journal=INFO
+log4j.logger.org.activeio.journal=INFO
+
+# CONSOLE appender not used by default
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+
+# File appender
+log4j.appender.out=org.apache.log4j.FileAppender
+log4j.appender.out.layout=org.apache.log4j.PatternLayout
+log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+log4j.appender.out.file=target/servicemix-test.log
+log4j.appender.out.append=true

Added: servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-jms-su/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-jms-su/pom.xml?rev=677285&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-jms-su/pom.xml (added)
+++ servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-jms-su/pom.xml Wed Jul 16 06:35:59 2008
@@ -0,0 +1,53 @@
+<?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.examples</groupId>
+        <artifactId>loan-broker</artifactId>
+        <version>${servicemix.version}</version>
+    </parent>
+
+    <groupId>org.apache.servicemix.examples.loan-broker</groupId>
+    <artifactId>loan-broker-jms-su</artifactId>
+    <packaging>jbi-service-unit</packaging>
+    <name>ServiceMix :: Samples :: Loan Broker :: JMS</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+            <artifactId>servicemix-jms</artifactId>
+            <version>${components.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.servicemix.tooling</groupId>
+                <artifactId>jbi-maven-plugin</artifactId>
+                <version>${servicemix-jbi-plugin-version}</version>
+                <extensions>true</extensions>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Added: servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-jms-su/src/main/resources/xbean.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-jms-su/src/main/resources/xbean.xml?rev=677285&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-jms-su/src/main/resources/xbean.xml (added)
+++ servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-jms-su/src/main/resources/xbean.xml Wed Jul 16 06:35:59 2008
@@ -0,0 +1,41 @@
+<?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.
+
+-->
+<beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
+       xmlns:lb="urn:logicblaze:soa:loanbroker">
+
+  <jms:endpoint service="lb:LoanBrokerService"
+                endpoint="broker"
+                targetService="lb:LoanBrokerService"
+                defaultOperation="lb:getLoanQuote" 
+                role="consumer"
+                connectionFactory="#jmsFactory"
+                destinationStyle="queue"
+                jmsProviderDestinationName="demo.org.servicemix.source"
+                defaultMep="http://www.w3.org/2004/08/wsdl/in-out" />
+
+  <bean id="jmsFactory" class="org.apache.activemq.pool.PooledConnectionFactory">
+    <property name="connectionFactory">
+      <bean class="org.apache.activemq.ActiveMQConnectionFactory">
+        <property name="brokerURL" value="tcp://localhost:61616" />
+      </bean>
+    </property>
+  </bean>
+
+</beans>

Added: servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/pom.xml?rev=677285&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/pom.xml (added)
+++ servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/pom.xml Wed Jul 16 06:35:59 2008
@@ -0,0 +1,90 @@
+<?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.examples</groupId>
+        <artifactId>loan-broker</artifactId>
+        <version>${servicemix.version}</version>
+    </parent>
+
+    <groupId>org.apache.servicemix.examples.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>
+                <version>${servicemix-jbi-plugin-version}</version>
+                <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>

Added: servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/src/main/resources/bank.wsdl
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/src/main/resources/bank.wsdl?rev=677285&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/src/main/resources/bank.wsdl (added)
+++ servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/src/main/resources/bank.wsdl Wed Jul 16 06:35:59 2008
@@ -0,0 +1,73 @@
+<?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.
+
+-->
+<!-- $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="http://schemas.xmlsoap.org/wsdl/"
+	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"
+			xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+			<xsd:complexType name="getLoanQuoteRequest">
+				<xsd:sequence>
+					<xsd:element name="ssn" type="xsd:string" />
+					<xsd:element name="amount" type="xsd:double" />
+					<xsd:element name="duration" type="xsd:int" />
+					<xsd:element name="score" type="xsd:int" />
+					<xsd:element name="length" type="xsd:int" />
+				</xsd:sequence>
+			</xsd:complexType>
+
+			<xsd:complexType name="getLoanQuoteResponse">
+				<xsd:sequence>
+					<xsd:element name="rate" type="xsd:double" />
+				</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" element="tns:getLoanQuoteRequest" />
+	</message>
+
+	<message name="getLoanQuoteResponse">
+		<part name="payload" element="tns:getLoanQuoteResponse" />
+	</message>
+
+	<portType name="Bank">
+		<operation name="getLoanQuote">
+			<input message="tns:getLoanQuoteRequest" />
+			<output message="tns:getLoanQuoteResponse" />
+		</operation>
+	</portType>
+
+	<plnk:partnerLinkType name="BankPL">
+		<plnk:role name="BankService" portType="tns:Bank" />
+	</plnk:partnerLinkType>
+
+</definitions>

Added: servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/src/main/resources/creditagency.wsdl
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/src/main/resources/creditagency.wsdl?rev=677285&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/src/main/resources/creditagency.wsdl (added)
+++ servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/src/main/resources/creditagency.wsdl Wed Jul 16 06:35:59 2008
@@ -0,0 +1,121 @@
+<?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.
+
+-->
+<!-- $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="http://schemas.xmlsoap.org/wsdl/"
+	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"
+			xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+			<xsd:complexType name="getCreditScoreRequest">
+				<xsd:sequence>
+					<xsd:element name="ssn" type="xsd:string" />
+				</xsd:sequence>
+			</xsd:complexType>
+
+			<xsd:complexType name="getCreditScoreResponse">
+				<xsd:sequence>
+					<xsd:element name="score" type="xsd:int" />
+				</xsd:sequence>
+			</xsd:complexType>
+
+			<xsd:complexType name="getCreditHistoryLengthRequest">
+				<xsd:sequence>
+					<xsd:element name="ssn" type="xsd:string" />
+				</xsd:sequence>
+			</xsd:complexType>
+
+			<xsd:complexType name="getCreditHistoryLengthResponse">
+				<xsd:sequence>
+					<xsd:element name="length" type="xsd:int" />
+				</xsd:sequence>
+			</xsd:complexType>
+
+			<xsd:complexType name="unknownSSNFault">
+				<xsd:sequence>
+					<xsd:element name="ssn" type="xsd:string" />
+				</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" element="tns:getCreditScoreRequest" />
+	</message>
+
+	<message name="getCreditScoreResponse">
+		<part name="payload" element="tns:getCreditScoreResponse" />
+	</message>
+
+	<message name="getCreditHistoryLengthRequest">
+		<part name="payload" element="tns:getCreditHistoryLengthRequest" />
+	</message>
+
+	<message name="getCreditHistoryLengthResponse">
+		<part name="payload" element="tns:getCreditHistoryLengthResponse" />
+	</message>
+
+	<message name="unknownSSNFault">
+		<part name="payload" element="tns:unknownSSNFault" />
+	</message>
+
+	<message name="invalidSSNFault">
+		<part name="payload" element="tns:invalidSSNFault" />
+	</message>
+
+	<portType name="CreditAgency">
+		<operation name="getCreditScore">
+			<input message="tns:getCreditScoreRequest" />
+			<output message="tns:getCreditScoreResponse" />
+			<fault name="UnknownSSN" message="tns:unknownSSNFault" />
+			<fault name="InvalidSSN" message="tns:invalidSSNFault" />
+		</operation>
+		<operation name="getCreditHistoryLength">
+			<input message="tns:getCreditHistoryLengthRequest" />
+			<output message="tns:getCreditHistoryLengthResponse" />
+			<fault name="UnknownSSN" message="tns:unknownSSNFault">
+			</fault>
+		</operation>
+	</portType>
+
+	<plnk:partnerLinkType name="CreditAgencyPL">
+		<plnk:role name="CreditAgencyService" portType="tns:CreditAgency" />
+	</plnk:partnerLinkType>
+
+</definitions>

Added: servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/src/main/resources/deploy.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/src/main/resources/deploy.xml?rev=677285&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/src/main/resources/deploy.xml (added)
+++ servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/src/main/resources/deploy.xml Wed Jul 16 06:35:59 2008
@@ -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>

Added: servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/src/main/resources/loanbroker.bpel
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/src/main/resources/loanbroker.bpel?rev=677285&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/src/main/resources/loanbroker.bpel (added)
+++ servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/src/main/resources/loanbroker.bpel Wed Jul 16 06:35:59 2008
@@ -0,0 +1,305 @@
+<?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.
+
+-->
+<!-- $Rev: 356052 $ $Date: 2005-12-11 14:41:20 -0800 (dim., 11 déc. 2005) $ -->
+<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"
+	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" />
+		<bpel:variable name="response" messageType="tns:getLoanQuoteResponse" />
+		<bpel:variable name="ca-score-request" messageType="ca:getCreditScoreRequest" />
+		<bpel:variable name="ca-score-response" messageType="ca:getCreditScoreResponse" />
+		<bpel:variable name="ca-history-request" messageType="ca:getCreditHistoryLengthRequest" />
+		<bpel:variable name="ca-history-response" messageType="ca:getCreditHistoryLengthResponse" />
+		<bpel:variable name="bk-loanquote-request" messageType="bk:getLoanQuoteRequest" />
+		<bpel:variable name="bk-loanquote-response-1" messageType="bk:getLoanQuoteResponse" />
+		<bpel:variable name="bk-loanquote-response-2" messageType="bk:getLoanQuoteResponse" />
+		<bpel:variable name="bk-loanquote-response-3" messageType="bk:getLoanQuoteResponse" />
+		<bpel:variable name="bk-loanquote-response-4" messageType="bk:getLoanQuoteResponse" />
+		<bpel:variable name="bk-loanquote-response-5" messageType="bk:getLoanQuoteResponse" />
+		<bpel:variable name="invalidSSN" messageType="tns:invalidSSNFault" />
+		<bpel:variable name="unknownSSN" messageType="tns:unknownSSNFault" />
+	</bpel:variables>
+	
+	<bpel:faultHandlers>
+		<bpel:catch faultName="ca:InvalidSSN">
+			<bpel:sequence>
+				<bpel:assign>
+					<bpel:copy>
+						<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="LoanBroker"
+					portType="tns:LoanBroker" operation="getLoanQuote"
+					variable="invalidSSN" faultName="tns:InvalidSSN" >
+				</bpel:reply>
+			</bpel:sequence>
+		</bpel:catch>
+		<bpel:catch faultName="ca:UnkownSSN">
+			<bpel:sequence>
+				<bpel:assign>
+					<bpel:copy>
+						<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="LoanBroker"
+					portType="tns:LoanBroker" operation="getLoanQuote"
+					variable="unknownSSN" faultName="tns:UnknownSSN" >
+				</bpel:reply>
+			</bpel:sequence>
+		</bpel:catch>
+	</bpel:faultHandlers>
+
+	<bpel:sequence>
+		<bpel:receive name="request" partnerLink="LoanBroker"
+			portType="tns:LoanBroker" operation="getLoanQuote" variable="request"
+			createInstance="yes">
+		</bpel:receive>
+
+			
+		<bpel:flow>
+		
+			<bpel:sequence>
+				<bpel:assign>
+					<bpel:copy>
+						<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>
+		
+				<bpel:invoke name="service" partnerLink="CreditAgency"
+					portType="ca:CreditAgency" operation="getCreditHistoryLength"
+					inputVariable="ca-history-request"
+					outputVariable="ca-history-response" />
+			</bpel:sequence>
+			
+			<bpel:sequence>
+				<bpel:assign>
+					<bpel:copy>
+						<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>
+		
+				<bpel:invoke name="service" partnerLink="CreditAgency"
+					portType="ca:CreditAgency" operation="getCreditScore"
+					inputVariable="ca-score-request"
+					outputVariable="ca-score-response" />
+			</bpel:sequence>
+		</bpel:flow>
+
+		<bpel:assign>
+			<bpel:copy>
+				<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>$request.payload/tns:ssn</bpel:from>
+				<bpel:to>$bk-loanquote-request.payload/bk:ssn</bpel:to>
+			</bpel:copy>
+			<bpel:copy>
+				<bpel:from>$request.payload/tns:amount</bpel:from>
+				<bpel:to>$bk-loanquote-request.payload/bk:amount</bpel:to>
+			</bpel:copy>
+			<bpel:copy>
+				<bpel:from>$request.payload/tns:duration</bpel:from>
+				<bpel:to>$bk-loanquote-request.payload/bk:duration</bpel:to>
+			</bpel:copy>
+			<bpel:copy>
+				<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: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: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="bank3" partnerLink="Bank3"
+								portType="bk:Bank" operation="getLoanQuote" 
+								inputVariable="bk-loanquote-request"
+								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" />
+					</bpel:flow>
+					<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>$bk-loanquote-response-3.payload/bk:rate</bpel:from>
+									<bpel:to>$response.payload/tns:rate</bpel:to>
+								</bpel:copy>
+							</bpel:assign>
+						</bpel:else>
+					</bpel:if>
+				</bpel:sequence>
+			</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" />
+					<bpel:assign>
+						<bpel:copy>
+							<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:else>
+	
+		</bpel:if>
+		
+		<bpel:reply name="response" partnerLink="LoanBroker"
+			portType="tns:LoanBroker" operation="getLoanQuote"
+			variable="response" />
+
+	</bpel:sequence>
+
+</bpel:process>

Added: servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/src/main/resources/loanbroker.wsdl
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/src/main/resources/loanbroker.wsdl?rev=677285&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/src/main/resources/loanbroker.wsdl (added)
+++ servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-ode-su/src/main/resources/loanbroker.wsdl Wed Jul 16 06:35:59 2008
@@ -0,0 +1,103 @@
+<?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.
+
+-->
+<!-- $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="http://schemas.xmlsoap.org/wsdl/"
+	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/">
+
+	<import namespace="urn:logicblaze:soa:creditagency"
+		location="creditagency.wsdl" />
+
+	<import namespace="urn:logicblaze:soa:bank"
+		location="bank.wsdl" />
+
+	<!-- type defs -->
+	<types>
+		<xsd:schema
+			targetNamespace="urn:logicblaze:soa:loanbroker"
+			xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+			<xsd:complexType name="getLoanQuoteRequest">
+				<xsd:sequence>
+					<xsd:element name="ssn" type="xsd:string" />
+					<xsd:element name="amount" type="xsd:double" />
+					<xsd:element name="duration" type="xsd:int" />
+				</xsd:sequence>
+			</xsd:complexType>
+
+			<xsd:complexType name="getLoanQuoteResponse">
+				<xsd:sequence>
+					<xsd:element name="rate" type="xsd:double" />
+				</xsd:sequence>
+			</xsd:complexType>
+
+			<xsd:complexType name="unknownSSNFault">
+				<xsd:sequence>
+					<xsd:element name="ssn" type="xsd:string" />
+				</xsd:sequence>
+			</xsd:complexType>
+
+			<xsd:complexType name="invalidSSNFault">
+				<xsd:sequence>
+					<xsd:element name="ssn" type="xsd:string" />
+				</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" element="tns:getLoanQuoteRequest" />
+	</message>
+
+	<message name="getLoanQuoteResponse">
+		<part name="payload" element="tns:getLoanQuoteResponse" />
+	</message>
+
+	<message name="unknownSSNFault">
+		<part name="payload" element="tns:unknownSSNFault" />
+	</message>
+
+	<message name="invalidSSNFault">
+		<part name="payload" element="tns:invalidSSNFault" />
+	</message>
+
+	<portType name="LoanBroker">
+		<operation name="getLoanQuote">
+			<input message="tns:getLoanQuoteRequest" />
+			<output message="tns:getLoanQuoteResponse" />
+			<fault name="UnknownSSN" message="tns:unknownSSNFault" />
+			<fault name="InvalidSSN" message="tns:invalidSSNFault" />
+		</operation>
+	</portType>
+
+	<plnk:partnerLinkType name="LoanBrokerPL">
+		<plnk:role name="LoanBrokerService" portType="tns:LoanBroker" />
+	</plnk:partnerLinkType>
+
+</definitions>

Added: servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-sa/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-sa/pom.xml?rev=677285&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-sa/pom.xml (added)
+++ servicemix/smx4/features/trunk/examples/loan-broker-bpel/loan-broker-sa/pom.xml Wed Jul 16 06:35:59 2008
@@ -0,0 +1,69 @@
+<?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.examples</groupId>
+        <artifactId>loan-broker</artifactId>
+        <version>${servicemix.version}</version>
+    </parent>
+
+    <groupId>org.apache.servicemix.examples.loan-broker</groupId>
+    <artifactId>loan-broker-sa</artifactId>
+    <packaging>jbi-service-assembly</packaging>
+    <name>ServiceMix :: Samples :: Loan Broker :: SA</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.servicemix.examples.loan-broker</groupId>
+            <artifactId>loan-broker-ode-su</artifactId>
+            <version>${servicemix.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.examples.loan-broker</groupId>
+            <artifactId>loan-broker-bean-su</artifactId>
+            <version>${servicemix.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.examples.loan-broker</groupId>
+            <artifactId>loan-broker-drools-su</artifactId>
+            <version>${servicemix.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.examples.loan-broker</groupId>
+            <artifactId>loan-broker-jms-su</artifactId>
+            <version>${servicemix.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.servicemix.tooling</groupId>
+                <artifactId>jbi-maven-plugin</artifactId>
+                <version>${servicemix-jbi-plugin-version}</version>
+                <extensions>true</extensions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

Added: servicemix/smx4/features/trunk/examples/loan-broker-bpel/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/loan-broker-bpel/pom.xml?rev=677285&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/loan-broker-bpel/pom.xml (added)
+++ servicemix/smx4/features/trunk/examples/loan-broker-bpel/pom.xml Wed Jul 16 06:35:59 2008
@@ -0,0 +1,117 @@
+<?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.examples</groupId>
+        <artifactId>examples</artifactId>
+        <version>${servicemix.version}</version>
+    </parent>
+
+    <groupId>org.apache.servicemix.examples</groupId>
+    <artifactId>loan-broker</artifactId>
+    <name>ServiceMix :: Samples :: Loan Broker</name>
+    <packaging>pom</packaging>
+    
+    <!-- Add ServiceMix repositories for snaphots and releases -->
+    <pluginRepositories>
+      <pluginRepository>
+        <id>apache.snapshots</id>
+        <name>Apache Snapshots Repository</name>
+        <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+        <snapshots>
+          <enabled>true</enabled>
+        </snapshots>
+        <releases>
+           <enabled>false</enabled>
+        </releases>
+      </pluginRepository>
+      <pluginRepository>
+        <id>apache.incubating</id>
+        <name>Apache Incubating Repository</name>
+        <url>http://people.apache.org/repo/m2-incubating-repository</url>
+        <snapshots>
+          <enabled>false</enabled>
+        </snapshots>
+        <releases>
+           <enabled>true</enabled>
+        </releases>
+      </pluginRepository>
+    </pluginRepositories>
+    <repositories>
+      <repository>
+        <id>apache.snapshots</id>
+        <name>Apache Snapshots Repository</name>
+        <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+        <snapshots>
+          <enabled>true</enabled>
+        </snapshots>
+        <releases>
+           <enabled>false</enabled>
+        </releases>
+      </repository>
+      <repository>
+        <id>apache.incubating</id>
+        <name>Apache Incubating Repository</name>
+        <url>http://people.apache.org/repo/m2-incubating-repository</url>
+        <snapshots>
+          <enabled>false</enabled>
+        </snapshots>
+        <releases>
+           <enabled>true</enabled>
+        </releases>
+      </repository>
+    </repositories>
+    
+    <modules>
+      <module>loan-broker-bean-su</module>
+      <module>loan-broker-drools-su</module>
+      <module>loan-broker-ode-su</module>
+      <module>loan-broker-jms-su</module>
+      <module>loan-broker-sa</module>
+    </modules>
+    
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>${maven.assembly.version}</version>
+                <inherited>false</inherited>
+                <executions>
+                    <execution>
+                        <id>src</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>src/main/assembly/src.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Added: servicemix/smx4/features/trunk/examples/loan-broker-bpel/src/main/assembly/src.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/loan-broker-bpel/src/main/assembly/src.xml?rev=677285&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/loan-broker-bpel/src/main/assembly/src.xml (added)
+++ servicemix/smx4/features/trunk/examples/loan-broker-bpel/src/main/assembly/src.xml Wed Jul 16 06:35:59 2008
@@ -0,0 +1,40 @@
+<?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.
+
+-->
+<assembly>
+  <id>src</id>
+  <formats>
+    <format>tar.gz</format>
+    <format>zip</format>
+  </formats>
+  <fileSets>
+    <fileSet>
+      <includes>
+        <include>README*</include>
+        <include>LICENSE*</include>
+        <include>NOTICE*</include>
+        <include>pom.xml</include>
+	<include>build.xml</include>
+        <include>src/**/*</include>
+        <include>*/pom.xml</include>
+        <include>*/src/**/*</include>
+      </includes>
+    </fileSet>
+  </fileSets>
+</assembly>

Added: servicemix/smx4/features/trunk/examples/loan-broker-bpel/src/main/java/JMSClient.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/loan-broker-bpel/src/main/java/JMSClient.java?rev=677285&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/loan-broker-bpel/src/main/java/JMSClient.java (added)
+++ servicemix/smx4/features/trunk/examples/loan-broker-bpel/src/main/java/JMSClient.java Wed Jul 16 06:35:59 2008
@@ -0,0 +1,105 @@
+/*
+ * 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 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 java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import javax.jms.ConnectionFactory;
+import javax.jms.Destination;
+import javax.jms.Message;
+import javax.jms.TextMessage;
+
+/**
+ * @version $Revision: 666120 $
+ */
+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();
+        System.exit(0);
+    }
+
+    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();
+            }
+        }
+    }
+
+}

Modified: servicemix/smx4/features/trunk/examples/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/pom.xml?rev=677285&r1=677284&r2=677285&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/examples/pom.xml (original)
+++ servicemix/smx4/features/trunk/examples/pom.xml Wed Jul 16 06:35:59 2008
@@ -29,11 +29,15 @@
     <groupId>org.apache.servicemix.examples</groupId>
     <artifactId>examples</artifactId>
     <packaging>pom</packaging>
-    <version>4.0-m2-SNAPSHOT</version>
+    <version>${servicemix.version}</version>
     <name>Apache ServiceMix Examples</name>
 
     <modules>
-        <module>bridge</module>
+<!--        <module>bridge</module>
+        <module>camel</module>
+        <module>cxf-wsdl-first</module>
+        <module>wsdl-first</module>
+        <module>loan-broker-bpel</module> -->
         <module>camel-nmr</module>
         <module>camel-osgi</module>
         <module>cxf-camel-nmr</module>

Added: servicemix/smx4/features/trunk/examples/wsdl-first/README.txt
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/wsdl-first/README.txt?rev=677285&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/wsdl-first/README.txt (added)
+++ servicemix/smx4/features/trunk/examples/wsdl-first/README.txt Wed Jul 16 06:35:59 2008
@@ -0,0 +1,42 @@
+/*
+ * 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.
+ */
+
+Welcome to ServiceMix WSDL design first example
+===============================================
+
+This example shows how to expose a service, beginning from the
+WSDL, and exposing it over HTTP.
+
+First start a ServiceMix server (if not already started) by running
+  bin/servicemix
+in the root dir of this distribution.
+
+To build this sample, launch the following commands:
+  mvn install
+
+You can deploy the example on ServiceMix 4 in two different ways:
+- using hotdeploy: 
+   copy the wsdl-first-sa/target/wsdl-first-sa-${version}.jar to <servicemix_home>/deploy
+- using the ServiceMix console:
+   osgi install -s mvn:org.apache.servicemix.examples.wsdl-first/wsdl-first-sa/${version}/zip
+
+You can browse the WSDL at
+  http://localhost:8192/PersonService/main.wsdl
+  
+You can also open the client.html page in a browser
+to send a request to the service.
+

Added: servicemix/smx4/features/trunk/examples/wsdl-first/client.html
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/examples/wsdl-first/client.html?rev=677285&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/examples/wsdl-first/client.html (added)
+++ servicemix/smx4/features/trunk/examples/wsdl-first/client.html Wed Jul 16 06:35:59 2008
@@ -0,0 +1,135 @@
+<!--
+    
+    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.
+
+-->
+<!-- $Rev: 356052 $ $Date: 2005-12-11 14:41:20 -0800 (dim., 11 dv©c. 2005) $ -->
+<html>
+<head>
+<title>ServiceMix WSDL-First Example</title>
+<script type="text/javascript">
+var urlToOpen = "http://localhost:8192/PersonService/"; //default URL to open
+
+function getHTTPObject() {
+  var xmlhttp = false;
+
+  /* Compilation conditionnelle d'IE */
+  /*@cc_on
+  @if (@_jscript_version >= 5)
+     try {
+        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
+     } catch (e) {
+        try {
+           xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
+        } catch (E) {
+           xmlhttp = false;
+        }
+     }
+  @else
+     xmlhttp = false;
+  @end @*/
+
+  /* on essaie de créer l'objet si ce n'est pas déjà fait */
+  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
+     try {
+        xmlhttp = new XMLHttpRequest();
+     } catch (e) {
+        xmlhttp = false;
+     }
+  }
+
+  if (xmlhttp) {
+     /* on définit ce qui doit se passer quand la page répondra */
+     xmlhttp.onreadystatechange=function() {
+        if (xmlhttp.readyState == 4) { /* 4 : état "complete" */
+           var response = document.getElementById("response");
+           var responseStatus = "";
+           try {
+             responseStatus = xmlhttp.status + "";
+           } catch (e) {
+             responseStatus = "ERROR WHILE RETRIEVING STATUS; MAYBE UNABLE TO CONNECT.";
+           }
+           response.value = "STATUS: " + responseStatus + "\n" + xmlhttp.responseText;
+        }
+     }
+  }
+  return xmlhttp;
+}
+
+function send() {
+  if ((document.getElementById("urlToOpen").value != urlToOpen) && (document.getElementById("urlToOpen").value != "")) {
+    //use user entry only if it at least can be okay
+    urlToOpen = document.getElementById("urlToOpen").value;
+  }  
+  var xmlhttp = getHTTPObject();
+  if (!xmlhttp) {
+    alert('cound not create XMLHttpRequest object');
+    return;
+  }
+  var request = document.getElementById("request");
+  var response = document.getElementById("response");
+  try {
+    netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead UniversalBrowserWrite");
+  } catch (e) {
+  }
+  try {
+    xmlhttp.open("POST", urlToOpen, true);
+  } catch (e) {
+    alert('error opening');
+  }
+  xmlhttp.send(request.value);
+}
+
+</script>
+</head>
+
+<body>
+
+<h1>ServiceMix WSDL-First Example</h1>
+
+<p>Welcome to the WSDL-First example for ServiceMix</p>
+
+<p>Perform a POST into the HTTP binding. This requires JavaScript.</p> 
+<p>Target: <input type="text" size="50" id="urlToOpen" value=""><script type="text/javascript">document.getElementById("urlToOpen").value = urlToOpen;</script>.</p>
+  
+<table>
+  <tr>
+    <td>
+  <textarea id="request" style="width:600px;height:400px" onKeyUp="send();"><?xml version="1.0" encoding="UTF-8"?>
+<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
+              xmlns:tns="http://servicemix.apache.org/samples/wsdl-first/types">
+  <env:Body>
+    <tns:GetPerson>
+      <tns:personId>world</tns:personId>
+    </tns:GetPerson>
+  </env:Body>
+</env:Envelope>
+
+  </textarea>
+    </td>
+    <td>
+  <textarea id="response" style="width:600px;height:400px">
+  </textarea>
+    </td>
+  </tr>
+  <tr>
+    <td colspan=2>
+  <input type="button" value="Send" onClick="send();"/>
+    </td>
+  </tr>
+</table>
+</body>
+</html>