Hi,

How about use HttpUnit[1] to start a web container and using Spring to load the 
camel context?

[1]http://httpunit.sourceforge.net/  

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Tuesday, October 29, 2013 at 1:09 PM, CamelTyro wrote:

> Hello
> I met a problem when testing the restlet service, I config my restlet
> service by adding the following snippet in web.xml (http://web.xml):
>  
> <servlet>
> <servlet-name>RestletServlet</servlet-name>
> <servlet-class>org.restlet.ext.spring.SpringServerServlet</servlet-class>
> <init-param>
> <param-name>org.restlet.component</param-name>
> <param-value>RestletComponent</param-value>
> </init-param>
> </servlet>
>  
> <servlet-mapping>
> <servlet-name>RestletServlet</servlet-name>
> <url-pattern>/rs/*</url-pattern>
> </servlet-mapping>
> Then I config the router by using camel:restlet component by
> "restlet:/cis/querypatientInfo/{code}?restletMethods=post,get"
> I can access the service throught the url e.g.
> http://localhost:58080/myproject/rs/cis/querypatientInfo/634062 via browser
> The question is how can I test it by junit , without manually startup the
> web containner, does everybody met this problem? please provide me how to
> resolve it.  
> Thanks sincerely.
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/how-to-test-the-restlet-service-without-startup-web-containner-manually-tp5742339.html
> Sent from the Camel - Users mailing list archive at Nabble.com 
> (http://Nabble.com).



Reply via email to