You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Tracy Snell <ts...@gmail.com> on 2013/10/01 19:31:18 UTC
Re: Invoking remote RESTful services urgent !!
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 <vj...@gmail.com> wrote:
>
> Can somebody share a sample code for invoking an remote restful service.
> I tried it with following code