Hi ,
    I am new to using Camel.I have written a program where i call a REST url
and display the output .I am getting 404 error .I am using apache tomcat
6.0.My code is 


package com.retrieve;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.component.http.HttpOperationFailedException;
import org.apache.camel.impl.DefaultCamelContext;

public class dataretrieval{

    int status = 0;
    String problemDescription = null;
    String Response=null;
    String details = null;
    String URL
="http://code.google.com/a/eclipselabs.org/p/restclient-tool/"; ;     
    CamelContext camel = new DefaultCamelContext();
    ProducerTemplate template = camel.createProducerTemplate();

                Exchange exchange = template.request(URL, new Processor() {
            public void process(Exchange exchange) throws Exception {
                //System.out.println("inside process");
             details = exchange.getOut().getBody(String.class);
             System.out.println(details);

            }
    });



--
View this message in context: 
http://camel.465427.n5.nabble.com/Calling-REST-services-and-displaying-output-tp5741504.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to