<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesource.org/schema/mule/core/2.2"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:spring="http://www.springframework.org/schema/beans"
       xmlns:vm="http://www.mulesource.org/schema/mule/vm/2.2"
       xsi:schemaLocation="
               http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
               http://www.mulesource.org/schema/mule/core/2.2 http://www.mulesource.org/schema/mule/core/2.2/mule.xsd
               http://www.mulesource.org/schema/mule/vm/2.2 http://www.mulesource.org/schema/mule/vm/2.2/mule-vm.xsd">

    <description>
    This loan broker example is modeled on the Enterprise integration Patterns book sample.
    Here we define components and endpoints using the VM transport.
    </description>

    <custom-transformer name="ExtractCustomer" class="org.mule.transformer.simple.GetBeanProperty">
        <spring:property name="propertyName" value="customerRequest.customer"/>
    </custom-transformer>

    <custom-transformer name="SetLendersAsRecipients" class="org.mule.example.loanbroker.transformers.SetLendersAsRecipients"/>

    <vm:endpoint name="CustomerRequests" path="customer.requests" connector-ref="syncVm"/>
    <vm:endpoint name="LoanBrokerQuotes" path="loan.quotes" connector-ref="syncVm"/>
    <vm:endpoint name="CreditAgency" path="credit.agency" connector-ref="syncVm"/>
    <vm:endpoint name="CreditAgencyIn" path="credit.agency" connector-ref="syncVm"/>
    <vm:endpoint name="LenderService" path="lender.service?method=setLenderList" connector-ref="syncVm"/>
    <vm:endpoint name="BankGateway" path="bank.gateway" connector-ref="syncVm"/>

    <vm:endpoint name="Bank1" path="bank.1" connector-ref="syncVm"/>
    <vm:endpoint name="Bank1In" path="bank.1" connector-ref="syncVm"/>

    <vm:endpoint name="Bank2" path="bank.2" connector-ref="syncVm"/>
    <vm:endpoint name="Bank2In" path="bank.2" connector-ref="syncVm"/>

    <vm:endpoint name="Bank3" path="bank.3" connector-ref="syncVm"/>
    <vm:endpoint name="Bank3In" path="bank.3" connector-ref="syncVm"/>

    <vm:endpoint name="Bank4" path="bank.4" connector-ref="syncVm"/>
    <vm:endpoint name="Bank4In" path="bank.4" connector-ref="syncVm"/>

    <vm:endpoint name="Bank5" path="bank.5" connector-ref="syncVm"/>
    <vm:endpoint name="Bank5In" path="bank.5" connector-ref="syncVm"/>

</mule>
