> > Great, this works. And I guess you meant that you would create one
> endpoint for each operation, right?
> For me it's more transparent - but you can do this like you want ;)
> Something like this would work as well
>
> from("restlet:http://localhost:9080/account/{id}?restletMethod=get,delete"
> )
> .setBody("${header.id}")
> .choice()
> .when(header("CamelHttpMethod").isEqualTo("get"))
> .to("bean://myService?method=get")
> .when(header("CamelHttpMethod").isEqualTo("delete"))
> .to("bean://myService?method=delete");
Maybe it is a terminology thing; for me, the above is one endpoint for all
operations; I prefer having several endpoints (all the separate from() calls),
one for each operation.
> > Oh, and this only works with restlet v1, right? I was unable to make
> Camel work with restlet v2.
>
> I worked only with v1, but with camel 2.7.0 v2 should work, too (see
> CAMEL-3701).
Great, I will upgrade to v2 when Camel 2.7 is out... Er... I just saw Camel 2.7
is already out. Time to upgrade!
> >> from("restlet:http://localhost:9080/account/{id}?restletMethod=get")
> >> .setBody("${header.id}")
> >> .to("bean://myService?method=get");
> > The only weird thing I am seeing is warnings such as:
> >
> > com.noelios.restlet.http.HttpConverter addAdditionalHeaders
> > WARNING: Addition of the standard header "User-Agent" is not allowed.
> > Please use the Restlet API instead.
> >
> > Any ideas?
>
> Here're the restlet header vars:
> http://wiki.restlet.org/docs_1.1/13-restlet/27-restlet/130-restlet.html
>
> I think this is the key to remove these warnings.
I am not sure what to make out of that page. I tried adding the following in
several parts of my route, but the warnings still appear:
<removeHeader headerName="User-Agent"/>
Any other suggestions?
--
Gonzalo Diethelm