<?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:context="http://www.springframework.org/schema/context"
       xmlns:http="http://www.mulesource.org/schema/mule/http/2.2"
       xmlns:axis="http://www.mulesource.org/schema/mule/axis/2.2"
       xmlns:vm="http://www.mulesource.org/schema/mule/vm/2.2"
       xmlns:xm="http://www.mulesource.org/schema/mule/xml/2.2"
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-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/http/2.2 http://www.mulesource.org/schema/mule/http/2.2/mule-http.xsd
       http://www.mulesource.org/schema/mule/axis/2.2 http://www.mulesource.org/schema/mule/axis/2.2/mule-axis.xsd
       http://www.mulesource.org/schema/mule/vm/2.2 http://www.mulesource.org/schema/mule/vm/2.2/mule-vm.xsd
       http://www.mulesource.org/schema/mule/xml/2.2 http://www.mulesource.org/schema/mule/xml/2.2/mule-xml.xsd">

    <description>
        The StockQuote SOAP example uses the Mule RestServiceWrapper to invoke a remote .Net service
        Using SOAP RPC style invocation and displays the result.
        The example demostrates how to set named parameters for Web Service invocations and how to
        invoke a non-java web service using Mule.

        The example invokes a StockQuote Web Service on www.webservicesx.com, the result is an Xml
        string that Mule converts to a StockQuote object by first running the result through an
        Xslt transformer and then using the XmlToObject transformer.
    </description>

    <context:property-placeholder location="proxy.properties"/>

    <http:connector name="HttpConnector"
                    proxyHostname="${proxyHostname}"
                    proxyPassword="${proxyPassword}"
                    proxyPort="${proxyPort}"
                    proxyUsername="${proxyUsername}"/>

    <xm:xml-to-object-transformer name="XmlToObject"/>
    <xml-entity-decoder-transformer name="XmlDecoder"/>
    <xm:xslt-transformer name="Xslt" xsl-file="xsl/soap-stock.xsl"/>

    <!--
        The Mule model initialises and manages your Mule components
    -->
    <model name="Sample-SOAP">
        <!--
            This component can proxy external web service calls over Jms, tcp, ssl or any other transport.
            For this example we use Vm.
        -->
        <service name="serviceProxy">
            <inbound>
                <vm:inbound-endpoint path="stockquote"
                                     responseTransformer-refs="XmlDecoder Xslt XmlToObject" synchronous="true"/>
            </inbound>
            <outbound>
                <pass-through-router>
                    <axis:outbound-endpoint
                            address="http://www.webservicex.net/stockquote.asmx?method=GetQuote"
                            soapAction="#[methodNamespace]#[method]">
                        <axis:soap-method method="qname{GetQuote:http://www.webserviceX.NET/}">
                            <axis:soap-parameter parameter="symbol" type="string" mode="IN"/>
                            <axis:soap-parameter parameter="GetQuoteResult" type="string" mode="OUT"/>
                        </axis:soap-method>
                    </axis:outbound-endpoint>
                </pass-through-router>
            </outbound>
        </service>
    </model>
</mule>
