WSO2 ESB SimpleStockProxy =>无法发送ViaPost

时间:2015-11-19 19:40:53

标签: wso2 wso2esb

我目前正在尝试按https://docs.wso2.com/display/ESB490/Lesson+Three%3A+Mediating+Services#LessonThree:MediatingServices-ConfigSample2设置SimpleStockProxy并收到以下错误:

无法将viaPost发送到网址[http://localhost:8280/services/StockQuoteProxy

telnet localhost 8280
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

连接到http://localhost:9000/services/SimpleStockQuoteService时,地址测试成功。实际的SimpleQuoteService也可以工作。

完整的配置源如下:

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://ws.apache.org/ns/synapse">
    <registry provider="org.wso2.carbon.mediation.registry.WSO2Registry">
        <parameter name="cachableDuration">15000</parameter>
    </registry>
    <taskManager provider="org.wso2.carbon.mediation.ntask.NTaskTaskManager"/>
    <proxy name="StockQuoteProxy" startOnLoad="true" statistics="enable"
        trace="enable" transports="https http local">
        <description/>
        <target>
            <endpoint>
                <address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
            </endpoint>
            <outSequence>
                <send>
                    <endpoint>
                        <address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
                    </endpoint>
                </send>
            </outSequence>
        </target>
        <publishWSDL uri="file:./repository/samples/resources/proxy/sample_proxy_1.wsdl"/>
    </proxy>
    <endpoint name="SimpleStockQuoteService">
        <address statistics="enable" uri="http://localhost:9000/services/SimpleStockQuoteService"/>
    </endpoint>
    <sequence name="fault">
        <!-- Log the message at the full log level with the ERROR_MESSAGE and the ERROR_CODE-->
        <log level="full">
            <property name="MESSAGE" value="Executing default 'fault' sequence"/>
            <property expression="get-property('ERROR_CODE')" name="ERROR_CODE"/>
            <property expression="get-property('ERROR_MESSAGE')" name="ERROR_MESSAGE"/>
        </log>
        <!-- Drops the messages by default if there is a fault -->
        <drop/>
    </sequence>
    <sequence name="main">
        <in>
            <!-- Log all messages passing through -->
            <log level="full"/>
            <!-- ensure that the default configuration only sends if it is one of samples -->
            <!-- Otherwise Synapse would be an open proxy by default (BAD!)               -->
            <filter regex="http://localhost:9000.*" source="get-property('To')">
                <!-- Send the messages where they have been sent (i.e. implicit "To" EPR) -->
                <send/>
            </filter>
        </in>
        <out>
            <send/>
        </out>
        <description>The main sequence for the message mediation</description>
    </sequence>
    <!-- You can add any flat sequences, endpoints, etc.. to this synapse.xml file if you do
    *not* want to keep the artifacts in several files -->
</definitions>

任何人对这里可能出现的问题都有任何想法?

0 个答案:

没有答案