Mulesoft ESB使用SOAP API

时间:2018-01-10 09:16:44

标签: mule mule-studio mule-esb

我是mule esb的新手我创建了一个流http,只是检查与SOAP API的连接,但我不知道在哪里放置用户名,密码和API KEY

任何人帮助

我只需要与SOAP API建立连接。

2 个答案:

答案 0 :(得分:0)

您可以在Web服务使用者中配置UserName / Password(API密钥) -

1.点击您的" Web服务消费者"

2.转到连接器配置。

3.转到"安全"标签

4.有几个选项可用。要使用用户名和密码,请选中复选框" WS-Security用户名令牌"并输入所需的凭证。

请告诉我们这是否适合您。

答案 1 :(得分:0)

You need to create a TLS and the add the same in your WebService Consumer.

         <tls:context name="tlsContext">
          <tls:trust-store path="trustStore" password="pass" />
          </tls:context>
          <ws:consumer-config serviceAddress="http://localhost/soapcall" wsdlLocation="SOAPAPI.wsdl" service="SoapService" port="ServicePort" name="wsConfig">
          <ws:security>
             <ws:wss-encrypt tlsContext-ref="tlsContext" alias="keyalias" />
           </ws:security>
     </ws:consumer-config>

After that you can add the custom header like as follows:

 <set-property propertyName="soap.Authorization"
 value="<auth>clientid
 MWYxMDk4ZDktNzkyOC00Z</auth>"/>

Please refer to the following MuleSoft documentation for more details:
https://docs.mulesoft.com/mule-user-guide/v/3.7/web-service-consumer#adding-custom-headers