【问题标题】:How to disable chunked encoding in Mule cxf:proxy-client如何在 Mule cxf:proxy-client 中禁用分块编码
【发布时间】:2013-08-19 17:07:31
【问题描述】:

我用Mule 3.3.2cxf:proxy-client这样调用第三方Soap服务:

<outbound-endpoint address="https://www.xyz.biz/Dms/Call.aws" mimeType="text/xml" connector-ref="https.connector" responseTimeout="100000">
            <cxf:proxy-client payload="envelope" enableMuleSoapHeaders="false">
                <cxf:inInterceptors>
                    <spring:bean class="org.apache.cxf.interceptor.LoggingInInterceptor" />
                </cxf:inInterceptors>
                <cxf:outInterceptors>
                    <spring:bean class="org.apache.cxf.interceptor.LoggingOutInterceptor" />
                </cxf:outInterceptors>
            </cxf:proxy-client>
        </outbound-endpoint>

默认情况下,消息以chunked 传输,这很好,但不幸的是服务器无法处理。如何在proxy-client 中禁用分块,以便传递Transfer-Encoding: chunked 而不是Content-Length 标头。

【问题讨论】:

    标签: http https http-headers mule


    【解决方案1】:

    这可以通过将 http 版本强制为 1.0 来轻松完成

    只需添加以下转换器

    <message-properties-transformer>
          <!-- Add the http version property to the message -->
          <add-message-property key="http.version" value="HTTP/1.0" />
    </message-properties-transformer>
    

    在您的出站端点之前

    【讨论】:

    • 在 Mule 3.3.x 及更高版本上,我宁愿使用set-property
    猜你喜欢
    • 2014-07-01
    • 1970-01-01
    • 2017-05-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-12-11
    • 2018-07-12
    • 2018-11-14
    相关资源
    最近更新 更多