LDAP搜索过滤器

时间:2013-09-08 12:39:13

标签: filter ldap

当我使用此过滤器时,我的LDAP具有以下结构:

(objectclass = bussoapprocessor)

<data>
<GetSoapProcessorsResponse>
    <tuple>
        <old>
            <entry dn="cn=ABC" entryUUID="5ec82981-d111-4851-98cc-0ff7fd40c977">
                <bussoapprocessorconfiguration>
                    <string>
                        <configurations autoStartCount="3">
                            <cancelReplyInterval>30000</cancelReplyInterval>
                            <gracefulCompleteTime>15</gracefulCompleteTime>
                            <abortTime>5</abortTime>

                            <routing ui_type="loadbalancing" ui_algorithm="failover">
                                <preference>1</preference>
                            </routing>
                            <configuration implementation="applicationconnector.uddi.UDDIConnector" htmfile="/uddi/applicationconnector/uddi.caf">

                                <startupDependency xmlns="http://schemas.abc.com/1.0/xmlstore">
                                    <namespace>http://schemas.abc.com/1.0/xmlstore</namespace>
                                </startupDependency>
                                <isProxyEnabled>false</isProxyEnabled>
                                <advancedoptions>
                                    <ignorecert>false</ignorecert>
                                    <so_timeout>1800000</so_timeout>
                                </advancedoptions>
                            </configuration>

                        </configurations>
                    </string>
                </bussoapprocessorconfiguration>
                <computer>
                    <string>mycomp</string>
                </computer>
                <automaticstart>
                    <string>true</string>
                </automaticstart>

                <objectclass>
                    <string>top</string>
                    <string>bussoapprocessor</string>
                </objectclass>
            </entry>
        </old>
    </tuple>
    <tuple>
        <old>
            <entry dn="ABC 2">
                <bussoapprocessorconfiguration>
                    <string>
                        <configurations autoStartCount="3">
                            <cancelReplyInterval>30000</cancelReplyInterval>
                            <gracefulCompleteTime>15</gracefulCompleteTime>
                            <abortTime>5</abortTime>
                            <jreconfig>
                                <param value="-Xmx256M"/>
                                <param value="-XX:PermSize=5m"/>
                            </jreconfig>
                            <routing ui_type="loadbalancing" ui_algorithm="failover">
                                <preference>1</preference>
                            </routing>
                            <configuration implementation="com.eibus.applicationconnector.sap.SAPMapper" htmfile="/bac/sap/sap.htm">
                                <classpath>
                                    <location>/BAC/SAP/lib/sapjco.jar</location>
                                    <location>/BAC/SAP/lib/sapidocjco.jar</location>
                                    <location>/BAC/SAP/lib/sapidoc.jar</location>
                                    <location>/BAC/SAP/lib/jdsr.jar</location>
                                    <location>/BAC/SAP/lib/coelib.jar</location>
                                    <location>/BAC/SAP/lib/wsdl4j.jar</location>
                                    <location>/BAC/SAP/sapconnector.jar</location>

                            </configuration>
                        </configurations>
                    </string>
                </bussoapprocessorconfiguration>
                <computer>
                    <string>mycomp</string>
                </computer>
                <automaticstart>
                    <string>true</string>
                </automaticstart>
                <cn>
                    <string>SAP R3 Connector</string>
                </cn>
                <objectclass>
                    <string>top</string>
                    <string>bussoapprocessor</string>
                </objectclass>
            </entry>
        </old>
    </tuple>
    </GetSoapProcessorsResponse>

我想获取具有“com.eibus.applicationconnector.sap.SAPMapper”实现的条目。请建议我如何根据配置标签中的implementation属性进行过滤查询?感谢。

1 个答案:

答案 0 :(得分:0)

如果底层LDAP目录服务器(你没有提到,但我猜它既不是eDirectory也不是Active Directory,那么可能是OIM或Sun Directory服务器)都定义了这个属性的模式,它支持通配符子串搜索然后有一种可能的方式。

您也没有提及存储此数据的属性的名称。

但如果支持通配符,则添加

的过滤器
(UnNamedAttribute=*implementation="com.eibus.applicationconnector.sap.SAPMapper*)

但是因为你可能也只想要这个课程,更完整:

(&(objectclass=bussoapprocessor)(UnNamedAttribute=*implementation="com.eibus.applicationconnector.sap.SAPMapper*))