On Fri, Apr 3, 2009 at 7:00 AM, angeloNZ <angelo.ange...@nz.fujitsu.com> wrote:
>
> Hi,
>
> I'm quite new to Camel and currently using it alongside servermix.  I've got
> a few questions about doing a LDAP lookup using camel.  If for example I
> have a class that extends RouteBuilder and overrides configure():
>
> public void configure() throws Exception {
>    from("jbi:service:...").to("ldap:<host>:<port>?base=<dn>");
> }
>
> what do I need to add to the route above in order for me to add my search
> criteria to the lookup and then check the return values after the call?
> After looking at LdapRouteTest I'm guessing I could create a processor class
> that has a handle on an Exchange instance and be able to set the mesage body
> in there:
>
> from().process(myProcessor).to("ldap:...");
>
> Should I then do the same after the lookup to check the result?
>
> from().process(myProcessor).to("ldap:...").process(myResultProcessor);
>
> Am I on the right track here and is this the most elegant solution?  Also if
> connecting to ldap requires a connectionPassword, where do I specify that?
> Thanks for the help.
Yeah that is a good solution to start with. Using processor you use
Java code and you are in control what happens.
Later you can use some DSL keywords to set the body, or use POJO for
the needed java code.

But start out with a processor and add System out or breakpoints or
whatever so you can see how it runs.

The LDAP component, looks like it looks up a bean in the registry that
is a javax.naming.directory.DirContext
so you need to configure all the ldap login elsewhere.



>
> --
> View this message in context: 
> http://www.nabble.com/Help-with-implementing-LDAP-solution-tp22862000p22862000.html
> Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Apache Camel Reference Card:
http://refcardz.dzone.com/refcardz/enterprise-integration

Reply via email to