【问题标题】:Can I embed a message-properties-transformer in an outbound-endpoint?我可以在出站端点中嵌入消息属性转换器吗?
【发布时间】:2015-01-27 22:59:54
【问题描述】:

为了清理我的 mule 消息流(视觉上),我试图在我的出站端点中嵌入尽可能多的小转换等。是否可以在出站端点中嵌入消息属性转换器?根据这份文件,我认为这是可能的:http://www.mulesoft.org/documentation/display/current/Endpoint+Configuration+Reference

但是,当我像这样将转换器嵌套在端点中时,我的流程似乎忽略了转换器:

    <https:outbound-endpoint exchange-pattern="request-response"
        host="...." port="...."
        path="...." method="GET"
        connector-ref="...." mimeType="application/json"
        contentType="application/json" doc:name="HTTP">
          <message-properties-transformer
            doc:name="Authorization">
            <add-message-property key="Authorization"
                value="....." />
          </message-properties-transformer>
          <response>
            <byte-array-to-string-transformer
                doc:name="Byte Array to String" />
          </response>
    </https:outbound-endpoint>

元素内的转换器工作正常,但消息属性转换器不能。

【问题讨论】:

    标签: mule


    【解决方案1】:

    它应该可以正常工作。既可以作为嵌入端点的变压器,也可以作为transformer-refs。我不确定为什么会被忽略。您使用的是哪个版本的 Mule?

    如果您使用set-property 转换器而不是已弃用的message-property-transformer,也许?

    【讨论】:

      猜你喜欢
      • 2021-06-18
      • 2017-02-24
      • 1970-01-01
      • 1970-01-01
      • 2013-08-17
      • 1970-01-01
      • 2017-04-19
      • 2019-10-10
      • 2013-06-30
      相关资源
      最近更新 更多