Examples - 6.3

Talend ESB Mediation Developer Guide

EnrichVersion
6.3
EnrichProdName
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
task
Design and Development
EnrichPlatform
Talend ESB

In the route below we use Netty HTTP as a HTTP server, which returns back a hardcoded "Bye World" message.

from("netty-http:http://0.0.0.0:8080/foo")
  .transform().constant("Bye World");

And we can call this HTTP server using Camel also, with the ProducerTemplate as shown below:

String out = template.requestBody("netty-http:http://localhost:8080/foo", "Hello 
World", String.class);
System.out.println(out);

And we get back "Bye World" as the output.