kickinchicken
kickinchicken

Reputation: 1625

No endpoint could be found for - Camel Http Integration

I'm trying to run a simple test with Apache Camel:

   from("http://localhost:61554/api/v1/MyController/my-endpoint")
            .to("direct:a")
            .log("$({body}");

I'm getting the following error: "No endpoint could be found for: http://localhost:61554/api/v1/MyController/my-endpoint, please check your classpath contains the needed Camel component jar"

I'm very new to Camel and Java. Can someone please tell me why this error is coming up? Should I be using from("direct:x")... ? If, so where do I map my "direct" endpoints to concrete ones?

Thanks

Upvotes: 1

Views: 4071

Answers (1)

Claus Ibsen
Claus Ibsen

Reputation: 55550

You cannot use the http component as consumer (eg in from) - its a http client for calling HTTP servers (so its a producer, eg to).

Instead to have HTTP as consumer you can use camel-servlet, camel-jetty, camel-undertow, etc.

Upvotes: 2

Related Questions