【发布时间】:2016-09-13 19:23:21
【问题描述】:
我已经编写了 wso2esb 配置来在 OpenLDAP 服务器中执行“搜索”。
下面是我对 API 的 ESB 配置:
<api context="/searchLDAP" name="searchLDAP">
<resource methods="GET" uri-template="/adap/{baseDN}">
<inSequence>
<log>
<property name="GET" value="searchLDAP"/>
</log>
<property name="messageType" scope="axis2" type="STRING" value="application/json"/>
<property name="Authorization" scope="transport" value="Basic cn=Manager,dc=maxcrc,dc=com:secret"/>
<send>
<endpoint>
<http method="GET" uri-template="http://localhost:7070/adap/{baseDN}"/>
</endpoint>
</send>
</inSequence>
</resource>
</api>
我在本地系统中安装了 LDAP。我也有配置为调用 LDAP 服务器的 ADAP。
这是连接到 LDAP 服务器的配置。 基础 DN:ou=People,dc=maxcrc,dc=com 用户 DN:cn=Manager,dc=maxcrc,dc=com 密码:秘密
令牌身份验证的代码工作正常,正在生成令牌。
我有一个 curl 脚本来测试 ESB url: curl -X GET -H "Content-Type: application/json" http://localhost:8280/searchLDAP/adap/cn=Abcxyz,ou=People,dc=maxcrc,dc=com
运行后,我没有得到任何响应。日志中也没有错误消息。 但是,下面给出的我的后端 URL 工作正常,我可以很好地执行搜索。 curl -X GET -H "Content-Type: application/json" http://localhost:7070/adap/cn=Abcxyz,ou=People,dc=maxcrc,dc=com
我也试过直接在浏览器上点击 ESB URL,但没有运气。 请检查API配置或ESB URL是否有问题。
任何帮助将不胜感激。
【问题讨论】: