Hi Federico, thanks for the reply and the pointers. I was looking at the ContextLoader code which is referenced in the web.xml to load the context file containing the routes. This loads the applicationContext.xml file. https://github.com/spring-projects/spring-framework/blob/main/spring-web/src/main/java/org/springframework/web/context/ContextLoader.java
This loader doesn't have any specific code to load the YAML file containing the routes. am I missing anything? Can you please help me on how to add routes in a YML that can be loaded by the contextLoader? any pointers are appreciated. On Fri, Jan 5, 2024 at 8:26 PM Federico Mariani < federico.mariani.1...@gmail.com> wrote: > Hi Rohan, > > There is some documentation on the camel website > https://camel.apache.org/components/4.0.x/others/yaml-dsl.html and you can > take a look at the tests as well, but I'd recommend you to try > https://karavan.space/ you can create your rest route graphically and > export the yaml that can be added to the project's resources and used as > is. > > Regards, > Federico > > Il giorno ven 5 gen 2024 alle ore 15:48 Rohan Emmanuel < > rohan.emmanue...@gmail.com> ha scritto: > > > hi, > > i am creating a web app containing camel routes using camel-spring xml > dsl > > containing REST dsl in applicationContext.xml(this is referred by > > configuring CamelHttpTransportServlet > > < > > > https://github.com/apache/camel/blob/main/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/CamelHttpTransportServlet.java > > > > > in web.xml )as mentioned in the snippet below and I deploy the web app > on > > Tomcat webserver to access the routes. > > > > can anyone please guide me if the same can be done using YAML DSL instead > > of xml? any pointers to the documentation example would be helpful. > Thanks. > > > > > > > > <camelContext id="organisation_endpoint" xmlns=" > > http://camel.apache.org/schema/spring"> > > <rest path="/organisation_endpoint"> > > <description>Route for the path /organisation_endpoint</description> > > > > <delete consumes="application/json" > type="com.x.xx.nonstop.commons.Request" > > outType="com.xx.x.commons.Response" produces="application/json" > > uri="/deleting/"> > > <description>Route for the verb DELETE:--> From /deleting/ to > > Destination 1. ( Process:dd345) </description> > > <responseMessage code="200" message="OK"/> > > <route id="organisation_endpoint-del"> > > <process > > ref="organisation_endpoint.delete.ddl2java"/> > > .... > > .... > > </route> > > </delete> > > </rest> > > </camelContext> > > -- > > Regards, > > Rohan Emmanuel > > > -- Regards, Rohan Emmanuel