【问题标题】:Convert JMSMessage to SOAP message in MULE ESB在 MULE ESB 中将 JMSMessage 转换为 SOAP 消息
【发布时间】:2015-07-21 12:34:35
【问题描述】:

e 已经在"http://localhost:5050/MyServices" 生成了 web 服务。尝试使用 HTTP 端点代理 web 服务,它工作正常。

但现在我们正尝试在这些 HTTP 端点的中间使用 JMS。我的服务正在收到请求,但无法理解 JMS 消息。有什么方法可以将 JMSMessage 转换为 SOAP 消息。

流程是:SOAP UI ==> JMS (MULE ESB) ==> MyServices at 5050

!Flow im mule]1

【问题讨论】:

    标签: web-services soap mule esb mule-studio


    【解决方案1】:

    来自 SoapUI 的 JMS 消息在到达 Mule JMS 入站端点时只是一个包含 SOAP 请求 XML 的字符串,因此您应该能够将其发送到带有所需标头的 http 端点。

    例如这样:

    <jms:inbound-endpoint connector-ref="JMS_Connector" doc:description="Generated by ArchStudio" doc:name="JMS" exchange-pattern="request-response" queue="test.queue"/>
    <http:outbound-endpoint exchange-pattern="request-response" host="wsf.cdyne.com" port="80" path="WeatherWS/Weather.asmx" method="POST" doc:name="HTTP">
           <set-property propertyName="Content-Type" value="text/xml"/>
    </http:outbound-endpoint>
    

    【讨论】:

    • 您按照安东的建议会遇到什么问题?请发布错误。
    • 我需要向哪个地址发送请求(来自 SOAP UI)。
    • 您需要在 HermesJMS 中配置 JMS 端点,然后设置 SoapUI 以使用该端点。您也可以直接使用 HermesJMS 进行测试。 soapui.org/JMS/getting-started.html
    【解决方案2】:

    或者你也可以使用:-

    <object-to-string-transformer doc:name="Object to String"/>
    

    jms:inbound-endpoint 之后和http:outbound-endpoint 之前

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-07-07
      • 2015-09-16
      • 2017-07-11
      • 2014-07-01
      • 1970-01-01
      • 2016-07-18
      • 1970-01-01
      • 2015-07-16
      相关资源
      最近更新 更多