【问题标题】:How to put web service consumer configuration in properties file in Mulesoft?如何将 Web 服务使用者配置放在 Mulesoft 的属性文件中?
【发布时间】:2016-07-16 14:48:09
【问题描述】:

我想将 Web 服务使用者的参数放在属性文件中。我知道如何在 mule 中使用属性文件。配置对话框中的 ${myWSDLlocation} 不执行任何操作。我查看了this link,但无法解决。

任何帮助将不胜感激。谢谢。

【问题讨论】:

    标签: web-services mule mule-studio


    【解决方案1】:

    得到了解决方案。这就是我所做的:

    1. 在流​​中拖放 ws-consumer
    2. 使用 UI 配置它
    3. 添加了属性文件并在其中定义了键值对 - the usual way
    4. 然后使用 ${keyNameHere} 编辑<ws:consumer-config> 标签

    【讨论】:

      【解决方案2】:

      首先确保您定义了属性占位符。下面是定义了要使用的 config.properties 文件的语法,该文件位于项目的 src/main/resources 目录中。

      现在您可以在属性文件中定义如下内容

      implementation.url=http://abc-cdc.com

      可以使用下面的 Web 服务使用者应用程序访问此 URL。

      ws:consumer-config doc:name="Web Service Consumer" name="Web_Service_Consumer" connectorConfig="HTTPS_Request_Configuration" wsdlLocation="ServiceWSDL/Manager.wsdl" serviceAddress="![p['implementation.url']] " port="ManagerSOAPPort" 服务="ManagerService"

      在上面的例子中,我只使用了 config.properties 文件中的 serviceAddress。请告诉我进展如何。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2014-08-13
        • 1970-01-01
        • 1970-01-01
        • 2015-06-29
        • 1970-01-01
        • 2016-03-09
        相关资源
        最近更新 更多