After following the "Using the Restlet servlet within a webapp" documentation at http://camel.apache.org/restlet.html I refactored my Restlet endpoints by removing protocol, host and port. So from "restlet:http://host:port/path/{id}" to "restlet:/path/{id}". This works great when running in a servlet container.
However my JUnit tests no longer works since, the reason for this is that when using the applicationContext the protocol and host is set to null and port is defaulted to 80 in the org.apache.camel.component.restlet.RestletComponent.createEndpoint(String uri, String remaining, Map parameters). The only resolution that I know will work is to manipulate the URI by using "http://host:port" in test and "" otherwise. Any ideas is highly appreciated otherwise I will have to satisfy with manipulating the URIs. (I am using both the real applicationContext and a test applicationContext in my JUnit tests that extends CamelSpringTestSupport, and they have among other things a Spring context:property-override definition where I can put configuration). Looking at the JUnit tests in Camel source all routes are configured using "restlet:http://host" + portnum + "/path" for the camel-restlet component. Kind regards, Magnus
