Here's code I use to expose a REST url externally to an internal REST service.

        from(BASE_URI + "/doctor?bindingStyle=SimpleConsumer&resourceClasses=" 
+ DoctorLookupService.class.getName())
          .setHeader(Exchange.HTTP_URI,
                 
simple("http://my.company.com/CT/GetContact.svc/npi/${header.npi}";))
            .setHeader("Authorization", simple("Basic foobarred="))
            .setHeader("CamelHttpPath", simple(""))
            .to("http://igetoverridden.com?throwExceptionOnFailure=false";);

Just use the http(4) component and set the appropriate URL. In my case it's 
dynamic so I stuff it in the header and that overrides the one in the .to

On Sep 30, 2013, at 1:49 PM, vjboston <[email protected]> wrote:

> 
> Can somebody share a sample code for invoking an remote restful service.
> I tried it with following code 

Reply via email to