[
https://issues.apache.org/jira/browse/CAMEL-8422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Glen Collins closed CAMEL-8422.
-------------------------------
Resolution: Duplicate
Fix Version/s: 2.14.1
duplicate. Upgraded to new version and works fine.
> Rest DSL not resolving same endpoint with different methods
> -----------------------------------------------------------
>
> Key: CAMEL-8422
> URL: https://issues.apache.org/jira/browse/CAMEL-8422
> Project: Camel
> Issue Type: Bug
> Components: camel-servlet
> Affects Versions: 2.14.0
> Reporter: Glen Collins
> Fix For: 2.14.1
>
>
> Using the Java REST DSL we are having problems setting up a route for all
> HTTP methods using the same endpoint. It seems that when we use the same URL
> for the delete, post and put only the Delete method actually works. In the
> below example the GET and DELETE work fine but the PUT and POST do not. If we
> change these to be unique URL's they then work.
> Route
> rest("/registrations")
> .get("/").to("direct:listRegistration")
> .delete("/{id}").to("direct:deleteRegistration")
> .post("/{id}").to("direct:createRegistration")
> .put("/{id}").to("direct:updateRegistation");
> web.xml
> <!-- Camel servlet -->
> <servlet>
> <servlet-name>CamelServlet</servlet-name>
>
> <servlet-class>org.apache.camel.component.servlet.CamelHttpTransportServlet</servlet-class>
> <load-on-startup>1</load-on-startup>
> </servlet>
>
> <!-- Camel servlet mapping -->
> <servlet-mapping>
> <servlet-name>CamelServlet</servlet-name>
> <url-pattern>/camel/*</url-pattern>
> </servlet-mapping>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)