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

    <!-- To do replicate the contents of test-mule-autowire-app-context.xml,test-application-context.xml -->

    <!--<mgmt:jmx-server id="jmx"/>-->

    <custom-transformer name="ArrayToLenderList" class="org.mule.transformer.simple.ObjectToString"
                        returnClass="java.lang.String"/>

    <!--<spring:bean id="creditProfileLookup" class="org.mule.routing.MuleEndpointProxy">-->
    <!--<endpoint address="xfire:http://localhost:8081/service/CreditAgency?method=getCreditProfile"/>-->
    <!--</spring:bean>-->

    <!--<spring:bean id="lendersLookup" class="org.mule.routing.MuleEndpointProxy">-->
    <!--<endpoint address="xfire:http://localhost:8082/service/LendersService?method=getAvailableLenders"-->
    <!--responseTransformers="ArrayToLenderList"/>-->
    <!--</spring:bean>-->


    <spring:bean id="apple" class="org.mule.tck.testmodels.fruit.Apple">
        <!--<lookup-method name="getCreditProfile" bean="creditProfileLookup"/>-->
        <!--<lookup-method name="getLenders" bean="lendersLookup"/>-->
    </spring:bean>


    <model name="main">

        <service name="LoanBroker">
            <inbound>
                <inbound-endpoint address="vm://LoanBrokerRequests"/>
            </inbound>

            <spring-object bean="apple"/>

            <!--<outbound-router>-->
            <!--<router-static-recipient-list messageProperty="recipients">-->
            <!--<reply-to-endpoint address="vm://LoanBrokerQuotes"/>-->
            <!--</router-static-recipient-list>-->
            <!--</outbound-router>-->

            <!--<async-reply-router timeout="10000" failOnTimeout="false">-->
            <!--<endpoint address="vm://LoanBrokerQuotes"/>-->
            <!--<custom-async-reply-router class="org.mule.example.loanbroker.routers.BankQuotesResponseAggregator"/>-->
            <!--</async-reply-router>-->
        </service>


    </model>
</mule>
