<definitions xmlns="http://ws.apache.org/ns/synapse">

    <sequence name="myFaultHandler">
        <makefault version="soap11">
            <code xmlns:soap11Env="http://schemas.xmlsoap.org/soap/envelope/"
                  value="soap11Env:Server"/>
            <reason value="Soap11FaultCodeServerTestCase"/>
        </makefault>
        <property name="RESPONSE" value="true"/>
        <header name="To" action="remove"/>
        <log level="full"/>
        <send/>
    </sequence>

    <sequence name="main" onError="myFaultHandler">
        <in>
            <log level="full"/>
            <send>
                <endpoint>
                    <address uri="http://localhost:9020/services/NonExistingService"/>
                </endpoint>
            </send>
        </in>

        <out>
            <send/>
        </out>
    </sequence>

    <sequence name="fault">
        <makefault version="soap11">
            <code xmlns:soap11Env="http://schemas.xmlsoap.org/soap/envelope/"
                  value="soap11Env:Server"/>
            <reason value="Default Fault sequence Executed instead of myFaultHandler"/>
        </makefault>

        <log level="full">
            <property name="ERROR_CODE" expression="get-property('ERROR_CODE')"/>
            <property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/>
        </log>
        <property name="RESPONSE" value="true"/>
        <header name="To" action="remove"/>
        <send/>

    </sequence>

</definitions>