0 Replies Latest reply on Oct 1, 2014 6:36 AM by Jackson Kaloli

    Apache-camel routing to remote http endpoint

    Jackson Kaloli Newbie

      I am quite new in apache camel and have been developing a test project to route some message to an http server that is running on my machine-although for production purposes this will be in a different machine. Now when I post messages through telnet to that server it works fine but when I route through camel I get the error failed to initialize connection, server disconnected. my code is below. Can someone tell me whether it is an issue with my routing or it is the message format that camel is sending out. I am using camel 2.13.2 as a standalone. Thanks



      public class MyRouteBuilder extends RouteBuilder {

          public void GetResponse() {
              System.out.println("Writing to server...");
              CamelContext context = new DefaultCamelContext();

              final String msg = "SECTOR,GCS/I,JKAB016/123123,222,DESCRIPTION::=\"camel sector\",SHORT.NAME::=\"integration\"";
              try {
                  context.addRoutes(new RouteBuilder() {
                      public void configure() {

                  ProducerTemplate template = context.createProducerTemplate();
                  template.sendBody("file://src/data/test", msg);

              } catch (Exception e) {