<?xml version="1.0" encoding="UTF-8"?>
<!--
~  Copyright (c) 2005-2010, WSO2 Inc. (http://wso2.com) All Rights Reserved.
~
~  WSO2 Inc. 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.
~
-->
<definitions xmlns="http://ws.apache.org/ns/synapse">
    <registry provider="org.wso2.carbon.mediation.registry.WSO2Registry">
        <parameter name="cachableDuration">15000</parameter>
    </registry>
    <proxy name="StockQuoteProxy" transports="https http" startOnLoad="true" trace="disable">
        <target>
            <inSequence>
                <send>
                    <endpoint name="secure">
                        <address uri="http://localhost:9000/services/SecureStockQuoteService">
                            <enableAddressing/>
                            <enableSec policy="sec_policy"/>
                        </address>
                    </endpoint>
                </send>
            </inSequence>
            <outSequence>
                <header xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" name="wsse:Security" action="remove"/>
                <send/>
            </outSequence>
        </target>
        <publishWSDL uri="file:samples/service-bus/resources/proxy/sample_proxy_1.wsdl"/>
    </proxy>
    <localEntry key="sec_policy" src="file:samples/service-bus/resources/policy/policy_3.xml"/>
    <sequence name="fault">
        <log level="full">
            <property name="MESSAGE" value="Executing default &quot;fault&quot; sequence"/>
            <property name="ERROR_CODE" expression="get-property('ERROR_CODE')"/>
            <property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/>
        </log>
        <drop/>
    </sequence>
    <sequence name="main">
        <in>
            <send/>
        </in>
        <out>
            <log level="full"/>
            <send/>
        </out>
    </sequence>
</definitions>
