You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Scott Stroud <Sc...@marklogic.com> on 2015/09/02 15:36:50 UTC

REST (DSL) in ?

Is the <rest> declaration only supported in the <camelContext> (in Spring DSL)?  And not the RouteContext?  If not, is there any plan to support <rest> in the <routeContext>?

I believe its a very common approach to define routes into (domain) specific files and then import them into the camel-context via Spring, then use a <routeContextRef> to include them in the <camel-context> and it would be desirable to be able to define those <rest> routes in those (domain) specific route files.  Im using Camel 2.15.3.  Thanks.








Re: REST (DSL) in ?

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

There is a <restContextRef> you can use and then define the rest-dsl
in the xml files such as

<rests xmlns="http://camel.apache.org/schema/spring"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <rest path="/users">
    <get uri="/view/{id}">
      <to uri="direct:getUser"/>
    </get>
  </rest>

</rests>

On Wed, Sep 2, 2015 at 3:36 PM, Scott Stroud <Sc...@marklogic.com> wrote:
> Is the <rest> declaration only supported in the <camelContext> (in Spring
> DSL)?  And not the RouteContext?  If not, is there any plan to support
> <rest> in the <routeContext>?
>
> I believe its a very common approach to define routes into (domain) specific
> files and then import them into the camel-context via Spring, then use a
> <routeContextRef> to include them in the <camel-context> and it would be
> desirable to be able to define those <rest> routes in those (domain)
> specific route files.  Im using Camel 2.15.3.  Thanks.
>
>
>
>
>
>



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2nd edition: http://www.manning.com/ibsen2

Re: REST (DSL) in ?

Posted by Raul Kripalani <ra...@evosent.com>.
Hi,

Could you please open a JIRA [1] ticket for this improvement?

[1] https://issues.apache.org/jira/browse/CAMEL

Thanks,

*Raúl Kripalani*
Apache Camel PMC Member & Committer | Enterprise Architect, Open Source
Integration specialist
http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
http://blog.raulkr.net | twitter: @raulvk

On Wed, Sep 2, 2015 at 2:36 PM, Scott Stroud <Sc...@marklogic.com>
wrote:

> Is the <rest> declaration only supported in the <camelContext> (in Spring
> DSL)?  And not the RouteContext?  If not, is there any plan to support
> <rest> in the <routeContext>?
>
> I believe its a very common approach to define routes into (domain)
> specific files and then import them into the camel-context via Spring, then
> use a <routeContextRef> to include them in the <camel-context> and it would
> be desirable to be able to define those <rest> routes in those (domain)
> specific route files.  Im using Camel 2.15.3.  Thanks.
>
>
>
>
>
>
>