so i wrote an unit test @Test public void testDirectSending() throws Exception{ // lets route from the output endpoints to our mock endpoints so we can assert expectations context.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { from("bean:pdp").to(outputEndpoint); } }); input4Endpoint.sendBody("direct:start", "foo"); assertMockEndpointsSatisfied(5000, TimeUnit.MILLISECONDS);
my routes: <route> <from uri="activemq:topic:xacml.authzRequests"/> <log message="request consumed hopefully"/> <to uri="bean:pdp"/> </route> <route> <from uri="direct:start"/> <bean method="genRequest" ref="xacmlRequest"/> <log message="request generated"/> <to uri="activemq:topic:xacml.authzRequests"/> </route> and the class: public class XacmlRequester { @EndpointInject(uri = "activemq:topic:xacml.authzRequests") ProducerTemplate producer; @InOnly public void genRequest(){ try { producer.sendBody(new FileInputStream(new File("src/requests/request.xml"))); } catch (FileNotFoundException e) { System.out.println("datei nicht gefunden"); e.printStackTrace(); } } } the bean:pdp is an XACML PDP, which evalutes the request give this to System.out <Response> <Result ResourceId=""> <Decision>Permit</Decision> <Status> <StatusCode Value="urn:oasis:names:tc:xacml:1.0:status:ok"/> </Status> </Result> </Response> so in the testcase everything is fine but when i let the camel:run it doesnt work so what is the difference ? it has to be this:sendBody("direct:start", "foo"); what does this mean ? in my scenario ? -- View this message in context: http://camel.465427.n5.nabble.com/what-did-i-forgot-Bean-integration-through-direct-start-tp4490510p4491916.html Sent from the Camel - Users mailing list archive at Nabble.com.