You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Mark <el...@gmail.com> on 2016/06/08 03:51:48 UTC
REST DSL bind mode per endpoint
I have a REST API that ingests XML via a POST endpoint and I also have an
endpoint that will produce text/plain via GET. Is it possible to have the
POST endpoint use JAXB and the GET endpoint produce text/plain? So for
instance, I would like to have the following:
<rest path="/data">
<post uri="/upload" consumes="application/xml" type="com.a.b.c.TestDocument"
>
<to uri="direct:upload" />
</post>
<get uri="/status">
<description>Status service</description>
<route>
<process ref="StatsGenerator" />
</route>
</get>
</rest>
Re: REST DSL bind mode per endpoint
Posted by Mark <el...@gmail.com>.
figured it out. You can specify this per get/post..etc.
On Tue, Jun 7, 2016 at 11:51 PM, Mark <el...@gmail.com> wrote:
> I have a REST API that ingests XML via a POST endpoint and I also have an
> endpoint that will produce text/plain via GET. Is it possible to have the
> POST endpoint use JAXB and the GET endpoint produce text/plain? So for
> instance, I would like to have the following:
>
> <rest path="/data">
>
> <post uri="/upload" consumes="application/xml" type=
> "com.a.b.c.TestDocument">
> <to uri="direct:upload" />
> </post>
>
> <get uri="/status">
> <description>Status service</description>
> <route>
> <process ref="StatsGenerator" />
> </route>
> </get>
>
> </rest>
>