an other step it works ;-) ... and failed ;-( thx willem, i am near but i still have a problem.
when i declare in the spring-bean.xml the route like that <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">--> <route> <from uri="restlet:http://127.0.0.1:9090/?restletMethods=POST,GET"/>--> <process ref="greeting"></process> </route>--> </camelContext> it works VERY VERY WELL 2010-02-10 13:37:25,334 : LogFilter.afterHandle : 2010-02-10 13:37:25 127.0.0.1 - - 9090 POST / - 200 35 35 0 http://127.0.0.1:9090 Jakarta Commons-HttpClient/3.1 - BUT if i declare like that : <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">--> <route> <from uri="restlet:http://127.0.0.1:9090/greeting?restletMethods=POST,GET"/>--> <process ref="greeting"></process> </route>--> </camelContext> it FAILS 2010-02-10 13:39:02,467 : LogFilter.afterHandle : 2010-02-10 13:39:02 127.0.0.1 - - 9090 POST / - 404 330 35 16 http://127.0.0.1:9090 Jakarta Commons-HttpClient/3.1 - who lost the uriPattern (/greeting) ? camel don't received it ? how investigate this ? (in the web.xml, i declare <servlet> <servlet-name>RestletServlet</servlet-name> <servlet-class> org.restlet.ext.servlet.ServerServlet </servlet-class> </servlet> <servlet-mapping> <servlet-name>RestletServlet</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> ) willem.jiang wrote: > > You didn't set the response message for the client. > Please check out the camel-restlet unit tests[1] for the working examples. > > [1]https://svn.apache.org/repos/asf/camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet > > Willem > > Tapdur wrote: >> hi willem >> >> i get one step forward >> >> for restlet engine : i use this dependencies >> >> <repositories> >> <repository> >> <id>maven-restlet</id> >> <name>Public online Restlet repository</name> >> <url>http://maven.restlet.org</url> >> </repository> >> </repositories> >> <dependencies> >> <dependency> >> <groupId>javax.xml.bind</groupId> >> <artifactId>jaxb-api</artifactId> >> <version>${jaxb-api.version}</version> >> </dependency> >> <dependency> >> <groupId>com.sun.xml.bind</groupId> >> <artifactId>jaxb-impl</artifactId> >> <version>${jaxb-impl.version}</version> >> </dependency> >> <dependency> >> <groupId>org.apache.camel</groupId> >> <artifactId>camel-core</artifactId> >> <version>${camel-version}</version> >> </dependency> >> <dependency> >> <groupId>org.apache.camel</groupId> >> <artifactId>camel-restlet</artifactId> >> <version>${camel-version}</version> >> </dependency> >> <dependency> >> <groupId>org.restlet.jee</groupId> >> <artifactId>org.restlet</artifactId> >> <version>2.0-M7</version> >> </dependency> >> <dependency> >> <groupId>org.restlet.jee</groupId> >> <artifactId>org.restlet.ext.servlet</artifactId> >> <version>2.0-M7</version> >> </dependency> >> <dependency> >> <groupId>org.restlet.jee</groupId> >> <artifactId>org.restlet.ext.spring</artifactId> >> <version>2.0-M7</version> >> </dependency> >> <dependency> >> <groupId>com.noelios.restlet</groupId> >> <artifactId>com.noelios.restlet</artifactId> >> <version>1.1.8</version> >> </dependency> >> <dependency> >> <groupId>com.noelios.restlet</groupId> >> <artifactId>com.noelios.restlet.ext.spring</artifactId> >> <version>1.1.8</version> >> </dependency> >> <dependency> >> <groupId>com.noelios.restlet</groupId> >> <artifactId>com.noelios.restlet.ext.servlet</artifactId> >> <version>1.1.8</version> >> </dependency> >> <dependency> >> <groupId>poc.camel.greeting</groupId> >> <artifactId>poc.camel.greeting</artifactId> >> <version>0.0.1-SNAPSHOT</version> >> </dependency> >> </dependencies> >> >> and the WEB-INF/web.xml : >> >> <servlet> >> <servlet-name>RestletServlet</servlet-name> >> <servlet-class> >> org.restlet.ext.servlet.ServerServlet >> </servlet-class> >> </servlet> >> >> <servlet-mapping> >> <servlet-name>RestletServlet</servlet-name> >> <url-pattern>/*</url-pattern> >> </servlet-mapping> >> >> >> and it works. >> >> back to camel : >> i declare in the spring-beans.xml : >> >> >> <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"> >> <route> >> <from >> uri="restlet:http://localhost:9090/poc.camel.enabler-0.0.1-SNAPSHOT?restletMethod=post"/> >> <to uri="file://c:/camellogs/logs.txt" /> >> </route> >> </camelContext> >> >> i change the port for restlet engine 9090 and no error at deploy time. >> >> >> then i send the client request : >> POST http://127.0.0.1:9090/poc.camel.enabler-0.0.1-SNAPSHOT >> <user> >> <name>Tapdur</name> >> </user> >> >> >> and it ... failed : 404 >> >> 2010-02-09 17:53:34,737 : StreamServerHelper.start : Starting the >> internal >> HTTP server >> 2010-02-09 17:53:34,768 : DefaultCamelContext.start : Apache Camel 2.1.0 >> (CamelContext:camel) started >> 2010-02-09 17:53:34,784 : ContextLoader.initWebApplicationContext : Root >> WebApplicationContext: initialization completed in 6795 ms >> 2010-02-09 17:53:34,784 : AbsJWebContainerServiceImpl.registerWar : War >> /C:/JOnAS-4.10.3/webapps/poc.camel.enabler-0.0.1-SNAPSHOT.war available >> at >> the context /poc.camel.enabler-0.0.1-SNAPSHOT. >> 2010-02-09 17:53:54,404 : LogFilter.afterHandle : 2010-02-09 17:53:54 >> 127.0.0.1 - - 9090 POST / - 404 330 >> 35 16 http://127.0.0.1:9090 Jakarta >> Commons-HttpClient/3.1 - >> >> >> so my question is how camel/restlet component configure the restlet >> engine >> to route toward him ? >> is it a restlet engine or a camel-restlet issue ? >> >> Thx >> >> Bruno >> >> >> >> >> >> >> willem.jiang wrote: >>> Can you try change the camel-restlet's endpoint uri to use other port ? >>> >>> Willem >>> >>> Tapdur wrote: >>>> hi i am trying to use camel-restlet component in a jonas/tomcat j2ee. >>>> i am getting mad with restlet depencies, does someone has alreday did >>>> that ? >>>> >>>> i use dependecies org.restlet and org.restlet.ext.servlet (and declare >>>> the >>>> RestletServlet in the web.xml) >>>> how to integrate Restlet servlet to camel ? via spring ? >>>> >>>> >>>> but at deploy time i always have the camel error msg : adress already >>>> bind >>>> in JVM. >>>> >>>> >>>> Thx >>>> Bruno >>>> >>> >>> >> > > > -- View this message in context: http://old.nabble.com/Restlet-in-a-webapp-tp27502117p27530675.html Sent from the Camel - Users mailing list archive at Nabble.com.