为什么自定义代理超时而不是故障序列?

时间:2015-10-23 11:57:35

标签: wso2esb

我试图创建一个自定义代理,当请求有效负载是非法的xml时,它会响应SoapFault,但无论我尝试什么,faultSequence都不会被调用。

使用PassThroughProxy时,不会发生此问题,只有CustomProxy。

有人遇到过这个问题吗?

以下是我的示例自定义代理:

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="FileService" transports="http https" startOnLoad="true" trace="disable">
    <target>
        <inSequence>
            <property name="file.md5.path" expression="//*[local-name() = 'filePath']" scope="default" type="STRING"/>
            <class name="testowe.mediators.file.md5"/>
            <payloadFactory media-type="xml">
                <format>
                    <exam:OutputType xmlns:exam="http://example.com/">
                        <exam:result>$1</exam:result>
                    </exam:OutputType>
                </format>
                <args>
                    <arg evaluator="xml" expression="$ctx:file.md5.result"/>
                </args>
            </payloadFactory>
            <respond/>
        </inSequence>
        <outSequence/>
        <faultSequence>
            <log level="full" description="Blad w faulcie"/>
            <makefault version="soap11">
                <code xmlns:soap11Env="http://schemas.xmlsoap.org/soap/envelope/" value="soap11Env:Client"/>
                <reason expression="$ctx:ERROR_MESSAGE"/>
                <role/>
            </makefault>
            <send/>
        </faultSequence>
    </target>
    <publishWSDL key="conf:testowe/schemas/FileService.wsdl">
        <resource location="FileService.Messages.xsd" key="conf:testowe/schemas/FileService.Messages.xsd"/>
    </publishWSDL>
</proxy>

1 个答案:

答案 0 :(得分:1)

WSO2-ESB 4.8.1 PPT(直通传输)存在问题,如果格式错误的xml,ESB没有响应。 4.9.0 ESBJAVA-3284

中已修复相同问题