camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Camel > XQuery Endpoint
Date Mon, 29 Mar 2010 01:35:00 GMT
<html>
<head>
    <base href="http://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
     <h2><a href="http://cwiki.apache.org/confluence/display/CAMEL/XQuery+Endpoint">XQuery
Endpoint</a></h2>
     <h4>Page <b>edited</b> by             <a href="http://cwiki.apache.org/confluence/display/~njiang">willem
jiang</a>
    </h4>
     
          <br/>
     <div class="notificationGreySide">
         <h2><a name="XQueryEndpoint-XQuery"></a>XQuery</h2>

<p>The <b>xquery:</b> component allows you to process a message using an
<a href="/confluence/display/CAMEL/XQuery" title="XQuery">XQuery</a> template.
This can be ideal when using <a href="/confluence/display/CAMEL/Templating" title="Templating">Templating</a>
to generate respopnses for requests.</p>

<p>Maven users will need to add the following dependency to their <tt>pom.xml</tt>
for this component:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
&lt;dependency&gt;
    &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
    &lt;artifactId&gt;camel-xqurey&lt;/artifactId&gt;
    &lt;version&gt;x.x.x&lt;/version&gt;
    &lt;!-- use the same version as your Camel core version --&gt;
&lt;/dependency&gt;
</pre>
</div></div>

<h3><a name="XQueryEndpoint-URIformat"></a>URI format</h3>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
xquery:templateName
</pre>
</div></div>

<p>Where <b>templateName</b> is the classpath-local URI of the template
to invoke; or the complete URL of the remote template.</p>

<p>For example you could use something like this:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
from(<span class="code-quote">"activemq:My.Queue"</span>).
  to(<span class="code-quote">"xquery:com/acme/mytransform.xquery"</span>);
</pre>
</div></div>

<p>To use an XQuery template to formulate a response to a message for InOut message
exchanges (where there is a <tt>JMSReplyTo</tt> header).</p>

<p>If you want to use InOnly, consume the message, and send it to another destination,
you could use the following route:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
from(<span class="code-quote">"activemq:My.Queue"</span>).
  to(<span class="code-quote">"xquery:com/acme/mytransform.xquery"</span>).
  to(<span class="code-quote">"activemq:Another.Queue"</span>);
</pre>
</div></div>

<h3><a name="XQueryEndpoint-Options"></a>Options</h3>

<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Name </th>
<th class='confluenceTh'> Default Value </th>
<th class='confluenceTh'> Description </th>
</tr>
</tbody></table>

<h3><a name="XQueryEndpoint-SeeAlso"></a>See Also</h3>
<ul>
	<li><a href="/confluence/display/CAMEL/Configuring+Camel" title="Configuring Camel">Configuring
Camel</a></li>
	<li><a href="/confluence/display/CAMEL/Component" title="Component">Component</a></li>
	<li><a href="/confluence/display/CAMEL/Endpoint" title="Endpoint">Endpoint</a></li>
	<li><a href="/confluence/display/CAMEL/Getting+Started" title="Getting Started">Getting
Started</a></li>
</ul>

     </div>
     <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
       </div>

       <a href="http://cwiki.apache.org/confluence/display/CAMEL/XQuery+Endpoint">View
Online</a>
       |
       <a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=69859&revisedVersion=8&originalVersion=7">View
Change</a>
              |
       <a href="http://cwiki.apache.org/confluence/display/CAMEL/XQuery+Endpoint?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message