You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Brad Johnson <br...@mediadriver.com> on 2016/02/09 23:33:29 UTC

Re: Multiple consumers for the same endpoint is not allowed cxfrs vs rest dsl

Have you tried using a recipientList with appropriate header values.
Something like this:

            <recipientList>
                <simple>direct-vm:${header.operationName}</simple>
            </recipientList>

On Tue, Feb 9, 2016 at 3:55 PM, camel_case <cs...@remedypartners.com>
wrote:

> Needing to confirm, with cxfrs you can't use the same url and have the REST
> application choose the proper route based on the http method POST GET PUT
> DELETE.  With rest dsl you can because the method is part of the route, you
> have something like rest(url).get(etc
> I tried to cheat by dividing the same route between the route class and
> resource class but it didn't work.  Meaning I had route 1
> from("cxfrs://http://somecompany.com:8080/pathsegment1/pathsegment2/").
> and route 2
> from("cxfrs://http://somecompany.com:8080/pathsegment1/").
> and then in the resource file I had
> @GET
> String dummyMeth1(){return null;}
> and
> @GET
> @Path("pathsegment2?{myQueryParam}")
> String dummyMeth2(@QueryParam(myQueryParam) String queryParam) ){return
> null;}
>
> but this didn't work either.  The concept of calling the same url/uri for a
> service and having it apply the proper service method based on the http
> method type is not part of the cxfrs framework.  It must find a matching
> http method in the resource file, but it can't pick the route based on http
> method.  Of course it can't I assume, the resource file methods are
> separated from the route, so picking of the route is done before checking
> the resource file for a matching method.  Rest dsl as in rest(url).get ties
> the method to the route instead.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Multiple-consumers-for-the-same-endpoint-is-not-allowed-cxfrs-vs-rest-dsl-tp5777492.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>