|
LDAP has been created by Hadrian Zbarcea (Aug 26, 2008). Content:LDAP ComponentThe ldap: component allows you to perform searches in LDAP servers using filters as the message payload. URI formatldap:ldapServerUrl?options This component only supports producer, meaning that you can not use routes with this component in the from type.
ResultThe result is returned in the out body as a ArrayList<javax.naming.directory.SearchResult> list object with the result. SamplesIn the sample below we fetches the rows from the customer table. First we register our datasource in the Camel registry as testdb: An error occurred: http://svn.apache.org/repos/asf/activemq/camel/trunk/components/camel-ldap/src/test/java/org/apache/camel/component/ldap/LdapRouteTest.java. The system administrator has been notified.Then we configure a route that routes to the JDBC component so the SQL will be executed, notice that we refer to the testdb datasource that was bound in the previous step: An error occurred: http://svn.apache.org/repos/asf/activemq/camel/trunk/components/camel-ldap/src/test/java/org/apache/camel/component/ldap/LdapRouteTest.java. The system administrator has been notified.And then we create the endpoint and sends the exchange containing the SQL query to execute in the in body. The result is returned in the out body. An error occurred: http://svn.apache.org/repos/asf/activemq/camel/trunk/components/camel-ldap/src/test/java/org/apache/camel/component/ldap/LdapRouteTest.java. The system administrator has been notified.Sample - Polling the server every minuteIf we want to poll an LDAP server using this component we need to combine this with a polling scheduler such as the Timer or Quartz etc. from("timer://foo?period=60000").setBody(constant("(o=apache)")).to("ldap:localhost:1024").to("activemq:queue:committers");
See Also |
Unsubscribe or edit your notifications preferences
