Author: buildbot Date: Mon Jul 21 08:17:58 2014 New Revision: 916926 Log: Production update by buildbot for camel
Added: websites/production/camel/content/rest.html Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/component-list.html websites/production/camel/content/components.html websites/production/camel/content/dsl.html websites/production/camel/content/spark-rest.html websites/production/camel/content/transport.html websites/production/camel/content/uris.html Modified: websites/production/camel/content/cache/main.pageCache ============================================================================== Binary files - no diff available. Modified: websites/production/camel/content/component-list.html ============================================================================== --- websites/production/camel/content/component-list.html (original) +++ websites/production/camel/content/component-list.html Mon Jul 21 08:17:58 2014 @@ -408,7 +408,9 @@ disruptor-vm:someName[?<option>] </div></div></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Component for integrating with RabbitMQ</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="ref.html">Ref</a> / camel-core</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="theme: Default; brush: plain; gutter: false" type="syntaxhighlighter"><![CDATA[ref:name ]]></script> -</div></div></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Component for lookup of existing endpoints bound in the <a shape="rect" href="registry.html">Registry</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="restlet.html">Restlet</a> / camel-restlet</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Component for lookup of existing endpoints bound in the <a shape="rect" href="registry.html">Registry</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="rest.html">Rest</a> / camel-core</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: plain; gutter: false" type="syntaxhighlighter"><![CDATA[rest:verb:path[?options]]]></script> +</div></div></td><td colspan="1" rowspan="1" class="confluenceTd">Component for consuming Restful resources supporting the <a shape="rect" href="component-list.html">Rest DSL</a> and plugins to other Camel rest components.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="restlet.html">Restlet</a> / camel-restlet</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="theme: Default; brush: plain; gutter: false" type="syntaxhighlighter"><![CDATA[restlet:restletUrl[?options] ]]></script> </div></div></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Component for consuming and producing Restful resources using <a shape="rect" class="external-link" href="http://www.restlet.org" rel="nofollow">Restlet</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="rmi.html">RMI</a> / camel-rmi</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> Modified: websites/production/camel/content/components.html ============================================================================== --- websites/production/camel/content/components.html (original) +++ websites/production/camel/content/components.html Mon Jul 21 08:17:58 2014 @@ -417,7 +417,9 @@ disruptor-vm:someName[?<option>] </div></div></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Component for integrating with RabbitMQ</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="ref.html">Ref</a> / camel-core</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="theme: Default; brush: plain; gutter: false" type="syntaxhighlighter"><![CDATA[ref:name ]]></script> -</div></div></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Component for lookup of existing endpoints bound in the <a shape="rect" href="registry.html">Registry</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="restlet.html">Restlet</a> / camel-restlet</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Component for lookup of existing endpoints bound in the <a shape="rect" href="registry.html">Registry</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="rest.html">Rest</a> / camel-core</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: plain; gutter: false" type="syntaxhighlighter"><![CDATA[rest:verb:path[?options]]]></script> +</div></div></td><td colspan="1" rowspan="1" class="confluenceTd">Component for consuming Restful resources supporting the <a shape="rect" href="component-list.html">Rest DSL</a> and plugins to other Camel rest components.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="restlet.html">Restlet</a> / camel-restlet</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="theme: Default; brush: plain; gutter: false" type="syntaxhighlighter"><![CDATA[restlet:restletUrl[?options] ]]></script> </div></div></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Component for consuming and producing Restful resources using <a shape="rect" class="external-link" href="http://www.restlet.org" rel="nofollow">Restlet</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="rmi.html">RMI</a> / camel-rmi</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> Modified: websites/production/camel/content/dsl.html ============================================================================== --- websites/production/camel/content/dsl.html (original) +++ websites/production/camel/content/dsl.html Mon Jul 21 08:17:58 2014 @@ -75,22 +75,7 @@ <tbody> <tr> <td valign="top" width="100%"> -<div class="wiki-content maincontent"><h2 id="DSL-DSL">DSL</h2> - -<p>Camel uses a Java <em>Domain Specific Language</em> or DSL for creating <a shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a> or <a shape="rect" href="routes.html">Routes</a> in a variety of domain-specific languages (DSL) as listed below.</p> -<ul><li><a shape="rect" href="java-dsl.html">Java DSL</a> - A Java based DSL using the fluent builder style.</li><li><a shape="rect" href="spring.html">Spring XML</a> - A XML based DSL in Spring XML files</li><li><a shape="rect" href="using-osgi-blueprint-with-camel.html">Blueprint XML</a> - A XML based DSL in OSGi Blueprint XML files</li><li><a shape="rect" href="groovy-dsl.html">Groovy DSL</a> - A Groovy based DSL using Groovy programming language</li><li><a shape="rect" href="scala-dsl.html">Scala DSL</a> - A Scala based DSL using Scala programming language</li><li><a shape="rect" href="bean-integration.html">Annotation DSL</a> - Use annotations in Java beans.</li><li><a shape="rect" class="external-link" href="https://github.com/koolio/kool/tree/master/kool-camel" rel="nofollow">Kotlin DSL</a> - <strong>Work in progress</strong> - Currently developed outside ASF, but will we included later in Camel when Kotlin and the DSL is ready.</li></ul> - - -<p>The main entry points for the DSL are</p> - -<ul><li><a shape="rect" href="camelcontext.html">CamelContext</a> for creating a Camel routing rulebase</li><li><a shape="rect" href="routebuilder.html">RouteBuilder</a> for creating a collection of routes using the routing DSL</li></ul> - - -<h3 id="DSL-SeeAlso">See Also</h3> - -<p>For more examples of the DSL in action see</p> - -<ul><li><a shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a></li><li><a shape="rect" href="examples.html">Examples</a></li><li><a shape="rect" href="routes.html">Routes</a></li></ul></div> +<div class="wiki-content maincontent"><h2 id="DSL-DSL">DSL</h2><p>Camel uses a Java <em>Domain Specific Language</em> or DSL for creating <a shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a> or <a shape="rect" href="routes.html">Routes</a> in a variety of domain-specific languages (DSL) as listed below.</p><ul><li><a shape="rect" href="java-dsl.html">Java DSL</a> - A Java based DSL using the fluent builder style.</li><li><a shape="rect" href="spring.html">Spring XML</a> - A XML based DSL in Spring XML files</li><li><a shape="rect" href="using-osgi-blueprint-with-camel.html">Blueprint XML</a> - A XML based DSL in OSGi Blueprint XML files</li><li>Rest DSL - A DSL to define REST services using a REST style in either Java or XML.</li><li><a shape="rect" href="groovy-dsl.html">Groovy DSL</a> - A Groovy based DSL using Groovy programming language</li><li><a shape="rect" href="scala-dsl.html">Scala DSL</a> - A Scala based DSL using Scala programmi ng language</li><li><a shape="rect" href="bean-integration.html">Annotation DSL</a> - Use annotations in Java beans.</li><li><a shape="rect" class="external-link" href="https://github.com/koolio/kool/tree/master/kool-camel" rel="nofollow">Kotlin DSL</a> - <strong>Work in progress</strong> - Currently developed outside ASF, but will we included later in Camel when Kotlin and the DSL is ready.</li></ul><p>The main entry points for the DSL are</p><ul><li><a shape="rect" href="camelcontext.html">CamelContext</a> for creating a Camel routing rulebase</li><li><a shape="rect" href="routebuilder.html">RouteBuilder</a> for creating a collection of routes using the routing DSL</li></ul><h3 id="DSL-SeeAlso">See Also</h3><p>For more examples of the DSL in action see</p><ul><li><a shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a></li><li><a shape="rect" href="examples.html">Examples</a></li><li><a shape="rect" href="routes.html">Routes</a></li></ul></di v> </td> <td valign="top"> <div class="navigation"> Added: websites/production/camel/content/rest.html ============================================================================== --- websites/production/camel/content/rest.html (added) +++ websites/production/camel/content/rest.html Mon Jul 21 08:17:58 2014 @@ -0,0 +1,169 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- + + 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. +--> +<html> +<head> + <link href="//camel.apache.org/styles/site.css" rel="stylesheet" type="text/css"> + <link href="//camel.apache.org/styles/type-settings.css" rel="stylesheet" type="text/css"> + <script src="//camel.apache.org/styles/prototype.js" type="text/javascript"></script> + <script src="//camel.apache.org/styles/rico.js" type="text/javascript"></script> + <script src="//camel.apache.org/styles/site.js" type="text/javascript"></script> + + <meta http-equiv="Content-type" content="text/html;charset=UTF-8"> + + <style type="text/css"> + .maincontent { overflow:hidden; } + </style> + <!--[if IE]> + <style type="text/css"> + .maincontent { width:100%; } + </style> + <![endif]--> + + + <link href='//camel.apache.org/styles/highlighter/styles/shCoreCamel.css' rel='stylesheet' type='text/css' /> + <link href='//camel.apache.org/styles/highlighter/styles/shThemeCamel.css' rel='stylesheet' type='text/css' /> + <script src='//camel.apache.org/styles/highlighter/scripts/shCore.js' type='text/javascript'></script> + <script src='//camel.apache.org/styles/highlighter/scripts/shBrushJava.js' type='text/javascript'></script> + <script src='//camel.apache.org/styles/highlighter/scripts/shBrushXml.js' type='text/javascript'></script> + <script src='//camel.apache.org/styles/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script> + + <script type="text/javascript"> + SyntaxHighlighter.defaults['toolbar'] = false; + SyntaxHighlighter.all(); + </script> + + <title> + Apache Camel: Rest + </title> +</head> +<body> +<div class="white_box"> +<div class="header"> + <div class="header_l"> + <div class="header_r"> + </div> + </div> +</div> +<div class="content"> + <div class="content_l"> + <div class="content_r"> + <div> + <!-- Banner --> +<div id="banner-content"><div id="asf_logo"> + <div id="activemq_logo" style="height:108px; background:transparent url(banner.data/apache-camel-7.png) no-repeat scroll left top;"> + <a shape="rect" style="float:left; width:310px;display:block;text-indent:-5000px;text-decoration:none;line-height:140px; margin-top:20px; margin-left:18px;" href="http://camel.apache.org/">Camel</a> + <a shape="rect" style="float:right; width:180px;display:block;text-indent:-5000px;text-decoration:none;line-height:80px; margin-top:45px; margin-right:10px;" href="http://www.apache.org">Apache</a> + </div> +</div></div> + <!-- Banner --> + <div class="top_red_bar"> + <div id="site-breadcrumbs"> + <!-- Breadcrumbs --> +<a href="index.html">Apache Camel</a> > <a href="documentation.html">Documentation</a> > <a href="components.html">Components</a> > <a href="rest.html">Rest</a> + </div> + <!-- Quicklinks --> +<div id="site-quicklinks"><p><a shape="rect" href="download.html">Download</a> | <a shape="rect" href="javadoc.html">JavaDoc</a> | <a shape="rect" href="source.html">Source</a> | <a shape="rect" href="discussion-forums.html">Forums</a> | <a shape="rect" href="support.html">Support</a></p></div> + <!-- Quicklinks --> + </div> + + <table border="0"> + <tbody> + <tr> + <td valign="top" width="100%"> +<div class="wiki-content maincontent"><h2 id="Rest-RestComponent">Rest Component</h2><p><strong>Available as of Camel 2.14</strong></p><p>The rest component allows to define REST endpoints using the Rest DSL and plugin to other Camel components as the REST transport.</p><p> </p><h3 id="Rest-URIformat">URI format</h3><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[ rest://verb:path?[options] +]]></script> +</div></div><h3 id="Rest-URIOptions"><span style="line-height: 1.5625;font-size: 16.0px;">URI Options</span></h3><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Name </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Default Value </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> verb </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> get, post, put, patch, delete, head, trace, connect, or options. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> path </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> the content path which support REST syntax. See further below for examples. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> consumes </p ></td><td colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p> accept type such as: >'text/xml', or 'application/json'. By default we accept all kinds of types. ></p></td></tr></tbody></table> +<h3 id="Rest-Pathsyntax">Path syntax</h3><p>The path option is defined using a REST syntax where you define the REST context path using support for parameters. </p><p>The following is a Camel route using a fixed path</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[ from("rest:get:hello") + .transform().constant("Bye World");]]></script> +</div></div><p>And the following route uses a parameter which is mapped to a Camel header with the key "me".</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[ from("rest:get:hello/{me}") + .transform().simple("Bye ${header.me}");]]></script> +</div></div><h3 id="Rest-Moreexamples"><span style="line-height: 1.5625;">More examples</span></h3><p>There is a <strong>camel-example-spark-rest-tomcat</strong> example in the Apache Camel distribution, that demonstrates how to use the Rest DSL with the <a shape="rect" href="spark-rest.html">Spark-rest</a> as transport<span style="line-height: 1.4285715;"> that can be deployed on Apache Tomcat, or similar web containers.</span></p><p></p><h3 id="Rest-SeeAlso">See Also</h3> +<ul><li><a shape="rect" href="configuring-camel.html">Configuring Camel</a></li><li><a shape="rect" href="component.html">Component</a></li><li><a shape="rect" href="endpoint.html">Endpoint</a></li><li><a shape="rect" href="getting-started.html">Getting Started</a></li></ul><ul style="list-style-type: square;"><li><a shape="rect" href="spark-rest.html">Spark-rest</a></li></ul></div> + </td> + <td valign="top"> + <div class="navigation"> + <div class="navigation_top"> + <!-- NavigationBar --> +<div class="navigation_bottom" id="navigation_bottom"><h3 id="Navigation-Overview"><a shape="rect" href="overview.html">Overview</a></h3><ul class="alternate"><li><a shape="rect" href="index.html">Home</a></li><li><a shape="rect" href="download.html">Download</a></li><li><a shape="rect" href="getting-started.html">Getting Started</a></li><li><a shape="rect" href="faq.html">FAQ</a></li></ul><h3 id="Navigation-Documentation"><a shape="rect" href="documentation.html">Documentation</a></h3><ul class="alternate"><li><a shape="rect" href="user-guide.html">User Guide</a></li><li><a shape="rect" href="manual.html">Manual</a></li><li><a shape="rect" href="books.html">Books</a></li><li><a shape="rect" href="tutorials.html">Tutorials</a></li><li><a shape="rect" href="examples.html">Examples</a></li><li><a shape="rect" href="cookbook.html">Cookbook</a></li><li><a shape="rect" href="architecture.html">Architecture</a></li><li><a shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a></li><li><a shape="rect" href="dsl.html">DSL</a></li><li><a shape="rect" href="components.html">Components</a></li><li><a shape="rect" href="data-format.html">Data Format</a></li><li><a shape="rect" href="languages.html">Languages</a></li><li><a shape="rect" href="security.html">Security</a></li><li><a shape="rect" href="security-advisories.html">Security Advisories</a></li></ul><h3 id="Navigation-Search">Search</h3><form enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box" action="http://www.google.com/cse"> + <div> + <input type="hidden" name="cx" value="007878419884033443453:m5nhvy4hmyq"> + <input type="hidden" name="ie" value="UTF-8"> + <input type="text" name="q" size="21"> + <input type="submit" name="sa" value="Search"> + </div> +</form> +<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script><h3 id="Navigation-Community"><a shape="rect" href="community.html">Community</a></h3><ul class="alternate"><li><a shape="rect" href="support.html">Support</a></li><li><a shape="rect" href="contributing.html">Contributing</a></li><li><a shape="rect" href="discussion-forums.html">Discussion Forums</a></li><li><a shape="rect" href="mailing-lists.html">Mailing Lists</a></li><li><a shape="rect" href="user-stories.html">User Stories</a></li><li><a shape="rect" href="news.html">News</a></li><li><a shape="rect" href="articles.html">Articles</a></li><li><a shape="rect" href="site.html">Site</a></li><li><a shape="rect" href="team.html">Team</a></li><li><a shape="rect" class="external-link" href="http://camel-extra.googlecode.com/" rel="nofollow">Camel Extra</a></li></ul><h3 id="Navigation-Developers"><a shape="rect" href="developers.html">Developers</a></h3><ul class="alternate" ><li><a shape="rect" href="developers.html">Developer Guide</a></li><li><a >shape="rect" href="source.html">Source</a></li><li><a shape="rect" >href="building.html">Building</a></li><li><a shape="rect" >href="javadoc.html">JavaDoc</a></li><li><a shape="rect" >href="irc-room.html">IRC Room</a></li></ul><h3 >id="Navigation-ApacheSoftwareFoundation">Apache Software Foundation</h3><ul >class="alternate"><li><a shape="rect" class="external-link" >href="http://www.apache.org/licenses/">License</a></li><li><a shape="rect" >class="external-link" >href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a > shape="rect" class="external-link" >href="http://www.apache.org/foundation/thanks.html">Thanks</a></li><li><a >shape="rect" class="external-link" >href="http://www.apache.org/security/">Security</a></li></ul></div> + <!-- NavigationBar --> + </div> + </div> + </td> + </tr> + </tbody> + </table> + + + <div class="bottom_red_bar"></div> + </div> + </div> + </div> +</div> +<div class="black_box"> +<div class="footer"> + <div class="footer_l"> + <div class="footer_r"> + <div> + <a href="$base/privacy-policy.html">Privacy Policy</a> - + (<a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=43188889">edit page</a>) + (<a href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=43188889&showComments=true&showCommentArea=true#addcomment">add comment</a>) + </div> + </div> + </div> +</div> +</div> +</div> +<div class="design_attribution"> +© 2004-2014 The Apache Software Foundation. +<br> +Apache Camel, Camel, Apache, the Apache feather logo, and the Apache Camel project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners. +<br> +<a href="http://hiramchirino.com">Graphic Design By Hiram</a> +</div> + +<!-- Camel committers that would like access to the Analytics, send a note to priv...@camel.apache.org --> +<script type="text/javascript"> + + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-25976253-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + +</script> + +</body> +</html> + + Modified: websites/production/camel/content/spark-rest.html ============================================================================== --- websites/production/camel/content/spark-rest.html (original) +++ websites/production/camel/content/spark-rest.html Mon Jul 21 08:17:58 2014 @@ -86,7 +86,7 @@ <tbody> <tr> <td valign="top" width="100%"> -<div class="wiki-content maincontent"><h2 id="Spark-rest-Spark-restComponent">Spark-rest Component</h2><p><strong>Available as of Camel 2.14</strong></p><p>The Spark-rest component allows to define REST endpoints using the Spark REST Java library which has a nice DSL.</p> <div class="aui-message hint shadowed information-macro"> +<div class="wiki-content maincontent"><h2 id="Spark-rest-Spark-restComponent">Spark-rest Component</h2><p><strong>Available as of Camel 2.14</strong></p><p>The Spark-rest component allows to define REST endpoints using the Spark REST Java library using the Rest DSL.</p> <div class="aui-message hint shadowed information-macro"> <span class="aui-icon icon-hint">Icon</span> <div class="message-content"> Spark Java requires Java 8 runtime. @@ -112,16 +112,28 @@ </div></div><h3 id="Spark-rest-MappingtoCamelMessage">Mapping to Camel Message</h3><p>The Spark Request object is mapped to a Camel Message as a <code>org.apache.camel.component.sparkrest.SparkMessage</code> which has access to the raw Spark request using the getRequest method. By default the Spark body is mapped to Camel message body, and any HTTP headers / Spark parameters is mapped to Camel Message headers. There is special support for the Spark splat syntax, which is mapped to the Camel message header with key splat.</p><p>For example the given route below uses Spark splat (the asterisk sign) in the context path which we can access as a header form the Simple language to construct a response message.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[ from("spark-rest:get:/hello/*/to/*") .transform().simple("Bye big ${header.splat[1]} from ${header.splat[0]}");]]></script> -</div></div><h3 id="Spark-rest-SparkRouteBuilder"><span style="font-size: 16.0px;line-height: 1.5625;">SparkRouteBuilder</span></h3><p><span style="font-size: medium;"><span style="line-height: 25.0px;">If you use Java code, then you can use the class <code>org.apache.camel.component.sparkrest.SparkRouteBuilder</code> to define routes using a Spark DSL, as shown below</span></span></p><p><span style="font-size: medium;"><span style="line-height: 25.0px;"> </span></span></p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> -<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[ return new SparkRouteBuilder() { +</div></div><h3 id="Spark-rest-RestDSL"><span style="font-size: 16.0px;line-height: 1.5625;">Rest DSL</span></h3><p><span style="font-size: 16.0px;line-height: 1.5625;">Apache Camel provides a new Rest DSL that allow to define the REST services in a nice REST style.</span></p><p><span style="font-size: 16.0px;line-height: 1.5625;">For example we can define a REST hello service in Java DSL as shown below:</span></p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[ return new RouteBuilder() { @Override public void configure() throws Exception { - get("hello/:me") - .transform().simple("Bye ${header.me}"); + rest("/hello/{me}").get() + .route().transform().simple("Bye ${header.me}"); } };]]></script> -</div></div><p><span style="font-size: medium;"><span style="line-height: 25.0px;">When using the <code>SparkRouteBuilder</code>, then you can define Camel routes using the REST verbs, such as get, post, put, delete etc.</span></span></p><h3 id="Spark-rest-Moreexamples"><span style="font-size: 16.0px;line-height: 1.5625;">More examples</span></h3><p>There is a <strong>camel-example-spark-rest-tomcat</strong> example in the Apache Camel distribution, that demonstrates how to use camel-spark-rest in a web application that can be deployed on Apache Tomcat, or similar web containers.</p><p></p><h3 id="Spark-rest-SeeAlso">See Also</h3> -<ul><li><a shape="rect" href="configuring-camel.html">Configuring Camel</a></li><li><a shape="rect" href="component.html">Component</a></li><li><a shape="rect" href="endpoint.html">Endpoint</a></li><li><a shape="rect" href="getting-started.html">Getting Started</a></li></ul></div> +</div></div><p> </p><p>And the same example in XML DSL would be</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[ <camelContext xmlns="http://camel.apache.org/schema/spring"> + <rest uri="/hello/{me}"> + <get> + <route> + <transform> + <simple>Bye ${header.me}</simple> + </transform> + </route> + </get> + </rest> + </camelContext>]]></script> +</div></div><p><span style="line-height: 1.4285715;"><br clear="none"></span></p><p><span style="line-height: 1.4285715;">See more details at the </span><a shape="rect" class="unresolved" href="#">Rest DSL</a><span style="line-height: 1.4285715;">.</span></p><h3 id="Spark-rest-Moreexamples"><span style="font-size: 16.0px;line-height: 1.5625;">More examples</span></h3><p>There is a <strong>camel-example-spark-rest-tomcat</strong> example in the Apache Camel distribution, that demonstrates how to use camel-spark-rest in a web application that can be deployed on Apache Tomcat, or similar web containers.</p><p></p><h3 id="Spark-rest-SeeAlso">See Also</h3> +<ul><li><a shape="rect" href="configuring-camel.html">Configuring Camel</a></li><li><a shape="rect" href="component.html">Component</a></li><li><a shape="rect" href="endpoint.html">Endpoint</a></li><li><a shape="rect" href="getting-started.html">Getting Started</a></li></ul><ul style="list-style-type: square;"><li><a shape="rect" href="rest.html">Rest</a></li></ul></div> </td> <td valign="top"> <div class="navigation"> Modified: websites/production/camel/content/transport.html ============================================================================== --- websites/production/camel/content/transport.html (original) +++ websites/production/camel/content/transport.html Mon Jul 21 08:17:58 2014 @@ -421,7 +421,9 @@ disruptor-vm:someName[?<option>] </div></div></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Component for integrating with RabbitMQ</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="ref.html">Ref</a> / camel-core</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="theme: Default; brush: plain; gutter: false" type="syntaxhighlighter"><![CDATA[ref:name ]]></script> -</div></div></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Component for lookup of existing endpoints bound in the <a shape="rect" href="registry.html">Registry</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="restlet.html">Restlet</a> / camel-restlet</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Component for lookup of existing endpoints bound in the <a shape="rect" href="registry.html">Registry</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="rest.html">Rest</a> / camel-core</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: plain; gutter: false" type="syntaxhighlighter"><![CDATA[rest:verb:path[?options]]]></script> +</div></div></td><td colspan="1" rowspan="1" class="confluenceTd">Component for consuming Restful resources supporting the <a shape="rect" href="component-list.html">Rest DSL</a> and plugins to other Camel rest components.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="restlet.html">Restlet</a> / camel-restlet</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="theme: Default; brush: plain; gutter: false" type="syntaxhighlighter"><![CDATA[restlet:restletUrl[?options] ]]></script> </div></div></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Component for consuming and producing Restful resources using <a shape="rect" class="external-link" href="http://www.restlet.org" rel="nofollow">Restlet</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="rmi.html">RMI</a> / camel-rmi</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> Modified: websites/production/camel/content/uris.html ============================================================================== --- websites/production/camel/content/uris.html (original) +++ websites/production/camel/content/uris.html Mon Jul 21 08:17:58 2014 @@ -426,7 +426,9 @@ disruptor-vm:someName[?<option>] </div></div></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Component for integrating with RabbitMQ</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="ref.html">Ref</a> / camel-core</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="theme: Default; brush: plain; gutter: false" type="syntaxhighlighter"><![CDATA[ref:name ]]></script> -</div></div></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Component for lookup of existing endpoints bound in the <a shape="rect" href="registry.html">Registry</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="restlet.html">Restlet</a> / camel-restlet</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Component for lookup of existing endpoints bound in the <a shape="rect" href="registry.html">Registry</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="rest.html">Rest</a> / camel-core</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: plain; gutter: false" type="syntaxhighlighter"><![CDATA[rest:verb:path[?options]]]></script> +</div></div></td><td colspan="1" rowspan="1" class="confluenceTd">Component for consuming Restful resources supporting the <a shape="rect" href="component-list.html">Rest DSL</a> and plugins to other Camel rest components.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="restlet.html">Restlet</a> / camel-restlet</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="theme: Default; brush: plain; gutter: false" type="syntaxhighlighter"><![CDATA[restlet:restletUrl[?options] ]]></script> </div></div></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Component for consuming and producing Restful resources using <a shape="rect" class="external-link" href="http://www.restlet.org" rel="nofollow">Restlet</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="rmi.html">RMI</a> / camel-rmi</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">