【发布时间】:2022-02-02 16:56:38
【问题描述】:
在我的 mule 流程中,我有一个 LDAP 分页结果搜索,如下所示。我想以 json 格式获取输出。我正在取回一个 ArrayList。
<flow name="ldapsearchFlow1" doc:name="ldapsearchFlow1">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="3555" doc:name="HTTP"/>
<ldap:paged-result-search config-ref="LDAP" baseDn="${xxx.ad.base}" filter="(objectClass=*)" pageSize="100" doc:name="LDAP">
<ldap:attributes>
<ldap:attribute>uid</ldap:attribute>
<ldap:attribute>cn</ldap:attribute>
</ldap:attributes>
</ldap:paged-result-search>
<ldap:ldap-entry-to-ldif doc:name="ldap1"/>
<json:object-to-json-transformer doc:name="Object to JSON" />
</flow>
输出如下。我也不需要计数,属性计数等。
���sr�java.util.ArrayListx����a��I�sizexp��%w��%t�W{"dn":"CN=aaronj,ou=people,dc=xxx,dc=org","attributes":{"count":1},"attributeCount":1}t�W{"dn":"CN=abbasa,ou=people,dc=xxx,dc=org","attributes":{"count":1},"attributeCount":1}t�X{"dn":"CN=abbottl,ou=people,dc=xxx,dc=org","attributes":{"count":1},"attributeCount":1}t�\{"dn":"CN=abeyrathnep,ou=people,dc=xxx,dc=org","attributes":{"count":1},"attributeCount":1}t�Z
【问题讨论】:
标签: mule