我是骡子 esb 的新手,我创建了一个流 http 来检查与 SOAP API 的连接,但我不知道在哪里放置用户名、密码和 API 密钥
任何人帮助
我只需要连接到 SOAP API。
您可以在 Web 服务使用者中配置用户名/密码(API 密钥(
1.点击您的"网络服务消费者">
2.转到连接器配置。
3.转到"安全"选项卡。
4.有几种选择。要使用用户名和密码,请选中"WS-安全用户名令牌"复选框并输入所需的凭据。
让我们知道这是否适合您。
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