0

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

任何人帮助

我只需要连接到 SOAP API。

4

2 回答 2

0

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

1.点击你的“Web服务消费者”

2.转到连接器配置。

3.转到“安全”选项卡。

4.有几个选项可用。要使用用户名和密码,请选中复选框“WS-Security Username Token”并输入所需的凭据。

让我们知道这是否适合您。

于 2018-01-10T13:02:46.550 回答
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
于 2018-01-11T12:27:14.683 回答