You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2010/10/08 10:13:50 UTC

svn commit: r1005723 - in /camel/trunk/tests: camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/ camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/ camel-itest-osgi/src/test/resources/ camel-itest-osgi/src/test/resourc...

Author: davsclaus
Date: Fri Oct  8 08:13:49 2010
New Revision: 1005723

URL: http://svn.apache.org/viewvc?rev=1005723&view=rev
Log:
CAMEL-3126: Added restlet and cxf-rs integration tests.

Added:
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/CheckDomainAvailabilityRestResponse.java
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/CheckDomainAvailabilityResult.java
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/CheckDomainRequest.java   (with props)
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/DomainService.java   (with props)
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/Order.java   (with props)
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/Product.java   (with props)
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/RestletDomainServiceTest.java
    camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/restlet/
    camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/restlet/example/
    camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/restlet/example/camel-context.xml   (with props)
    camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/restlet/example/jaxb.index
    camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/
    camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/
    camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/CheckDomainAvailabilityRestResponse.java
    camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/CheckDomainAvailabilityResult.java
    camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/CheckDomainRequest.java   (with props)
    camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/DomainService.java   (with props)
    camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/Order.java   (with props)
    camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/Product.java   (with props)
    camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/RestletDomainServiceTest.java
    camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/restlet/
    camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/restlet/example/
    camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/restlet/example/RestletDomainServiceTest-context.xml   (with props)
    camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/restlet/example/jaxb.index
Modified:
    camel/trunk/tests/camel-itest/   (props changed)
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationSpringTestSupport.java
    camel/trunk/tests/camel-itest-osgi/src/test/resources/log4j.properties
    camel/trunk/tests/camel-itest/pom.xml

Propchange: camel/trunk/tests/camel-itest/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Oct  8 08:13:49 2010
@@ -6,3 +6,4 @@ target
 .settings
 eclipse-classes
 *.i??
+activemq-data

Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationSpringTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationSpringTestSupport.java?rev=1005723&r1=1005722&r2=1005723&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationSpringTestSupport.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationSpringTestSupport.java Fri Oct  8 08:13:49 2010
@@ -22,9 +22,7 @@ import org.apache.camel.spring.SpringCam
 import org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext;
 
 public abstract class OSGiIntegrationSpringTestSupport extends OSGiIntegrationTestSupport {
-    
     protected OsgiBundleXmlApplicationContext applicationContext;
-
     protected abstract OsgiBundleXmlApplicationContext createApplicationContext();
     
     @Override
@@ -37,7 +35,7 @@ public abstract class OSGiIntegrationSpr
         if (names.length == 1) {
             return (SpringCamelContext)applicationContext.getBean(names[0], SpringCamelContext.class);
         } else {
-            throw new RuntimeCamelException("can't create a right camel context from the application context"); 
+            throw new IllegalStateException("Exactly 1 bean of type SpringCamelContext expected but found " + names.length + " beans.");
         }
     }
 

Added: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/CheckDomainAvailabilityRestResponse.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/CheckDomainAvailabilityRestResponse.java?rev=1005723&view=auto
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/CheckDomainAvailabilityRestResponse.java (added)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/CheckDomainAvailabilityRestResponse.java Fri Oct  8 08:13:49 2010
@@ -0,0 +1,42 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.itest.osgi.restlet.example;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "CheckDomainResponse")
+public class CheckDomainAvailabilityRestResponse {
+    private String requestId;
+    private String responseBody;
+
+    public String getRequestId() {
+        return requestId;
+    }
+
+    public void setRequestId(String requestId) {
+        this.requestId = requestId;
+    }
+
+    public String getResponseBody() {
+        return responseBody;
+    }
+
+    public void setResponseBody(String responseBody) {
+        this.responseBody = responseBody;
+    }
+
+}

Added: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/CheckDomainAvailabilityResult.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/CheckDomainAvailabilityResult.java?rev=1005723&view=auto
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/CheckDomainAvailabilityResult.java (added)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/CheckDomainAvailabilityResult.java Fri Oct  8 08:13:49 2010
@@ -0,0 +1,42 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.itest.osgi.restlet.example;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "CheckDomainAvailabilityResult")
+public class CheckDomainAvailabilityResult {
+    private String requestId;
+    private String responseBody;
+
+    public String getRequestId() {
+        return requestId;
+    }
+
+    public void setRequestId(String requestId) {
+        this.requestId = requestId;
+    }
+
+    public String getResponseBody() {
+        return responseBody;
+    }
+
+    public void setResponseBody(String responseBody) {
+        this.responseBody = responseBody;
+    }
+
+}

Added: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/CheckDomainRequest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/CheckDomainRequest.java?rev=1005723&view=auto
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/CheckDomainRequest.java (added)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/CheckDomainRequest.java Fri Oct  8 08:13:49 2010
@@ -0,0 +1,59 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.itest.osgi.restlet.example;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "checkDomainRequest")
+public class CheckDomainRequest {
+    private long id;
+    private String name;
+    private String username;
+    private String password;
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+}

Propchange: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/CheckDomainRequest.java
------------------------------------------------------------------------------
    svn:executable = *

Added: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/DomainService.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/DomainService.java?rev=1005723&view=auto
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/DomainService.java (added)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/DomainService.java Fri Oct  8 08:13:49 2010
@@ -0,0 +1,58 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.itest.osgi.restlet.example;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Response;
+
+@Path("/domainservice/")
+public class DomainService {
+
+    public DomainService() {
+    }
+
+    @GET
+    @Path("/domains/{id}/")
+    @Produces("application/json")
+    public String getDomain(@PathParam("id") String id) {
+        return "{www.google.com}";
+    }
+
+    @PUT
+    @Path("/domains/")
+    @Produces("application/json")
+    public Response updateDomain(String domain) {
+        return Response.ok().build();
+    }
+
+    @POST
+    @Path("/domains/")
+    @Produces("application/xml")
+    public CheckDomainAvailabilityRestResponse addDomain(CheckDomainRequest request) {
+        CheckDomainAvailabilityRestResponse response = new CheckDomainAvailabilityRestResponse();
+
+        response.setRequestId(String.valueOf(request.getId()));
+        response.setResponseBody("OK");
+
+        return response;
+    }
+}

Propchange: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/DomainService.java
------------------------------------------------------------------------------
    svn:executable = *

Added: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/Order.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/Order.java?rev=1005723&view=auto
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/Order.java (added)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/Order.java Fri Oct  8 08:13:49 2010
@@ -0,0 +1,68 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package  org.apache.camel.itest.osgi.restlet.example;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "Order")
+public class Order {
+    private long id;
+    private String description;
+    private Map<Long, Product> products = new HashMap<Long, Product>();
+
+    public Order() {
+        init();
+    }
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String d) {
+        this.description = d;
+    }
+
+    @GET
+    @Path("products/{productId}/")
+    @Produces("application/xml")
+    public Product getProduct(@PathParam("productId")int productId) {
+        System.out.println("----invoking getProduct with id: " + productId);
+        Product p = products.get(new Long(productId));
+        return p;
+    }
+
+    final void init() {
+        Product p = new Product();
+        p.setId(323);
+        p.setDescription("product 323");
+        products.put(p.getId(), p);
+    }
+}

Propchange: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/Order.java
------------------------------------------------------------------------------
    svn:executable = *

Added: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/Product.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/Product.java?rev=1005723&view=auto
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/Product.java (added)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/Product.java Fri Oct  8 08:13:49 2010
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.itest.osgi.restlet.example;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "Product")
+public class Product {
+    private long id;
+    private String description;
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String d) {
+        this.description = d;
+    }
+}

Propchange: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/Product.java
------------------------------------------------------------------------------
    svn:executable = *

Added: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/RestletDomainServiceTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/RestletDomainServiceTest.java?rev=1005723&view=auto
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/RestletDomainServiceTest.java (added)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/restlet/example/RestletDomainServiceTest.java Fri Oct  8 08:13:49 2010
@@ -0,0 +1,89 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.itest.osgi.restlet.example;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.itest.osgi.OSGiIntegrationSpringTestSupport;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.Configuration;
+import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+import org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext;
+
+import static org.ops4j.pax.exam.CoreOptions.equinox;
+import static org.ops4j.pax.exam.CoreOptions.felix;
+import static org.ops4j.pax.exam.CoreOptions.options;
+import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.profile;
+import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
+import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.workingDirectory;
+
+/**
+ * @version $Revision$
+ */
+@RunWith(JUnit4TestRunner.class)
+@Ignore("PaxExam hang on shutdown of this test")
+public class RestletDomainServiceTest extends OSGiIntegrationSpringTestSupport {
+
+    @Override
+    protected OsgiBundleXmlApplicationContext createApplicationContext() {
+        return new OsgiBundleXmlApplicationContext(new String[]{"org/apache/camel/itest/osgi/restlet/example/camel-context.xml"});
+    }
+
+    @Test
+    public void testAddDomain() throws Exception {
+        String input = "<checkDomainRequest><id>123</id><name>www.google.com</name><username>test</username><password>test</password></checkDomainRequest>";
+
+        String response = template.requestBodyAndHeader("restlet:http://localhost:9000/domainservice/domains?restletMethod=POST",
+                input, Exchange.CONTENT_TYPE, "application/xml", String.class);
+
+        log.info("Response: " + response);
+
+        assertNotNull(response);
+        assertTrue("Should contains response", response.endsWith("<CheckDomainResponse><requestId>123</requestId><responseBody>OK</responseBody></CheckDomainResponse>"));
+    }
+
+    @Test
+    public void testGetDomain() throws Exception {
+        String response = template.requestBody("restlet:http://localhost:9000/domainservice/domains/123?restletMethod=GET", null, String.class);
+        log.info("Response: " + response);
+
+        assertEquals("{www.google.com}", response);
+    }
+
+    @Configuration
+    public static Option[] configure() {
+        Option[] options = options(
+
+            // install the spring dm profile
+            profile("spring.dm").version("1.2.0"),
+            // this is how you set the default log level when using pax logging (logProfile)
+            org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
+
+            // using the features to install the camel components
+            scanFeatures(getCamelKarafFeatureUrl(),
+                    "camel-core", "camel-spring", "camel-test", "camel-cxf", "camel-restlet"),
+
+            workingDirectory("target/paxrunner/"),
+
+            felix(), equinox());
+
+        return options;
+    }
+
+}

Modified: camel/trunk/tests/camel-itest-osgi/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/resources/log4j.properties?rev=1005723&r1=1005722&r2=1005723&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/resources/log4j.properties (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/resources/log4j.properties Fri Oct  8 08:13:49 2010
@@ -24,7 +24,10 @@ log4j.rootLogger=INFO, out
 #log4j.logger.org.apache.camel=DEBUG
 
 log4j.logger.org.apache.activemq.spring=WARN
+
 #log4j.logger.org.ops4j.pax=DEBUG
+# is very noisy at INFO level
+log4j.logger.org.ops4j.io=WARN
 
 # CONSOLE appender not used by default
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender

Added: camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/restlet/example/camel-context.xml
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/restlet/example/camel-context.xml?rev=1005723&view=auto
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/restlet/example/camel-context.xml (added)
+++ camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/restlet/example/camel-context.xml Fri Oct  8 08:13:49 2010
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:jaxrs="http://cxf.apache.org/jaxrs"
+       xsi:schemaLocation="
+        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+        http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
+        http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd">
+
+    <import resource="classpath:META-INF/cxf/cxf.xml"/>
+    <import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"/>
+    <import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml"/>
+    <!-- we use Jetty which works -->
+    <!--<import resource="classpath:META-INF/cxf/cxf-extension-http.xml"/>-->
+    <!--<import resource="classpath:META-INF/cxf/osgi/cxf-extension-osgi.xml"/>-->
+
+    <!-- setup REST server -->
+    <jaxrs:server id="domainService" address="http://localhost:9000/">
+        <jaxrs:serviceBeans>
+            <ref bean="domainSvc"/>
+        </jaxrs:serviceBeans>
+    </jaxrs:server>
+
+    <camelContext xmlns="http://camel.apache.org/schema/spring">
+        <!-- no routes needed -->
+    </camelContext>
+
+    <bean id="domainSvc" class="org.apache.camel.itest.osgi.restlet.example.DomainService"/>
+
+</beans>

Propchange: camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/restlet/example/camel-context.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/restlet/example/jaxb.index
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/restlet/example/jaxb.index?rev=1005723&view=auto
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/restlet/example/jaxb.index (added)
+++ camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/restlet/example/jaxb.index Fri Oct  8 08:13:49 2010
@@ -0,0 +1,21 @@
+## ------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ------------------------------------------------------------------------
+CheckDomainAvailabilityRestResponse
+CheckDomainAvailabilityResult
+CheckDomainRequest
+Order
+Product

Modified: camel/trunk/tests/camel-itest/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/pom.xml?rev=1005723&r1=1005722&r2=1005723&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/pom.xml (original)
+++ camel/trunk/tests/camel-itest/pom.xml Fri Oct  8 08:13:49 2010
@@ -31,6 +31,14 @@
     <name>Camel :: Integration Tests</name>
     <description>Performs cross component integration tests</description>
 
+    <repositories>
+        <repository>
+            <id>maven-restlet</id>
+            <name>Public online Restlet repository</name>
+            <url>http://maven.restlet.org</url>
+        </repository>
+    </repositories>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.camel</groupId>
@@ -91,6 +99,25 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel</groupId>
+            <artifactId>camel-restlet</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <!-- restlet engine -->
+        <dependency>
+          <groupId>com.noelios.restlet</groupId>
+          <artifactId>com.noelios.restlet</artifactId>
+          <version>${restlet-version}</version>
+          <scope>test</scope>
+        </dependency>
+        <!-- restlet JAXB binding -->
+        <dependency>
+            <groupId>org.restlet</groupId>
+            <artifactId>org.restlet.ext.jaxb</artifactId>
+            <version>${restlet-version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
             <artifactId>camel-spring-security</artifactId>
             <scope>test</scope>
         </dependency>

Added: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/CheckDomainAvailabilityRestResponse.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/CheckDomainAvailabilityRestResponse.java?rev=1005723&view=auto
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/CheckDomainAvailabilityRestResponse.java (added)
+++ camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/CheckDomainAvailabilityRestResponse.java Fri Oct  8 08:13:49 2010
@@ -0,0 +1,42 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.itest.restlet.example;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "CheckDomainResponse")
+public class CheckDomainAvailabilityRestResponse {
+    private String requestId;
+    private String responseBody;
+
+    public String getRequestId() {
+        return requestId;
+    }
+
+    public void setRequestId(String requestId) {
+        this.requestId = requestId;
+    }
+
+    public String getResponseBody() {
+        return responseBody;
+    }
+
+    public void setResponseBody(String responseBody) {
+        this.responseBody = responseBody;
+    }
+
+}

Added: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/CheckDomainAvailabilityResult.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/CheckDomainAvailabilityResult.java?rev=1005723&view=auto
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/CheckDomainAvailabilityResult.java (added)
+++ camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/CheckDomainAvailabilityResult.java Fri Oct  8 08:13:49 2010
@@ -0,0 +1,42 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.itest.restlet.example;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "CheckDomainAvailabilityResult")
+public class CheckDomainAvailabilityResult {
+    private String requestId;
+    private String responseBody;
+
+    public String getRequestId() {
+        return requestId;
+    }
+
+    public void setRequestId(String requestId) {
+        this.requestId = requestId;
+    }
+
+    public String getResponseBody() {
+        return responseBody;
+    }
+
+    public void setResponseBody(String responseBody) {
+        this.responseBody = responseBody;
+    }
+
+}

Added: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/CheckDomainRequest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/CheckDomainRequest.java?rev=1005723&view=auto
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/CheckDomainRequest.java (added)
+++ camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/CheckDomainRequest.java Fri Oct  8 08:13:49 2010
@@ -0,0 +1,59 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.itest.restlet.example;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "checkDomainRequest")
+public class CheckDomainRequest {
+    private long id;
+    private String name;
+    private String username;
+    private String password;
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+}

Propchange: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/CheckDomainRequest.java
------------------------------------------------------------------------------
    svn:executable = *

Added: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/DomainService.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/DomainService.java?rev=1005723&view=auto
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/DomainService.java (added)
+++ camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/DomainService.java Fri Oct  8 08:13:49 2010
@@ -0,0 +1,58 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.itest.restlet.example;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Response;
+
+@Path("/domainservice/")
+public class DomainService {
+
+    public DomainService() {
+    }
+
+    @GET
+    @Path("/domains/{id}/")
+    @Produces("application/json")
+    public String getDomain(@PathParam("id") String id) {
+        return "{www.google.com}";
+    }
+
+    @PUT
+    @Path("/domains/")
+    @Produces("application/json")
+    public Response updateDomain(String domain) {
+        return Response.ok().build();
+    }
+
+    @POST
+    @Path("/domains/")
+    @Produces("application/xml")
+    public CheckDomainAvailabilityRestResponse addDomain(CheckDomainRequest request) {
+        CheckDomainAvailabilityRestResponse response = new CheckDomainAvailabilityRestResponse();
+
+        response.setRequestId(String.valueOf(request.getId()));
+        response.setResponseBody("OK");
+
+        return response;
+    }
+}

Propchange: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/DomainService.java
------------------------------------------------------------------------------
    svn:executable = *

Added: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/Order.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/Order.java?rev=1005723&view=auto
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/Order.java (added)
+++ camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/Order.java Fri Oct  8 08:13:49 2010
@@ -0,0 +1,68 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package  org.apache.camel.itest.restlet.example;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "Order")
+public class Order {
+    private long id;
+    private String description;
+    private Map<Long, Product> products = new HashMap<Long, Product>();
+
+    public Order() {
+        init();
+    }
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String d) {
+        this.description = d;
+    }
+
+    @GET
+    @Path("products/{productId}/")
+    @Produces("application/xml")
+    public Product getProduct(@PathParam("productId")int productId) {
+        System.out.println("----invoking getProduct with id: " + productId);
+        Product p = products.get(new Long(productId));
+        return p;
+    }
+
+    final void init() {
+        Product p = new Product();
+        p.setId(323);
+        p.setDescription("product 323");
+        products.put(p.getId(), p);
+    }
+}

Propchange: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/Order.java
------------------------------------------------------------------------------
    svn:executable = *

Added: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/Product.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/Product.java?rev=1005723&view=auto
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/Product.java (added)
+++ camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/Product.java Fri Oct  8 08:13:49 2010
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.itest.restlet.example;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "Product")
+public class Product {
+    private long id;
+    private String description;
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String d) {
+        this.description = d;
+    }
+}

Propchange: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/Product.java
------------------------------------------------------------------------------
    svn:executable = *

Added: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/RestletDomainServiceTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/RestletDomainServiceTest.java?rev=1005723&view=auto
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/RestletDomainServiceTest.java (added)
+++ camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/RestletDomainServiceTest.java Fri Oct  8 08:13:49 2010
@@ -0,0 +1,54 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.itest.restlet.example;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.ProducerTemplate;
+import org.junit.Assert;
+import org.junit.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
+
+/**
+ * @version $Revision$
+ */
+@ContextConfiguration
+public class RestletDomainServiceTest extends AbstractJUnit4SpringContextTests {
+
+    @Autowired
+    protected ProducerTemplate template;
+
+    @Test
+    public void testAddDomain() throws Exception {
+        String input = "<checkDomainRequest><id>123</id><name>www.google.com</name><username>test</username><password>test</password></checkDomainRequest>";
+
+        String response = template.requestBodyAndHeader("restlet:http://localhost:9000/domainservice/domains?restletMethod=POST",
+                input, Exchange.CONTENT_TYPE, "application/xml", String.class);
+
+        Assert.assertNotNull(response);
+        Assert.assertTrue("Should contains response", response.endsWith("<CheckDomainResponse><requestId>123</requestId><responseBody>OK</responseBody></CheckDomainResponse>"));
+    }
+
+    @Test
+    public void testGetDomain() throws Exception {
+        String response = template.requestBody("restlet:http://localhost:9000/domainservice/domains/123?restletMethod=GET", null, String.class);
+
+        Assert.assertEquals("{www.google.com}", response);
+    }
+
+}

Added: camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/restlet/example/RestletDomainServiceTest-context.xml
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/restlet/example/RestletDomainServiceTest-context.xml?rev=1005723&view=auto
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/restlet/example/RestletDomainServiceTest-context.xml (added)
+++ camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/restlet/example/RestletDomainServiceTest-context.xml Fri Oct  8 08:13:49 2010
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:jaxrs="http://cxf.apache.org/jaxrs"
+       xsi:schemaLocation="
+        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+        http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
+        http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd">
+
+    <import resource="classpath:META-INF/cxf/cxf.xml"/>
+    <import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"/>
+    <import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml"/>
+
+    <!--<bean id="domainService" class="org.apache.camel.itest.restlet.example.DomainService"/>-->
+
+    <!-- setup REST server -->
+    <jaxrs:server id="domainServiceRest" address="http://localhost:9000/">
+        <jaxrs:serviceBeans>
+            <bean class="org.apache.camel.itest.restlet.example.DomainService"/>
+        </jaxrs:serviceBeans>
+    </jaxrs:server>
+
+    <camelContext xmlns="http://camel.apache.org/schema/spring">
+        <!-- no routes needed -->
+    </camelContext>
+
+
+</beans>

Propchange: camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/restlet/example/RestletDomainServiceTest-context.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/restlet/example/jaxb.index
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/restlet/example/jaxb.index?rev=1005723&view=auto
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/restlet/example/jaxb.index (added)
+++ camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/restlet/example/jaxb.index Fri Oct  8 08:13:49 2010
@@ -0,0 +1,21 @@
+## ------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ------------------------------------------------------------------------
+CheckDomainAvailabilityRestResponse
+CheckDomainAvailabilityResult
+CheckDomainRequest
+Order
+Product