我正在尝试将LDAP连接器用于Mule ESB。我可以看到一些结果,但是由于响应没有任何格式,因此我无法执行任何操作。
我想做的是获取响应并将其转换为某种CSV,但这不是主要问题。
我的主要问题是我不知道如何处理我的回复,在线上没有很多关于此的信息。
这是我的回应的一部分,它是机密信息,因此我不能透露太多,但是您会明白的。
sr?java.util.ArrayListx ... a.Isizexp w sr“ org.mule.module.ldap.api.LDAPEntry ...5 L属性t.Lorg / mule / module / ldap / api / LDAPEntryAttributes; LdntLjava / lang / String; xpsr,org.mule.module.ldap.api.LDAPEntryAttributesf。&/ f.L attributet?Ljava / util / Map; xpsrjava.util.HashMap ... w ?? t streetaddresssr6org.mule.module.ldap.api.LDAPSingleValueEntryAttribute“ k.eLvaluetLjava / lang / Object; xr + org.mule.module.ldap.api.LDAPEntryAttribute.C ?? J.Lnameq〜xpt streetAddresst85,街道iashdapsd邮递区号q〜t邮递区号邮递区号邮递区号〜q〜t? phonenumbersq〜t?telephoneNumbert9789 987 987xtACN = Surnam Name,OU = myou,OU = myou,OU = myou,DC = mydc
这是我的流程:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:data-mapper="http://www.mulesoft.org/schema/mule/ee/data-mapper" xmlns:wmq="http://www.mulesoft.org/schema/mule/ee/wmq" xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.6.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ldap="http://www.mulesoft.org/schema/mule/ldap"
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd
http://www.mulesoft.org/schema/mule/ldap http://www.mulesoft.org/schema/mule/ldap/current/mule-ldap.xsd
http://www.mulesoft.org/schema/mule/ee/wmq http://www.mulesoft.org/schema/mule/ee/wmq/current/mule-wmq-ee.xsd
http://www.mulesoft.org/schema/mule/ee/data-mapper http://www.mulesoft.org/schema/mule/ee/data-mapper/current/mule-data-mapper.xsd">
<ldap:config name="ldapConf" url="ldap://host.host.host:389/" authDn="[email protected]" authPassword="secret" doc:name="LDAP"/>
<flow name="activedirectoryGetUsers">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" doc:name="HTTP (Deprecated)" path="activeDirectory"/>
<ldap:search config-ref="ldapConf" doc:name="LDAP" baseDn="OU=myOu,DC=myDC, DC=myDC" filter="(&(objectClass=user)(Company=*mycompany))" scope="SUB_TREE">
<ldap:attributes>
<ldap:attribute>dn</ldap:attribute>
<ldap:attribute>GivenName</ldap:attribute>
<ldap:attribute>sn</ldap:attribute>
<ldap:attribute>mail</ldap:attribute>
<ldap:attribute>telephonenumber</ldap:attribute>
<ldap:attribute>Department</ldap:attribute>
<ldap:attribute>Title</ldap:attribute>
<ldap:attribute>physicalDeliveryOfficeName</ldap:attribute>
<ldap:attribute>l</ldap:attribute>
<ldap:attribute>st</ldap:attribute>
<ldap:attribute>postalCode</ldap:attribute>
<ldap:attribute>streetAddress</ldap:attribute>
</ldap:attributes>
</ldap:search>
</flow>
</mule>
感谢您的帮助。
您正在接受List
的org.mule.module.ldap.api.LDAPEntry
,这正是预计每用户指南:
<ldap:search>
执行LDAP搜索,返回包含所有结果LDAP条目的列表。
然后,您可以在转换器或组件中使用MEL表达式来处理此列表,也可以使用对其进行拆分collection-splitter
或使用for-each
范围对其进行迭代。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句