Modified: websites/production/camel/content/rest-dsl.html ============================================================================== --- websites/production/camel/content/rest-dsl.html (original) +++ websites/production/camel/content/rest-dsl.html Mon Sep 28 06:18:44 2015 @@ -85,7 +85,7 @@ <tbody> <tr> <td valign="top" width="100%"> -<div class="wiki-content maincontent"><h2 id="RestDSL-RestDSL">Rest DSL</h2><p><strong>Available as of Camel 2.14</strong></p><p>Apache Camel offers a REST styled DSL which can be used with Java or XML. The intention is to allow end users to define REST services using a REST style with verbs such as get, post, delete etc.</p><h4 id="RestDSL-Howitworks">How it works</h4><p>The Rest DSL is a facade that builds <a shape="rect" href="rest.html">Rest</a> endpoints as consumers for Camel routes. The actual REST transport is leveraged by using Camel REST components such as <a shape="rect" href="restlet.html">Restlet</a>, <a shape="rect" href="spark-rest.html">Spark-rest</a>, and others that has native REST integration.</p><h3 id="RestDSL-ComponentssupportingRestDSL">Components supporting Rest DSL</h3><p>The following Camel components supports the Rest DSL. See the bottom of this page for how to integrate a component with the Rest DSL.</p><ul><li><a shape="rect" href="netty-h ttp.html">camel-netty-http</a></li><li><a shape="rect" href="jetty.html">camel-jetty</a></li><li><a shape="rect" href="restlet.html">camel-restlet</a></li><li><a shape="rect" href="servlet.html">camel-servlet</a></li><li><a shape="rect" href="spark-rest.html">camel-spark-rest</a></li></ul><h3 id="RestDSL-RestDSLwithJava">Rest DSL with Java</h3><p>To use the Rest DSL in Java then just do as with regular Camel routes by extending the <code>RouteBuilder</code> and define the routes in the <code>configure</code> method.</p><p>A simple REST service can be define as follows, where we use rest() to define the services as shown below:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<div class="wiki-content maincontent"><h2 id="RestDSL-RestDSL">Rest DSL</h2><p><strong>Available as of Camel 2.14</strong></p><p>Apache Camel offers a REST styled DSL which can be used with Java or XML. The intention is to allow end users to define REST services using a REST style with verbs such as get, post, delete etc.</p><h4 id="RestDSL-Howitworks">How it works</h4><p>The Rest DSL is a facade that builds <a shape="rect" href="rest.html">Rest</a> endpoints as consumers for Camel routes. The actual REST transport is leveraged by using Camel REST components such as <a shape="rect" href="restlet.html">Restlet</a>, <a shape="rect" href="spark-rest.html">Spark-rest</a>, and others that has native REST integration.</p><h3 id="RestDSL-ComponentssupportingRestDSL">Components supporting Rest DSL</h3><p>The following Camel components supports the Rest DSL. See the bottom of this page for how to integrate a component with the Rest DSL.</p><ul><li>camel-coap</li><li><a shape=" rect" href="netty-http.html">camel-netty-http</a></li><li><a shape="rect" href="netty4-http.html">camel-netty4-http</a></li><li><a shape="rect" href="jetty.html">camel-jetty</a></li><li><a shape="rect" href="restlet.html">camel-restlet</a></li><li><a shape="rect" href="servlet.html">camel-servlet</a></li><li><a shape="rect" href="spark-rest.html">camel-spark-rest</a></li></ul><h3 id="RestDSL-RestDSLwithJava">Rest DSL with Java</h3><p>To use the Rest DSL in Java then just do as with regular Camel routes by extending the <code>RouteBuilder</code> and define the routes in the <code>configure</code> method.</p><p>A simple REST service can be define as follows, where we use rest() to define the services as shown below:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[ protected RouteBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { @Override