我有几个必须通过 WSO2 ESB 使用的后端 REST 服务。我为后端使用基本授权标头。我已经在 ESB 中创建了该服务,当我通过 firefox RESTClient 插件调用它时它工作正常。这是配置:
<proxy name="ADocumentLibraryAuth" transports="https http" startOnLoad="true" trace="disable">
<target>
<inSequence>
<property name="Authorization" expression="fn:concat('Basic ', base64Encode('xxx:xxx'))" scope="transport"/>
<send>
<endpoint name="test">
<address uri="http://xxxxxx:8080/alfresco/s/slingshot/datalists/lists/xx/xx/xx"/>
</endpoint>
</send>
</inSequence>
<outSequence>
<send/>
</outSequence>
</target>
</proxy>
现在我想通过 ESB 保护这个服务(例如使用 usernameToken 安全性)。我可以轻松启用此功能,但我不知道如何调用/使用此服务。我应该为此生成 wsdl 客户端并调用它吗?