http4 cannot be used as a consumer. You can only use it to send http
requests not receive. You need netty-http4 or some other component that can
also receive. Http4 is more like a client.

But you can just use a file component which is build it and send some dummy
data if you want to test. Or create a unit test for the route and then call
the route and give it some data.

On Wed, Mar 1, 2017 at 11:07 AM, rkmohapatra [via Camel] <
ml-node+s465427n5794609...@n5.nabble.com> wrote:

> Hi Tomo,
>
> I basically wanted to call the REST API to consume data.
> I think as you pointed out, 'direct:getRestExternalService' does not get
> message from anywhere.
> But when I change the code as below, I get the following exception.
>
> from("http4://...")
> .process(new RestProcessor());
>
> 'Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
> resolve endpoint: http4://<host>:<port>/<rest_resource_uri>?
> throwExceptionOnFailure=true&transferException=true due to: No component
> found with scheme: http4
>         at 
> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:629)
>
>         at 
> org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:79)
>
>         at 
> org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:211)
>
>         at 
> org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:108)
>
>         at 
> org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:114)
>
>         at 
> org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:69)
>
>         at 
> org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:90)
>
>         at 
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1051)
>
>         at 
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:196)
>
>         ... 35 more
>
> I have the component jar and it's dependent jars bundled under WEB-INF/lib
> of my web application.
>
> Regards,
> Rajesh
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/Consuming-data-from-
> external-REST-service-tp5794514p5794609.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428...@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465428&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDY1NDI4fDE1MzI5MTE2NTY=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/Consuming-data-from-external-REST-service-tp5794514p5794610.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to