camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alarm <>
Subject Cannot trigger LDAP Endpoint
Date Mon, 26 Jan 2015 12:12:53 GMT
Hello, i have the following source code which works pretty well. Meaning, i
can read from a XML file and store the data through an insert statement onto
the DB:

 from("file:src/data?noop=true").bean(new UserConversion(),

The problem starts when i try to read in my bean UserConversion, data which
i fetch from an LDAP Endpoint. I retrieve data from the LDAP with the
following source:

ProducerTemplate template = context.createProducerTemplate();
Collection<?> results = (Collection<?>)
				ExchangePattern.OutOnly, "uid=myuser");

if (results.size() > 0) {
	Iterator<?> resultIter = results.iterator();
	SearchResult searchResult = (SearchResult);
	Attributes attributes = searchResult.getAttributes();
	Attribute deviceCNAttr = attributes.get("cn");

The above part also works pretty well. Now i am having difficulties to user
the from().to() pattern. I cannot find a way how i can add the ldap to
from() as an endpoint and pass also the search criteria i use on the
sendBody function as seen above. 

In detail, i am trying:
1) To use the ldap as an endpoint
2) The retrieved data and pass them inside the bean.

Thank you

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message