<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:www.nabble.com,2006:forum-22882</id>
	<title>Nabble - Camel</title>
	<updated>2008-09-05T11:23:52Z</updated>
	<link rel="self" type="application/atom+xml" href="http://www.nabble.com/Camel-f22882.xml" />
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Camel-f22882.html" />
	<subtitle type="html">&lt;a href=&quot;http://activemq.apache.org/camel/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Apache Camel&lt;/a&gt; is a powerful rule based routing and mediation engine which provides a POJO based implementation of the &lt;a href=&quot;http://activemq.apache.org/camel/enterprise-integration-patterns.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Enterprise Integration Patterns&lt;/a&gt; using an extremely powerful fluent API (or declarative &lt;a href=&quot;http://activemq.apache.org/camel/dsl.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Java Domain Specific Language&lt;/a&gt;) to configure routing and mediation rules. The &lt;a href=&quot;http://activemq.apache.org/camel/dsl.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Domain Specific Language&lt;/a&gt; means that Apache Camel can support type-safe smart completion of routing rules in your IDE using regular Java code without huge amounts of &lt;a href=&quot;http://activemq.apache.org/camel/xml-configuration.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;XML configuration&lt;/a&gt; files; though Xml Configuration inside &lt;a href=&quot;http://activemq.apache.org/camel/spring.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Spring&lt;/a&gt; is also supported.</subtitle>
	
<entry>
	<id>tag:www.nabble.com,2006:post-19336943</id>
	<title>[jira] Created: (CAMEL-880) Headers lost when using scriptBuilder to set headers dynamically</title>
	<published>2008-09-05T11:23:52Z</published>
	<updated>2008-09-05T11:23:52Z</updated>
	<author>
		<name>JIRA jira@apache.org</name>
	</author>
	<content type="html">Headers lost when using scriptBuilder to set headers dynamically
&lt;br&gt;----------------------------------------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Key: CAMEL-880
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;URL: &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-880&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-880&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Project: Apache Camel
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Issue Type: Bug
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Components: camel-script
&lt;br&gt;&amp;nbsp; &amp;nbsp; Affects Versions: 1.4.0
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Reporter: James Mello
&lt;br&gt;&lt;br&gt;&lt;br&gt;When running a dynamic script evaluation in a setHeader, the header is lost as the Pipeline chain uses the data from the out body as the source of headers. 
&lt;br&gt;&lt;br&gt;So trying to figure this out, I looked into the source, and found that if the getOut is not null, the out message is used to set the header in the setHeader processor. Unfortunately in the script engine this block of code always ensures that it's NOT null. 
&lt;br&gt;&lt;br&gt;script builder class line 520 of Camel 1.4 
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ScriptContext context = engine.getContext(); 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int scope = ScriptContext.ENGINE_SCOPE; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; context.setAttribute(&amp;quot;context&amp;quot;, exchange.getContext(), scope); 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; context.setAttribute(&amp;quot;exchange&amp;quot;, exchange, scope); 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; context.setAttribute(&amp;quot;request&amp;quot;, exchange.getIn(), scope); 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; context.setAttribute(&amp;quot;response&amp;quot;, exchange.getOut(), scope); 
&lt;br&gt;&lt;br&gt;The place were the out message is used is here in the Pipeline class at line 79 
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (first) { 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; first = false; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else { 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nextExchange = createNextExchange(processor, nextExchange); 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } 
&lt;br&gt;&lt;br&gt;The specifics of my setup were:
&lt;br&gt;&lt;br&gt;Used spring with the following configuration:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;camel:camelContext&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;camel:route&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;camel:from uri=&amp;quot;jms://LLAQueue?disableReplyTo=true&amp;quot; /&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;camel:setHeader headerName=&amp;quot;activity.type&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;camel:jxpath&amp;gt;exchange.getIn().getBody().getExerciseHighLevelActivity().getActivityType()&amp;lt;/camel:jxpath&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/camel:setHeader&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;camel:choice&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;camel:when&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;camel:javaScript&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; exchange.getIn().getHeader('activity.type') == 3
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/camel:javaScript&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;camel:transform&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;camel:javaScript&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; exchange.getIn().getBody().getData() !=
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; undefined ?
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; exchange.getIn().getBody().getData() : &amp;quot;&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/camel:javaScript&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/camel:transform&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;camel:to uri=&amp;quot;log:info?showAll=true&amp;quot; /&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/camel:when&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/camel:choice&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/camel:route&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/camel:camelContext&amp;gt;
&lt;br&gt;&lt;br&gt;I did not test this problem with other exchange types, just the JMS type.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Camel---Development-f22884.html&quot; embed=&quot;fixTarget[22884]&quot; target=&quot;_top&quot; &gt;Camel - Development&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-jira--Created%3A-%28CAMEL-880%29-Headers-lost-when-using-scriptBuilder-to-set-headers-dynamically-tp19336943s22882p19336943.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19336925</id>
	<title>RE: Potential bug with setHeader and scripts?</title>
	<published>2008-09-05T11:23:00Z</published>
	<updated>2008-09-05T11:23:00Z</updated>
	<author>
		<name>Kingjamm</name>
	</author>
	<content type="html">I added the spring configuration to a JIRA, unfortunately I don't have time right now to dedicate to putting together a unit test. If you need further details though, please feel free to email.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Claus Ibsen wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hi
&lt;br&gt;&lt;br&gt;Yeah I guess the best is to look if the exchange is out capable (ExchangeHelper.isOutCapable - I think) and then only set the response context.
&lt;br&gt;&lt;br&gt;We would like to look and fix it. The best is to log a ticket in JIRA and if possible some code showing the problem, such as a route example, unit test or the like.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Med venlig hilsen
&lt;br&gt;&amp;nbsp;
&lt;br&gt;Claus Ibsen
&lt;br&gt;......................................
&lt;br&gt;Silverbullet
&lt;br&gt;Skovsgårdsvænget 21
&lt;br&gt;8362 Hørning
&lt;br&gt;Tlf. +45 2962 7576
&lt;br&gt;Web: www.silverbullet.dk
&lt;br&gt;&lt;br&gt;-----Original Message-----
&lt;br&gt;From: Kingjamm [mailto:kingjamm@zoji.com] 
&lt;br&gt;Sent: 5. september 2008 19:17
&lt;br&gt;To: camel-user@activemq.apache.org
&lt;br&gt;Subject: Potential bug with setHeader and scripts?
&lt;br&gt;&lt;br&gt;&lt;br&gt;So trying to figure this out, I looked into the source, and found that if the
&lt;br&gt;getOut is not null, the out message is used to set the header in the
&lt;br&gt;setHeader processor. Unfortunately in the script engine this block of code
&lt;br&gt;always ensures that it's NOT null.
&lt;br&gt;&lt;br&gt;script builder class line 520 of Camel 1.4
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ScriptContext context = engine.getContext();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int scope = ScriptContext.ENGINE_SCOPE;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; context.setAttribute(&amp;quot;context&amp;quot;, exchange.getContext(), scope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; context.setAttribute(&amp;quot;exchange&amp;quot;, exchange, scope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; context.setAttribute(&amp;quot;request&amp;quot;, exchange.getIn(), scope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; context.setAttribute(&amp;quot;response&amp;quot;, exchange.getOut(), scope);
&lt;br&gt;&lt;br&gt;The place were the out message is used is here in the Pipeline class at line
&lt;br&gt;79
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (first) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; first = false;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nextExchange = createNextExchange(processor, nextExchange);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;Is the correct behavior to call the getOut in the scripbuilder with an
&lt;br&gt;argument of false or is there something more subtle going on here?
&lt;br&gt;-- 
&lt;br&gt;View this message in context: &lt;a href=&quot;http://www.nabble.com/Potential-bug-with-setHeader-and-scripts--tp19335805s22882p19335805.html&quot; target=&quot;_top&quot;&gt;http://www.nabble.com/Potential-bug-with-setHeader-and-scripts--tp19335805s22882p19335805.html&lt;/a&gt;&lt;br&gt;Sent from the Camel - Users mailing list archive at Nabble.com.
&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Camel---Users-f22883.html&quot; embed=&quot;fixTarget[22883]&quot; target=&quot;_top&quot; &gt;Camel - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Potential-bug-with-setHeader-and-scripts--tp19335805s22882p19336925.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19336029</id>
	<title>RE: Potential bug with setHeader and scripts?</title>
	<published>2008-09-05T10:28:13Z</published>
	<updated>2008-09-05T10:28:13Z</updated>
	<author>
		<name>Claus Ibsen</name>
	</author>
	<content type="html">Hi
&lt;br&gt;&lt;br&gt;Yeah I guess the best is to look if the exchange is out capable (ExchangeHelper.isOutCapable - I think) and then only set the response context.
&lt;br&gt;&lt;br&gt;We would like to look and fix it. The best is to log a ticket in JIRA and if possible some code showing the problem, such as a route example, unit test or the like.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Med venlig hilsen
&lt;br&gt;&amp;nbsp;
&lt;br&gt;Claus Ibsen
&lt;br&gt;......................................
&lt;br&gt;Silverbullet
&lt;br&gt;Skovsgårdsvænget 21
&lt;br&gt;8362 Hørning
&lt;br&gt;Tlf. +45 2962 7576
&lt;br&gt;Web: www.silverbullet.dk
&lt;br&gt;&lt;br&gt;-----Original Message-----
&lt;br&gt;From: Kingjamm [mailto:&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19336029&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kingjamm@...&lt;/a&gt;] 
&lt;br&gt;Sent: 5. september 2008 19:17
&lt;br&gt;To: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19336029&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;camel-user@...&lt;/a&gt;
&lt;br&gt;Subject: Potential bug with setHeader and scripts?
&lt;br&gt;&lt;br&gt;&lt;br&gt;So trying to figure this out, I looked into the source, and found that if the
&lt;br&gt;getOut is not null, the out message is used to set the header in the
&lt;br&gt;setHeader processor. Unfortunately in the script engine this block of code
&lt;br&gt;always ensures that it's NOT null.
&lt;br&gt;&lt;br&gt;script builder class line 520 of Camel 1.4
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ScriptContext context = engine.getContext();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int scope = ScriptContext.ENGINE_SCOPE;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; context.setAttribute(&amp;quot;context&amp;quot;, exchange.getContext(), scope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; context.setAttribute(&amp;quot;exchange&amp;quot;, exchange, scope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; context.setAttribute(&amp;quot;request&amp;quot;, exchange.getIn(), scope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; context.setAttribute(&amp;quot;response&amp;quot;, exchange.getOut(), scope);
&lt;br&gt;&lt;br&gt;The place were the out message is used is here in the Pipeline class at line
&lt;br&gt;79
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (first) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; first = false;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nextExchange = createNextExchange(processor, nextExchange);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;Is the correct behavior to call the getOut in the scripbuilder with an
&lt;br&gt;argument of false or is there something more subtle going on here?
&lt;br&gt;-- 
&lt;br&gt;View this message in context: &lt;a href=&quot;http://www.nabble.com/Potential-bug-with-setHeader-and-scripts--tp19335805s22882p19335805.html&quot; target=&quot;_top&quot;&gt;http://www.nabble.com/Potential-bug-with-setHeader-and-scripts--tp19335805s22882p19335805.html&lt;/a&gt;&lt;br&gt;Sent from the Camel - Users mailing list archive at Nabble.com.
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Camel---Users-f22883.html&quot; embed=&quot;fixTarget[22883]&quot; target=&quot;_top&quot; &gt;Camel - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Potential-bug-with-setHeader-and-scripts--tp19335805s22882p19336029.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19335805</id>
	<title>Potential bug with setHeader and scripts?</title>
	<published>2008-09-05T10:16:30Z</published>
	<updated>2008-09-05T10:16:30Z</updated>
	<author>
		<name>Kingjamm</name>
	</author>
	<content type="html">So trying to figure this out, I looked into the source, and found that if the getOut is not null, the out message is used to set the header in the setHeader processor. Unfortunately in the script engine this block of code always ensures that it's NOT null.
&lt;br&gt;&lt;br&gt;script builder class line 520 of Camel 1.4
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ScriptContext context = engine.getContext();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int scope = ScriptContext.ENGINE_SCOPE;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; context.setAttribute(&amp;quot;context&amp;quot;, exchange.getContext(), scope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; context.setAttribute(&amp;quot;exchange&amp;quot;, exchange, scope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; context.setAttribute(&amp;quot;request&amp;quot;, exchange.getIn(), scope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; context.setAttribute(&amp;quot;response&amp;quot;, exchange.getOut(), scope);
&lt;br&gt;&lt;br&gt;The place were the out message is used is here in the Pipeline class at line 79
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (first) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; first = false;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nextExchange = createNextExchange(processor, nextExchange);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;Is the correct behavior to call the getOut in the scripbuilder with an argument of false or is there something more subtle going on here?&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Camel---Users-f22883.html&quot; embed=&quot;fixTarget[22883]&quot; target=&quot;_top&quot; &gt;Camel - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Potential-bug-with-setHeader-and-scripts--tp19335805s22882p19335805.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19335692</id>
	<title>[CONF] Apache Camel: MINA (page edited)</title>
	<published>2008-09-05T10:09:00Z</published>
	<updated>2008-09-05T10:09:00Z</updated>
	<author>
		<name>confluence-2</name>
	</author>
	<content type="html">&lt;html&gt;
&lt;head&gt;
    &lt;base href=&quot;http://cwiki.apache.org/confluence&quot; /&gt;
    
&lt;/head&gt;
&lt;body&gt;

&lt;div id=&quot;PageContent&quot;&gt;
&lt;table class=&quot;pagecontent&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;&gt;&lt;tr&gt;
&lt;td valign=&quot;top&quot; class=&quot;pagebody&quot;&gt;

    &lt;div class=&quot;pageheader&quot;&gt;
        &lt;span class=&quot;pagetitle&quot;&gt;
            Page Edited :
            &lt;a href=&quot;http://cwiki.apache.org/confluence/display/CAMEL&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;CAMEL&lt;/a&gt; :
            &lt;a href=&quot;http://cwiki.apache.org/confluence/display/CAMEL/MINA&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MINA&lt;/a&gt;
        &lt;/span&gt;
    &lt;/div&gt;

     &lt;p&gt;
        &lt;a href=&quot;http://cwiki.apache.org/confluence/display/CAMEL/MINA&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MINA&lt;/a&gt;
        has been edited by             &lt;a href=&quot;http://cwiki.apache.org/confluence/display/~davsclaus&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Claus Ibsen&lt;/a&gt;
            &lt;span class=&quot;smallfont&quot;&gt;(Sep 05, 2008)&lt;/span&gt;.
     &lt;/p&gt;
    
     &lt;p&gt;
                 &lt;a href=&quot;http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=52097&amp;originalVersion=22&amp;revisedVersion=23&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;(View changes)&lt;/a&gt;
     &lt;/p&gt;

    &lt;span class=&quot;label&quot;&gt;Content:&lt;/span&gt;&lt;br /&gt;
    &lt;div class=&quot;greybox wiki-content&quot;&gt;&lt;h2&gt;&lt;a name=&quot;MINA-MINAComponent&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;MINA Component&lt;/h2&gt;

&lt;p&gt;The &lt;b&gt;mina:&lt;/b&gt; component is a transport for working with &lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;http://mina.apache.org/&quot; title=&quot;Visit page outside Confluence&quot; rel=&quot;nofollow&quot; target=&quot;_top&quot;&gt;Apache MINA&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;/confluence/images/icons/linkext7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;MINA-URIformat&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;URI format&lt;/h3&gt;

&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;codeContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;mina:tcp:&lt;span class=&quot;code-comment&quot;&gt;//hostname[:port]
&lt;/span&gt;mina:udp:&lt;span class=&quot;code-comment&quot;&gt;//hostname[:port]
&lt;/span&gt;mina:multicast:&lt;span class=&quot;code-comment&quot;&gt;//hostname[:port]
&lt;/span&gt;mina:vm:&lt;span class=&quot;code-comment&quot;&gt;//hostname[:port}&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;From Camel 1.3 onwards you can specify a codec in the &lt;a href=&quot;/confluence/display/CAMEL/Registry&quot; title=&quot;Registry&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Registry&lt;/a&gt; using the &lt;b&gt;codec&lt;/b&gt; option. If you are using TCP and no codec is specified then the textline flag is used to determine if text line based codec or object serialization should be used instead. By default the object serialization is used.&lt;/p&gt;

&lt;p&gt;For UDP/Multicast if no codec is specified the default uses a basic ByteBuffer based codec.&lt;/p&gt;

&lt;p&gt;Multicast also has a shorthand notation &lt;b&gt;mcast&lt;/b&gt;.&lt;/p&gt;

&lt;p&gt;The VM protocol is used as a direct forwarding mechanism in the same JVM. See the &lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;http://mina.apache.org/report/1.1/apidocs/org/apache/mina/transport/vmpipe/package-summary.html&quot; title=&quot;Visit page outside Confluence&quot; rel=&quot;nofollow&quot; target=&quot;_top&quot;&gt;MINA VM-Pipe API documentation&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;/confluence/images/icons/linkext7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt; for details.&lt;/p&gt;

&lt;p&gt;A MinaProducer has a default timeout value of 30 seconds, while it waits for a response from the remote server.&lt;/p&gt;

&lt;p&gt;In normal usage camel-mina only supports marshalling the body content - message headers and exchange properties will not be sent.&lt;br /&gt;
However the option &lt;b&gt;transferExchange&lt;/b&gt; does allow to transfer the exchange itself over the wire. See options below.&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;MINA-Options&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;Options&lt;/h3&gt;

&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Name &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Default Value &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Description &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; codec &lt;/td&gt;
&lt;td class='confluenceTd'&gt; null &lt;/td&gt;
&lt;td class='confluenceTd'&gt; As of 1.3 or later you can refer to a named ProtocolCodecFactory instance in your &lt;a href=&quot;/confluence/display/CAMEL/Registry&quot; title=&quot;Registry&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Registry&lt;/a&gt; such as your Spring ApplicationContext which is then used for the marshalling &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; textline &lt;/td&gt;
&lt;td class='confluenceTd'&gt; false &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Only used for TCP. If no codec is specified then you can use this flag in 1.3 or later to indicate a text line based codec; if not specified or the value is false then Object Serialization is assumed over TCP. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; sync &lt;/td&gt;
&lt;td class='confluenceTd'&gt; false/true &lt;/td&gt;
&lt;td class='confluenceTd'&gt; As of 1.3 or later you can configure the exchange pattern to be either InOnly (default) or InOut. Setting sync=true means a synchronous exchange (InOut), where the client can read the response from MINA (The exchange out message). The default value has changed in Camel 1.5 to true. In older releases the default value is false. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; lazySessionCreation &lt;/td&gt;
&lt;td class='confluenceTd'&gt; false &lt;/td&gt;
&lt;td class='confluenceTd'&gt; As of 1.3 or later session can be lazy created to avoid exceptions if the remote server is not up and running when the Camel producer is started. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; timeout &lt;/td&gt;
&lt;td class='confluenceTd'&gt; 30000 &lt;/td&gt;
&lt;td class='confluenceTd'&gt; As of 1.3 or later you can configure the timeout while waiting for a response from a remote server. The timeout unit is in millis, so 60000 is 60 seconds. The timeout is only used for MinaProducer. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; encoding &lt;/td&gt;
&lt;td class='confluenceTd'&gt; JVM Default &lt;/td&gt;
&lt;td class='confluenceTd'&gt; As of 1.3 or later you can configure the encoding (is a &lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;http://java.sun.com/j2se/1.5.0/docs/api/java/nio/charset/Charset.html&quot; title=&quot;Visit page outside Confluence&quot; rel=&quot;nofollow&quot; target=&quot;_top&quot;&gt;charset name&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;/confluence/images/icons/linkext7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt;) to use for the TCP textline codec and the UDP protocol. If not provided Camel will use the &lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;http://java.sun.com/j2se/1.5.0/docs/api/java/nio/charset/Charset.html#defaultCharset()&quot; title=&quot;Visit page outside Confluence&quot; rel=&quot;nofollow&quot; target=&quot;_top&quot;&gt;JVM default Charset&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;/confluence/images/icons/linkext7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt;. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; transferExchange &lt;/td&gt;
&lt;td class='confluenceTd'&gt; false &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Only used for TCP. As of 1.3 or later you can transfer the exchange over the wire instead of just the body. The following fields is transfered: in body, out body, in headers, out headers, exchange properties, exchange exception. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; minaLogger &lt;/td&gt;
&lt;td class='confluenceTd'&gt; false &lt;/td&gt;
&lt;td class='confluenceTd'&gt; As of 1.3 or later you can enable Apache MINA logging filter. Apache MINA uses slf4j logging at INFO level to log all input and output. &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;h3&gt;&lt;a name=&quot;MINA-Defaultbehaviorchanged&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;Default behavior changed&lt;/h3&gt;
&lt;p&gt;In Camel 1.5 the sync option has changed its default value from false to true, as we felt it was confusing for end-users when they used &lt;a href=&quot;/confluence/display/CAMEL/MINA&quot; title=&quot;MINA&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mina&lt;/a&gt; to call remote servers and Camel wouldn't wait for the response.&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;MINA-Usingcustomcodec&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;Using custom codec&lt;/h3&gt;
&lt;p&gt;See the &lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;http://mina.apache.org/tutorial-on-protocolcodecfilter.html&quot; title=&quot;Visit page outside Confluence&quot; rel=&quot;nofollow&quot; target=&quot;_top&quot;&gt;Mina documentation&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;/confluence/images/icons/linkext7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt; how to write your own codec. To use your custom codec with camel-mina you should register your codec in the &lt;a href=&quot;/confluence/display/CAMEL/Registry&quot; title=&quot;Registry&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Registry&lt;/a&gt; such as the Spring XML file. Then use the &lt;b&gt;codec&lt;/b&gt; option to set your codec with its bean id. See &lt;a href=&quot;/confluence/display/CAMEL/HL7&quot; title=&quot;HL7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;HL7&lt;/a&gt; for examples.&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;MINA-Samples&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;Samples&lt;/h3&gt;

&lt;p&gt;In this sample we let Camel expose a service that listen for TCP connections on port 6200. We use the &lt;b&gt;textline&lt;/b&gt; codec. In out route we create the mina in the from to create the consumer that listen on port 6200:&lt;/p&gt;

&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;codeContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;from(&lt;span class=&quot;code-quote&quot;&gt;&quot;mina:tcp:&lt;span class=&quot;code-comment&quot;&gt;//localhost:6200?textline=&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;&quot;&lt;/span&gt;).to(&lt;span class=&quot;code-quote&quot;&gt;&quot;mock:result&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;As the sample is part of an unit test we test it by sending some data on port 6200 to it. &lt;/p&gt;

&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;codeContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;MockEndpoint mock = getMockEndpoint(&lt;span class=&quot;code-quote&quot;&gt;&quot;mock:result&quot;&lt;/span&gt;);
mock.expectedBodiesReceived(&lt;span class=&quot;code-quote&quot;&gt;&quot;Hello World&quot;&lt;/span&gt;);

template.sendBody(&lt;span class=&quot;code-quote&quot;&gt;&quot;mina:tcp:&lt;span class=&quot;code-comment&quot;&gt;//localhost:6200?textline=&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;Hello World&quot;&lt;/span&gt;);
&lt;/span&gt;
assertMockEndpointsSatisifed();&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In the next sample we have a more common use-case where we expose a TCP service on port 6201 also using the textline codec. However this time we want to return a response and indicate that we support this so we set the sync option to true on the consumer. &lt;/p&gt;

&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;codeContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;from(&lt;span class=&quot;code-quote&quot;&gt;&quot;mina:tcp:&lt;span class=&quot;code-comment&quot;&gt;//localhost:6201?textline=&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;&amp;amp;sync=&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;&quot;&lt;/span&gt;).process(&lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; Processor() {
&lt;/span&gt;    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; void process(Exchange exchange) &lt;span class=&quot;code-keyword&quot;&gt;throws&lt;/span&gt; Exception {
        &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; body = exchange.getIn().getBody(&lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;.class);
        exchange.getOut().setBody(&lt;span class=&quot;code-quote&quot;&gt;&quot;Bye &quot;&lt;/span&gt; + body);
    }
});&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Then we test it by sending some data and retrieving the response using the &lt;tt&gt;template.requestBody()&lt;/tt&gt; method. As we know the response is a String we cast it to String and can assert that the response is in fact something we have dynamically set in our processor code logic.&lt;/p&gt;

&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;codeContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; response = (&lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;)template.sendBody(&lt;span class=&quot;code-quote&quot;&gt;&quot;mina:tcp:&lt;span class=&quot;code-comment&quot;&gt;//localhost:6201?textline=&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;&amp;amp;sync=&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;&quot;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;World&quot;&lt;/span&gt;);
&lt;/span&gt;assertEquals(&lt;span class=&quot;code-quote&quot;&gt;&quot;Bye World&quot;&lt;/span&gt;, response);&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name=&quot;MINA-SeeAlso&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;See Also&lt;/h3&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;/confluence/display/CAMEL/Configuring+Camel&quot; title=&quot;Configuring Camel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Configuring Camel&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;/confluence/display/CAMEL/Component&quot; title=&quot;Component&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Component&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;/confluence/display/CAMEL/Endpoint&quot; title=&quot;Endpoint&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Endpoint&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;/confluence/display/CAMEL/Getting+Started&quot; title=&quot;Getting Started&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Getting Started&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;


&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;&gt;
    &lt;tr&gt;
        &lt;td height=&quot;12&quot; background=&quot;http://cwiki.apache.org/confluence/images/border/border_bottom.gif&quot;&gt;&lt;img src=&quot;http://cwiki.apache.org/confluence/images/border/spacer.gif&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;

&lt;div class=&quot;smalltext&quot;&gt;
    Powered by
    &lt;a href=&quot;http://www.atlassian.com/software/confluence/default.jsp?clicked=footer&quot; class=&quot;smalltext&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Atlassian Confluence&lt;/a&gt;
    (Version: 2.2.9 Build:#527 Sep 07, 2006)
    -
    &lt;a href=&quot;http://jira.atlassian.com/secure/BrowseProject.jspa?id=10470&quot; class=&quot;smalltext&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Bug/feature request&lt;/a&gt;&lt;br /&gt;
    &lt;br&gt;
    &lt;a href=&quot;http://cwiki.apache.org/confluence/users/viewnotifications.action&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Unsubscribe or edit your notifications preferences&lt;/a&gt;

&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;

&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Camel---Commits-f23835.html&quot; embed=&quot;fixTarget[23835]&quot; target=&quot;_top&quot; &gt;Camel - Commits&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-CONF--Apache-Camel%3A-MINA-%28page-edited%29-tp19335692s22882p19335692.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19335454</id>
	<title>RE: Camel won't invoke my custom MINA codec</title>
	<published>2008-09-05T09:56:42Z</published>
	<updated>2008-09-05T09:56:42Z</updated>
	<author>
		<name>Claus Ibsen</name>
	</author>
	<content type="html">Hi Conrad
&lt;br&gt;&lt;br&gt;Glad you go tit solved and thanks for the pointers to the tutorial. Maybe we should link to it from camel-mina.
&lt;br&gt;&lt;br&gt;If you think you length protocol can benefit others and it should be a part of Camel then we love contributions:
&lt;br&gt;&lt;a href=&quot;http://activemq.apache.org/camel/contributing.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://activemq.apache.org/camel/contributing.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;You can attack your code as a ticket in our tracker (JIRA) at:
&lt;br&gt;&lt;a href=&quot;http://activemq.apache.org/camel/support.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://activemq.apache.org/camel/support.html&lt;/a&gt;&amp;nbsp;
&lt;br&gt;&lt;a href=&quot;http://issues.apache.org/activemq/browse/CAMEL&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://issues.apache.org/activemq/browse/CAMEL&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Med venlig hilsen
&lt;br&gt;&amp;nbsp;
&lt;br&gt;Claus Ibsen
&lt;br&gt;......................................
&lt;br&gt;Silverbullet
&lt;br&gt;Skovsgårdsvænget 21
&lt;br&gt;8362 Hørning
&lt;br&gt;Tlf. +45 2962 7576
&lt;br&gt;Web: www.silverbullet.dk
&lt;br&gt;-----Original Message-----
&lt;br&gt;From: Conrad Pilloud [mailto:&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19335454&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;conrad.pilloud@...&lt;/a&gt;] 
&lt;br&gt;Sent: 5. september 2008 17:34
&lt;br&gt;To: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19335454&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;camel-user@...&lt;/a&gt;
&lt;br&gt;Subject: RE: Camel won't invoke my custom MINA codec
&lt;br&gt;&lt;br&gt;&lt;br&gt;Thanks for the quick response. &amp;nbsp;Problem solved--my custom codec is now
&lt;br&gt;faithfully de-chunking the socket within Camel 1.4.0.
&lt;br&gt;&lt;br&gt;Following your suggestion, I turned on debug logging by adding the following
&lt;br&gt;to my POM.xml
&lt;br&gt;&amp;lt;dependency&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;lt;groupId&amp;gt;log4j&amp;lt;/groupId&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;lt;artifactId&amp;gt;log4j&amp;lt;/artifactId&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;lt;version&amp;gt;1.2.12&amp;lt;/version&amp;gt;
&lt;br&gt;&amp;lt;/dependency&amp;gt;
&lt;br&gt;And by editing log4j.properties file under src/main/resources to from INFO
&lt;br&gt;to DEBUG.
&lt;br&gt;&lt;br&gt;Sure enough, my codec bean, lcf, was not getting instantiated.
&lt;br&gt;The culprit: &amp;nbsp;I had commented out the bean in my camel-context.xml earlier
&lt;br&gt;in the day!! &amp;nbsp;Grrr. &amp;nbsp;
&lt;br&gt;&lt;br&gt;BTW, if anyone wants an example of implementing a custom codec, the MINA 
&lt;br&gt;&lt;a href=&quot;http://mina.apache.org/tutorial-on-protocolcodecfilter.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mina.apache.org/tutorial-on-protocolcodecfilter.html&lt;/a&gt;&amp;nbsp;Tutorial on
&lt;br&gt;ProtocolCodedFilter &amp;nbsp;is great. &amp;nbsp;I can e-mail my length-protocol
&lt;br&gt;implementation if anyone is interested.
&lt;br&gt;&lt;br&gt;Cheers
&lt;br&gt;Conrad
&lt;br&gt;&lt;br&gt;&lt;br&gt;Claus Ibsen wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hi
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; When you use the codec Camel will look for a spring bean with the given
&lt;br&gt;&amp;gt; id. But I guess you have tried with the bean id = lcf
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; You can enable DEBUG logging in Camel and it will output a bit more how it
&lt;br&gt;&amp;gt; configures the mina component.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; BTW: What version of Camel are you using?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Med venlig hilsen
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; Claus Ibsen
&lt;br&gt;&amp;gt; ......................................
&lt;br&gt;&amp;gt; Silverbullet
&lt;br&gt;&amp;gt; Skovsgårdsvænget 21
&lt;br&gt;&amp;gt; 8362 Hørning
&lt;br&gt;&amp;gt; Tlf. +45 2962 7576
&lt;br&gt;&amp;gt; Web: www.silverbullet.dk
&lt;br&gt;&amp;gt; 
&lt;/div&gt;-- 
&lt;br&gt;View this message in context: &lt;a href=&quot;http://www.nabble.com/Camel-won%27t-invoke-my-custom-MINA-codec-tp19322279s22882p19333803.html&quot; target=&quot;_top&quot;&gt;http://www.nabble.com/Camel-won%27t-invoke-my-custom-MINA-codec-tp19322279s22882p19333803.html&lt;/a&gt;&lt;br&gt;Sent from the Camel - Users mailing list archive at Nabble.com.
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Camel---Users-f22883.html&quot; embed=&quot;fixTarget[22883]&quot; target=&quot;_top&quot; &gt;Camel - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Camel-won%27t-invoke-my-custom-MINA-codec-tp19322279s22882p19335454.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19334170</id>
	<title>[jira] Updated: (CAMEL-855) Add Eclipse Templates</title>
	<published>2008-09-05T08:51:52Z</published>
	<updated>2008-09-05T08:51:52Z</updated>
	<author>
		<name>JIRA jira@apache.org</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;[ &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&lt;/a&gt;&amp;nbsp;]
&lt;br&gt;&lt;br&gt;Jonathan Anstey updated CAMEL-855:
&lt;br&gt;----------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Attachment: templatesChange.patch
&lt;br&gt;&lt;br&gt;Attaching a patch to change the when syntax a bit.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Add Eclipse Templates
&lt;br&gt;&amp;gt; ---------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: CAMEL-855
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-855&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-855&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Apache Camel
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: New Feature
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: tooling
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Jonathan Anstey
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Assignee: Willem Jiang
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fix For: 1.5.0
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Attachments: addCamelTemplates.patch, camel_java_templates.xml, camel_xml_templates.xml, templatesChange.patch
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I did up some Eclipse templates for some of the Camel EIPs (both Java and XML). Let me know what you think.
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Camel---Development-f22884.html&quot; embed=&quot;fixTarget[22884]&quot; target=&quot;_top&quot; &gt;Camel - Development&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-jira--Created%3A-%28CAMEL-855%29-Add-Eclipse-Templates-tp19173000s22882p19334170.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19334171</id>
	<title>[jira] Updated: (CAMEL-855) Add Eclipse Templates</title>
	<published>2008-09-05T08:51:52Z</published>
	<updated>2008-09-05T08:51:52Z</updated>
	<author>
		<name>JIRA jira@apache.org</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;[ &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&lt;/a&gt;&amp;nbsp;]
&lt;br&gt;&lt;br&gt;Jonathan Anstey updated CAMEL-855:
&lt;br&gt;----------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Patch Info: [Patch Available]
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Add Eclipse Templates
&lt;br&gt;&amp;gt; ---------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: CAMEL-855
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-855&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-855&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Apache Camel
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: New Feature
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: tooling
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Jonathan Anstey
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Assignee: Willem Jiang
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fix For: 1.5.0
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Attachments: addCamelTemplates.patch, camel_java_templates.xml, camel_xml_templates.xml, templatesChange.patch
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I did up some Eclipse templates for some of the Camel EIPs (both Java and XML). Let me know what you think.
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Camel---Development-f22884.html&quot; embed=&quot;fixTarget[22884]&quot; target=&quot;_top&quot; &gt;Camel - Development&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-jira--Created%3A-%28CAMEL-855%29-Add-Eclipse-Templates-tp19173000s22882p19334171.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19333944</id>
	<title>[jira] Commented: (CAMEL-855) Add Eclipse Templates</title>
	<published>2008-09-05T08:39:52Z</published>
	<updated>2008-09-05T08:39:52Z</updated>
	<author>
		<name>JIRA jira@apache.org</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; [ &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=45469#action_45469&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=45469#action_45469&lt;/a&gt;&amp;nbsp;] 
&lt;br&gt;&lt;br&gt;Jonathan Anstey commented on CAMEL-855:
&lt;br&gt;---------------------------------------
&lt;br&gt;&lt;br&gt;I just looked back at my comment here and realized I totally misread James' comment! :) James mentioned that this
&lt;br&gt;&lt;br&gt;{code:language=java}
&lt;br&gt;.when().xpath(&amp;quot;$foo = 'bar'&amp;quot;).to(&amp;quot;mock:x&amp;quot;)
&lt;br&gt;{code}
&lt;br&gt;&lt;br&gt;would be better than this
&lt;br&gt;&lt;br&gt;{code:language=java}
&lt;br&gt;.when(header(&amp;quot;foo&amp;quot;).isEqualTo(&amp;quot;bar&amp;quot;)).to(&amp;quot;mock:x&amp;quot;)
&lt;br&gt;{code}
&lt;br&gt;&lt;br&gt;The xpath one IS actually closer to the XML template (unlike I mentioned before...). I'll attach a patch for this shortly.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Add Eclipse Templates
&lt;br&gt;&amp;gt; ---------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: CAMEL-855
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-855&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-855&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Apache Camel
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: New Feature
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: tooling
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Jonathan Anstey
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Assignee: Willem Jiang
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fix For: 1.5.0
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Attachments: addCamelTemplates.patch, camel_java_templates.xml, camel_xml_templates.xml
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I did up some Eclipse templates for some of the Camel EIPs (both Java and XML). Let me know what you think.
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Camel---Development-f22884.html&quot; embed=&quot;fixTarget[22884]&quot; target=&quot;_top&quot; &gt;Camel - Development&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-jira--Created%3A-%28CAMEL-855%29-Add-Eclipse-Templates-tp19173000s22882p19333944.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19333803</id>
	<title>RE: Camel won't invoke my custom MINA codec</title>
	<published>2008-09-05T08:33:42Z</published>
	<updated>2008-09-05T08:33:42Z</updated>
	<author>
		<name>Conrad Pilloud</name>
	</author>
	<content type="html">Thanks for the quick response. &amp;nbsp;Problem solved--my custom codec is now faithfully de-chunking the socket within Camel 1.4.0.
&lt;br&gt;&lt;br&gt;Following your suggestion, I turned on debug logging by adding the following to my POM.xml
&lt;br&gt;&amp;lt;dependency&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;lt;groupId&amp;gt;log4j&amp;lt;/groupId&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;lt;artifactId&amp;gt;log4j&amp;lt;/artifactId&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;lt;version&amp;gt;1.2.12&amp;lt;/version&amp;gt;
&lt;br&gt;&amp;lt;/dependency&amp;gt;
&lt;br&gt;And by editing log4j.properties file under src/main/resources to from INFO to DEBUG.
&lt;br&gt;&lt;br&gt;Sure enough, my codec bean, lcf, was not getting instantiated.
&lt;br&gt;&lt;b&gt;The culprit: &amp;nbsp;I had &lt;i&gt;commented out&lt;/i&gt;&amp;nbsp;the bean in my camel-context.xml earlier in the day!!&lt;/b&gt;&amp;nbsp; Grrr. &amp;nbsp;
&lt;br&gt;&lt;br&gt;BTW, if anyone wants an example of implementing a custom codec, the MINA &lt;a href=&quot;http://mina.apache.org/tutorial-on-protocolcodecfilter.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Tutorial on ProtocolCodedFilter&lt;/a&gt;&amp;nbsp;is great. &amp;nbsp;I can e-mail my length-protocol implementation if anyone is interested.
&lt;br&gt;&lt;br&gt;Cheers
&lt;br&gt;Conrad
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Claus Ibsen wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hi
&lt;br&gt;&lt;br&gt;When you use the codec Camel will look for a spring bean with the given id. But I guess you have tried with the bean id = lcf
&lt;br&gt;&lt;br&gt;You can enable DEBUG logging in Camel and it will output a bit more how it configures the mina component.
&lt;br&gt;&lt;br&gt;BTW: What version of Camel are you using?
&lt;br&gt;&lt;br&gt;&lt;br&gt;Med venlig hilsen
&lt;br&gt;&amp;nbsp;
&lt;br&gt;Claus Ibsen
&lt;br&gt;......................................
&lt;br&gt;Silverbullet
&lt;br&gt;Skovsgårdsvænget 21
&lt;br&gt;8362 Hørning
&lt;br&gt;Tlf. +45 2962 7576
&lt;br&gt;Web: www.silverbullet.dk
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Camel---Users-f22883.html&quot; embed=&quot;fixTarget[22883]&quot; target=&quot;_top&quot; &gt;Camel - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Camel-won%27t-invoke-my-custom-MINA-codec-tp19322279s22882p19333803.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19332657</id>
	<title>[jira] Commented: (CAMEL-756) AMQP component can't send an ObjectMessage</title>
	<published>2008-09-05T07:37:52Z</published>
	<updated>2008-09-05T07:37:52Z</updated>
	<author>
		<name>JIRA jira@apache.org</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; [ &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=45467#action_45467&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=45467#action_45467&lt;/a&gt;&amp;nbsp;] 
&lt;br&gt;&lt;br&gt;Jonathan Anstey commented on CAMEL-756:
&lt;br&gt;---------------------------------------
&lt;br&gt;&lt;br&gt;FYI M3 has just passed the vote so will be available soonish. The issue in Qpid has been fixed in M3 so sending ObjectMessages should be OK... a quick test didn't work for me but maybe after a little more investigation this can be solved for Camel 1.5.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; AMQP component can't send an ObjectMessage
&lt;br&gt;&amp;gt; ------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: CAMEL-756
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-756&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-756&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Apache Camel
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Bug
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Affects Versions: 1.4.0
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Jonathan Anstey
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fix For: 1.5.0
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Sending a TextMessage and BytesMessage work fine but when you try to send a Serializable object it gets lost somehow... see the testJmsRouteWithObjectMessage test in &lt;a href=&quot;http://svn.apache.org/repos/asf/activemq/camel/trunk/components/camel-amqp/src/test/java/org/apache/camel/component/amqp/AMQPRouteTest.java&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://svn.apache.org/repos/asf/activemq/camel/trunk/components/camel-amqp/src/test/java/org/apache/camel/component/amqp/AMQPRouteTest.java&lt;/a&gt;&amp;nbsp;to see what happens.
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Camel---Development-f22884.html&quot; embed=&quot;fixTarget[22884]&quot; target=&quot;_top&quot; &gt;Camel - Development&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-jira--Created%3A-%28CAMEL-756%29-AMQP-component-can%27t-send-an-ObjectMessage-tp18637523s22882p19332657.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19332668</id>
	<title>[jira] Assigned: (CAMEL-756) AMQP component can't send an ObjectMessage</title>
	<published>2008-09-05T07:37:52Z</published>
	<updated>2008-09-05T07:37:52Z</updated>
	<author>
		<name>JIRA jira@apache.org</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;[ &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&lt;/a&gt;&amp;nbsp;]
&lt;br&gt;&lt;br&gt;Jonathan Anstey reassigned CAMEL-756:
&lt;br&gt;-------------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Assignee: Jonathan Anstey
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; AMQP component can't send an ObjectMessage
&lt;br&gt;&amp;gt; ------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: CAMEL-756
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-756&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-756&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Apache Camel
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Bug
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Affects Versions: 1.4.0
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Jonathan Anstey
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Assignee: Jonathan Anstey
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fix For: 1.5.0
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Sending a TextMessage and BytesMessage work fine but when you try to send a Serializable object it gets lost somehow... see the testJmsRouteWithObjectMessage test in &lt;a href=&quot;http://svn.apache.org/repos/asf/activemq/camel/trunk/components/camel-amqp/src/test/java/org/apache/camel/component/amqp/AMQPRouteTest.java&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://svn.apache.org/repos/asf/activemq/camel/trunk/components/camel-amqp/src/test/java/org/apache/camel/component/amqp/AMQPRouteTest.java&lt;/a&gt;&amp;nbsp;to see what happens.
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Camel---Development-f22884.html&quot; embed=&quot;fixTarget[22884]&quot; target=&quot;_top&quot; &gt;Camel - Development&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-jira--Created%3A-%28CAMEL-756%29-AMQP-component-can%27t-send-an-ObjectMessage-tp18637523s22882p19332668.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19332632</id>
	<title>[jira] Updated: (CAMEL-878) Support stop() on an intercept route in Spring DSL</title>
	<published>2008-09-05T07:35:52Z</published>
	<updated>2008-09-05T07:35:52Z</updated>
	<author>
		<name>JIRA jira@apache.org</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;[ &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-878?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-878?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&lt;/a&gt;&amp;nbsp;]
&lt;br&gt;&lt;br&gt;Jonathan Anstey updated CAMEL-878:
&lt;br&gt;----------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Patch Info: [Patch Available]
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Support stop() on an intercept route in Spring DSL
&lt;br&gt;&amp;gt; --------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: CAMEL-878
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-878&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-878&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Apache Camel
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Improvement
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: camel-core, camel-spring
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Jonathan Anstey
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Assignee: Jonathan Anstey
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fix For: 1.5.0
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Attachments: camel-878.patch
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; See &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-460&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-460&lt;/a&gt;&amp;nbsp;for the discussion on this.
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Camel---Development-f22884.html&quot; embed=&quot;fixTarget[22884]&quot; target=&quot;_top&quot; &gt;Camel - Development&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-jira--Created%3A-%28CAMEL-878%29-Support-stop%28%29-on-an-intercept-route-in-Spring-DSL-tp19311071s22882p19332632.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19332633</id>
	<title>[jira] Commented: (CAMEL-878) Support stop() on an intercept route in Spring DSL</title>
	<published>2008-09-05T07:35:52Z</published>
	<updated>2008-09-05T07:35:52Z</updated>
	<author>
		<name>JIRA jira@apache.org</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; [ &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=45466#action_45466&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=45466#action_45466&lt;/a&gt;&amp;nbsp;] 
&lt;br&gt;&lt;br&gt;Jonathan Anstey commented on CAMEL-878:
&lt;br&gt;---------------------------------------
&lt;br&gt;&lt;br&gt;BTW having a predicate within the intercept is still an issue in the Spring DSL... this patch doesn't fix that issue. See CAMEL-879
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Support stop() on an intercept route in Spring DSL
&lt;br&gt;&amp;gt; --------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: CAMEL-878
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-878&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-878&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Apache Camel
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Improvement
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: camel-core, camel-spring
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Jonathan Anstey
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Assignee: Jonathan Anstey
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fix For: 1.5.0
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Attachments: camel-878.patch
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; See &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-460&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-460&lt;/a&gt;&amp;nbsp;for the discussion on this.
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Camel---Development-f22884.html&quot; embed=&quot;fixTarget[22884]&quot; target=&quot;_top&quot; &gt;Camel - Development&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-jira--Created%3A-%28CAMEL-878%29-Support-stop%28%29-on-an-intercept-route-in-Spring-DSL-tp19311071s22882p19332633.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19332581</id>
	<title>[jira] Updated: (CAMEL-878) Support stop() on an intercept route in Spring DSL</title>
	<published>2008-09-05T07:33:52Z</published>
	<updated>2008-09-05T07:33:52Z</updated>
	<author>
		<name>JIRA jira@apache.org</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;[ &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-878?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-878?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&lt;/a&gt;&amp;nbsp;]
&lt;br&gt;&lt;br&gt;Jonathan Anstey updated CAMEL-878:
&lt;br&gt;----------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Attachment: camel-878.patch
&lt;br&gt;&lt;br&gt;Patch to fix this issue. 
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Support stop() on an intercept route in Spring DSL
&lt;br&gt;&amp;gt; --------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: CAMEL-878
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-878&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-878&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Apache Camel
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Improvement
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: camel-core, camel-spring
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Jonathan Anstey
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Assignee: Jonathan Anstey
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fix For: 1.5.0
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Attachments: camel-878.patch
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; See &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-460&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-460&lt;/a&gt;&amp;nbsp;for the discussion on this.
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Camel---Development-f22884.html&quot; embed=&quot;fixTarget[22884]&quot; target=&quot;_top&quot; &gt;Camel - Development&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-jira--Created%3A-%28CAMEL-878%29-Support-stop%28%29-on-an-intercept-route-in-Spring-DSL-tp19311071s22882p19332581.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19332471</id>
	<title>[jira] Resolved: (CAMEL-460) Add spring unit tests for the intercept() feature</title>
	<published>2008-09-05T07:27:52Z</published>
	<updated>2008-09-05T07:27:52Z</updated>
	<author>
		<name>JIRA jira@apache.org</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;[ &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-460?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-460?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&lt;/a&gt;&amp;nbsp;]
&lt;br&gt;&lt;br&gt;Jonathan Anstey resolved CAMEL-460.
&lt;br&gt;-----------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Resolution: Fixed
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Add spring unit tests for the intercept() feature
&lt;br&gt;&amp;gt; -------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: CAMEL-460
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-460&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-460&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Apache Camel
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Test
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: camel-spring
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Affects Versions: 1.3.0
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Jonathan Anstey
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Assignee: Willem Jiang
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fix For: 1.5.0
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Attachments: camel-460.patch
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Camel---Development-f22884.html&quot; embed=&quot;fixTarget[22884]&quot; target=&quot;_top&quot; &gt;Camel - Development&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-jira--Created%3A-%28CAMEL-460%29-Add-spring-unit-tests-for-the-intercept%28%29-feature-tp16669935s22882p19332471.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19332475</id>
	<title>[jira] Commented: (CAMEL-879) InterceptType does not support taking a predicate in Spring DSL</title>
	<published>2008-09-05T07:27:52Z</published>
	<updated>2008-09-05T07:27:52Z</updated>
	<author>
		<name>JIRA jira@apache.org</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; [ &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=45463#action_45463&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=45463#action_45463&lt;/a&gt;&amp;nbsp;] 
&lt;br&gt;&lt;br&gt;Jonathan Anstey commented on CAMEL-879:
&lt;br&gt;---------------------------------------
&lt;br&gt;&lt;br&gt;See comment from Willem in CAMEL-460.
&lt;br&gt;&lt;br&gt;&amp;quot; InterceptType also not support take the predicate from XML,
&lt;br&gt;if I put a ChoiceType member in the interceptType , I will create a Cycle dependency between the InterceptType and ChoiceType.&amp;quot;
&lt;br&gt;&lt;br&gt;&amp;gt; InterceptType does not support taking a predicate in Spring DSL
&lt;br&gt;&amp;gt; ---------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: CAMEL-879
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-879&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-879&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Apache Camel
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Sub-task
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Jonathan Anstey
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Camel---Development-f22884.html&quot; embed=&quot;fixTarget[22884]&quot; target=&quot;_top&quot; &gt;Camel - Development&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-jira--Created%3A-%28CAMEL-879%29-InterceptType-does-not-support-taking-a-predicate-in-Spring-DSL-tp19332444s22882p19332475.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19332479</id>
	<title>[jira] Commented: (CAMEL-460) Add spring unit tests for the intercept() feature</title>
	<published>2008-09-05T07:27:52Z</published>
	<updated>2008-09-05T07:27:52Z</updated>
	<author>
		<name>JIRA jira@apache.org</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; [ &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=45464#action_45464&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=45464#action_45464&lt;/a&gt;&amp;nbsp;] 
&lt;br&gt;&lt;br&gt;Jonathan Anstey commented on CAMEL-460:
&lt;br&gt;---------------------------------------
&lt;br&gt;&lt;br&gt;Created CAMEL-879 for the issue with predicates that Willem mentioned. Closing this JIRA.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Add spring unit tests for the intercept() feature
&lt;br&gt;&amp;gt; -------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: CAMEL-460
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-460&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-460&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Apache Camel
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Test
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: camel-spring
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Affects Versions: 1.3.0
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Jonathan Anstey
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Assignee: Willem Jiang
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fix For: 1.5.0
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Attachments: camel-460.patch
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Camel---Development-f22884.html&quot; embed=&quot;fixTarget[22884]&quot; target=&quot;_top&quot; &gt;Camel - Development&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-jira--Created%3A-%28CAMEL-460%29-Add-spring-unit-tests-for-the-intercept%28%29-feature-tp16669935s22882p19332479.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19332444</id>
	<title>[jira] Created: (CAMEL-879) InterceptType does not support taking a predicate in Spring DSL</title>
	<published>2008-09-05T07:25:55Z</published>
	<updated>2008-09-05T07:25:55Z</updated>
	<author>
		<name>JIRA jira@apache.org</name>
	</author>
	<content type="html">InterceptType does not support taking a predicate in Spring DSL
&lt;br&gt;---------------------------------------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Key: CAMEL-879
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;URL: &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-879&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-879&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Project: Apache Camel
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Issue Type: Sub-task
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Reporter: Jonathan Anstey
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Camel---Development-f22884.html&quot; embed=&quot;fixTarget[22884]&quot; target=&quot;_top&quot; &gt;Camel - Development&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-jira--Created%3A-%28CAMEL-879%29-InterceptType-does-not-support-taking-a-predicate-in-Spring-DSL-tp19332444s22882p19332444.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19331003</id>
	<title>Reliable resequencing</title>
	<published>2008-09-05T06:16:23Z</published>
	<updated>2008-09-05T06:16:23Z</updated>
	<author>
		<name>Dirk Mahler</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;we integrated Camel 1.4 as JBI component into ServiceMix and tried to use the stream resequencer to reconstruct the &amp;quot;natural&amp;quot; order of our messages.
&lt;br&gt;&lt;br&gt;The routing on ServiceMix (SMX) level is defined as follows:
&lt;br&gt;&lt;br&gt;SMX transactional JMS/JCA consumer -&amp;gt; Camel JBI Component -&amp;gt; SMX Bean SE
&lt;br&gt;&lt;br&gt;The Camel JBI Component is configured to provide resequencing the following way (I left out some message body conversion stuff):
&lt;br&gt;&lt;br&gt;from(&amp;quot;jbi:endpoint:...&amp;quot;)
&lt;br&gt;&amp;nbsp; .resequencer(sequenceExpression)
&lt;br&gt;&amp;nbsp; .stream(config)
&lt;br&gt;&amp;nbsp; .to(&amp;quot;jbi:endpoint:.../beanEndpoint&amp;quot;);
&lt;br&gt;&lt;br&gt;Resequencing seems to work but according to some simple tests it cannot be guaranteed that all messages will reach the final consumer (in our case the bean endpoint) if there's a system failure: Camel acknowlegdes the message exchange to the JMS Consumer but then holds the messages in a non-persistent queue before delivering them to the SMX bean endpoint. We found an existing JIRA issue (CAMEL-126, &lt;a href=&quot;https://issues.apache.org/activemq/browse/CAMEL-126&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/activemq/browse/CAMEL-126&lt;/a&gt;) which at a first glance seems to address our concerns by thinking about synchronous dispatching - would this solve our problem or is there already another solution?
&lt;br&gt;&lt;br&gt;&lt;div class=&quot;signature&quot;&gt;Dirk Mahler
&lt;br&gt;Senior Consultant
&lt;br&gt;&lt;br&gt;-----------------------------------------------------------------
&lt;br&gt;buschmais GbR
&lt;br&gt;Inhaber &amp;nbsp;Torsten Busch, Frank Schwarz, Dirk Mahler, Tobias Israel
&lt;br&gt;Adresse &amp;nbsp;buschmais GbR, Leipziger Straße 93, 01127 Dresden
&lt;br&gt;Telefon &amp;nbsp;+49 (0) 351 3209 23-0
&lt;br&gt;Fax &amp;nbsp; &amp;nbsp; &amp;nbsp; +49 (0) 351 3209 23-29
&lt;br&gt;Telefon &amp;nbsp;+49 (0) 1577 198 295 0
&lt;br&gt;E-Mail &amp;nbsp; dirk.mahler@buschmais.com
&lt;br&gt;Internet &lt;a href=&quot;http://www.buschmais.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.buschmais.de&lt;/a&gt;&lt;br&gt;-----------------------------------------------------------------&lt;/div&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Camel---Users-f22883.html&quot; embed=&quot;fixTarget[22883]&quot; target=&quot;_top&quot; &gt;Camel - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Reliable-resequencing-tp19331003s22882p19331003.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19329629</id>
	<title>[CONF] Apache Camel: Tutorial-Example-ReportIncident-Part1 (page edited)</title>
	<published>2008-09-05T04:53:00Z</published>
	<updated>2008-09-05T04:53:00Z</updated>
	<author>
		<name>confluence-2</name>
	</author>
	<content type="html">&lt;html&gt;
&lt;head&gt;
    &lt;base href=&quot;http://cwiki.apache.org/confluence&quot; /&gt;
    
&lt;/head&gt;
&lt;body&gt;

&lt;div id=&quot;PageContent&quot;&gt;
&lt;table class=&quot;pagecontent&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;&gt;&lt;tr&gt;
&lt;td valign=&quot;top&quot; class=&quot;pagebody&quot;&gt;

    &lt;div class=&quot;pageheader&quot;&gt;
        &lt;span class=&quot;pagetitle&quot;&gt;
            Page Edited :
            &lt;a href=&quot;http://cwiki.apache.org/confluence/display/CAMEL&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;CAMEL&lt;/a&gt; :
            &lt;a href=&quot;http://cwiki.apache.org/confluence/display/CAMEL/Tutorial-Example-ReportIncident-Part1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Tutorial-Example-ReportIncident-Part1&lt;/a&gt;
        &lt;/span&gt;
    &lt;/div&gt;

     &lt;p&gt;
        &lt;a href=&quot;http://cwiki.apache.org/confluence/display/CAMEL/Tutorial-Example-ReportIncident-Part1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Tutorial-Example-ReportIncident-Part1&lt;/a&gt;
        has been edited by             &lt;a href=&quot;http://cwiki.apache.org/confluence/display/~pledge&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Martin Gilday&lt;/a&gt;
            &lt;span class=&quot;smallfont&quot;&gt;(Sep 05, 2008)&lt;/span&gt;.
     &lt;/p&gt;
    
     &lt;p&gt;
                 &lt;a href=&quot;http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=90920&amp;originalVersion=19&amp;revisedVersion=20&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;(View changes)&lt;/a&gt;
     &lt;/p&gt;

    &lt;span class=&quot;label&quot;&gt;Content:&lt;/span&gt;&lt;br /&gt;
    &lt;div class=&quot;greybox wiki-content&quot;&gt;&lt;h1&gt;&lt;a name=&quot;Tutorial-Example-ReportIncident-Part1-Part1&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;Part 1&lt;/h1&gt;

&lt;h2&gt;&lt;a name=&quot;Tutorial-Example-ReportIncident-Part1-Prerequisites&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;This tutorial uses the following frameworks:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Maven 2.0.9&lt;/li&gt;
	&lt;li&gt;Apache Camel 1.4.0&lt;/li&gt;
	&lt;li&gt;Apache CXF 2.1.1&lt;/li&gt;
	&lt;li&gt;Spring 2.5.5&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;b&gt;Note:&lt;/b&gt; The sample project can be downloaded, see the &lt;a href=&quot;#Tutorial-Example-ReportIncident-Part1-Resources&quot; title=&quot;Resources on Tutorial-Example-ReportIncident-Part1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;resources&lt;/a&gt; section.&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;Tutorial-Example-ReportIncident-Part1-InitialProjectSetup&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;Initial Project Setup&lt;/h2&gt;
&lt;p&gt;We want the integration to be a standard .war application that can be deployed in any web container such as Tomcat, Jetty or even heavy weight application servers such as WebLogic or WebSphere. There fore we start off with the standard Maven webapp project that is created with the following long archetype command:&lt;/p&gt;

&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;codeContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;mvn archetype:create -DgroupId=org.apache.camel -DartifactId=camel-example-reportincident -DarchetypeArtifactId=maven-archetype-webapp&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Notice that the groupId etc. doens't have to be org.apache.camel it can be com.mycompany.whatever. But I have used these package names as the example is an official part of the Camel distribution.&lt;/p&gt;

&lt;p&gt;Then we have the basic maven folder layout. We start out with the webservice part where we want to use Apache CXF for the webservice stuff. So we add this to the pom.xml&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;codeContent&quot;&gt;
&lt;pre class=&quot;code-xml&quot;&gt;&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;properties&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;cxf-version&amp;gt;&lt;/span&gt;2.1.1&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/cxf-version&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/properties&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.apache.cxf&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;cxf-rt-core&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;${cxf-version}&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.apache.cxf&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;cxf-rt-frontend-jaxws&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;${cxf-version}&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.apache.cxf&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;cxf-rt-transports-http&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;${cxf-version}&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h2&gt;&lt;a name=&quot;Tutorial-Example-ReportIncident-Part1-DevelopingtheWebService&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;Developing the WebService&lt;/h2&gt;
&lt;p&gt;As we want to develop webservice with the contract first approach we create our .wsdl file. As this is a example we have simplified the model of the incident to only include 8 fields. In real life the model would be a bit more complex, but not to much.&lt;/p&gt;

&lt;p&gt;We put the wsdl file in the folder &lt;tt&gt;src/main/webapp/WEB-INF/wsdl&lt;/tt&gt; and name the file &lt;tt&gt;report_incident.wsdl&lt;/tt&gt;.&lt;/p&gt;

&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;codeContent&quot;&gt;
&lt;pre class=&quot;code-xml&quot;&gt;&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;?xml version=&lt;span class=&quot;code-quote&quot;&gt;&quot;1.0&quot;&lt;/span&gt; encoding=&lt;span class=&quot;code-quote&quot;&gt;&quot;ISO-8859-1&quot;&lt;/span&gt;?&amp;gt;&lt;/span&gt;
&amp;lt;wsdl:definitions &lt;span class=&quot;code-keyword&quot;&gt;xmlns:soap&lt;/span&gt;=&lt;span class=&quot;code-quote&quot;&gt;&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot;&lt;/span&gt;
	&lt;span class=&quot;code-keyword&quot;&gt;xmlns:tns&lt;/span&gt;=&lt;span class=&quot;code-quote&quot;&gt;&quot;http://reportincident.example.camel.apache.org&quot;&lt;/span&gt;
	&lt;span class=&quot;code-keyword&quot;&gt;xmlns:xs&lt;/span&gt;=&lt;span class=&quot;code-quote&quot;&gt;&quot;http://www.w3.org/2001/XMLSchema&quot;&lt;/span&gt;
	&lt;span class=&quot;code-keyword&quot;&gt;xmlns:http&lt;/span&gt;=&lt;span class=&quot;code-quote&quot;&gt;&quot;http://schemas.xmlsoap.org/wsdl/http/&quot;&lt;/span&gt;
	&lt;span class=&quot;code-keyword&quot;&gt;xmlns:wsdl&lt;/span&gt;=&lt;span class=&quot;code-quote&quot;&gt;&quot;http://schemas.xmlsoap.org/wsdl/&quot;&lt;/span&gt;
	targetNamespace=&lt;span class=&quot;code-quote&quot;&gt;&quot;http://reportincident.example.camel.apache.org&quot;&lt;/span&gt;&amp;gt;

	&lt;span class=&quot;code-tag&quot;&gt;&lt;span class=&quot;code-comment&quot;&gt;&amp;lt;!-- Type definitions for input- and output parameters for webservice --&amp;gt;&lt;/span&gt;&lt;/span&gt;
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;wsdl:types&amp;gt;&lt;/span&gt;
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;xs:schema targetNamespace=&lt;span class=&quot;code-quote&quot;&gt;&quot;http://reportincident.example.camel.apache.org&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;xs:element name=&lt;span class=&quot;code-quote&quot;&gt;&quot;inputReportIncident&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
				&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;xs:complexType&amp;gt;&lt;/span&gt;
					&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;xs:sequence&amp;gt;&lt;/span&gt;
						&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;xs:element type=&lt;span class=&quot;code-quote&quot;&gt;&quot;xs:string&quot;&lt;/span&gt;  name=&lt;span class=&quot;code-quote&quot;&gt;&quot;incidentId&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;
						&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;xs:element type=&lt;span class=&quot;code-quote&quot;&gt;&quot;xs:string&quot;&lt;/span&gt;  name=&lt;span class=&quot;code-quote&quot;&gt;&quot;incidentDate&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;
						&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;xs:element type=&lt;span class=&quot;code-quote&quot;&gt;&quot;xs:string&quot;&lt;/span&gt;  name=&lt;span class=&quot;code-quote&quot;&gt;&quot;givenName&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;
						&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;xs:element type=&lt;span class=&quot;code-quote&quot;&gt;&quot;xs:string&quot;&lt;/span&gt;  name=&lt;span class=&quot;code-quote&quot;&gt;&quot;familyName&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;
						&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;xs:element type=&lt;span class=&quot;code-quote&quot;&gt;&quot;xs:string&quot;&lt;/span&gt;  name=&lt;span class=&quot;code-quote&quot;&gt;&quot;summary&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;
						&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;xs:element type=&lt;span class=&quot;code-quote&quot;&gt;&quot;xs:string&quot;&lt;/span&gt;  name=&lt;span class=&quot;code-quote&quot;&gt;&quot;details&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;
						&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;xs:element type=&lt;span class=&quot;code-quote&quot;&gt;&quot;xs:string&quot;&lt;/span&gt;  name=&lt;span class=&quot;code-quote&quot;&gt;&quot;email&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;
						&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;xs:element type=&lt;span class=&quot;code-quote&quot;&gt;&quot;xs:string&quot;&lt;/span&gt;  name=&lt;span class=&quot;code-quote&quot;&gt;&quot;phone&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;
					&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/xs:sequence&amp;gt;&lt;/span&gt;
				&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/xs:complexType&amp;gt;&lt;/span&gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/xs:element&amp;gt;&lt;/span&gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;xs:element name=&lt;span class=&quot;code-quote&quot;&gt;&quot;outputReportIncident&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
				&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;xs:complexType&amp;gt;&lt;/span&gt;
					&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;xs:sequence&amp;gt;&lt;/span&gt;
						&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;xs:element type=&lt;span class=&quot;code-quote&quot;&gt;&quot;xs:string&quot;&lt;/span&gt; name=&lt;span class=&quot;code-quote&quot;&gt;&quot;code&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;
					&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/xs:sequence&amp;gt;&lt;/span&gt;
				&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/xs:complexType&amp;gt;&lt;/span&gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/xs:element&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/xs:schema&amp;gt;&lt;/span&gt;
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/wsdl:types&amp;gt;&lt;/span&gt;

	&lt;span class=&quot;code-tag&quot;&gt;&lt;span class=&quot;code-comment&quot;&gt;&amp;lt;!-- Message definitions for input and output --&amp;gt;&lt;/span&gt;&lt;/span&gt;
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;wsdl:message name=&lt;span class=&quot;code-quote&quot;&gt;&quot;inputReportIncident&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;wsdl:part name=&lt;span class=&quot;code-quote&quot;&gt;&quot;parameters&quot;&lt;/span&gt; element=&lt;span class=&quot;code-quote&quot;&gt;&quot;tns:inputReportIncident&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/wsdl:message&amp;gt;&lt;/span&gt;
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;wsdl:message name=&lt;span class=&quot;code-quote&quot;&gt;&quot;outputReportIncident&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;wsdl:part name=&lt;span class=&quot;code-quote&quot;&gt;&quot;parameters&quot;&lt;/span&gt; element=&lt;span class=&quot;code-quote&quot;&gt;&quot;tns:outputReportIncident&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/wsdl:message&amp;gt;&lt;/span&gt;

	&lt;span class=&quot;code-tag&quot;&gt;&lt;span class=&quot;code-comment&quot;&gt;&amp;lt;!-- Port (interface) definitions --&amp;gt;&lt;/span&gt;&lt;/span&gt;
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;wsdl:portType name=&lt;span class=&quot;code-quote&quot;&gt;&quot;ReportIncidentEndpoint&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;wsdl:operation name=&lt;span class=&quot;code-quote&quot;&gt;&quot;ReportIncident&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;wsdl:input message=&lt;span class=&quot;code-quote&quot;&gt;&quot;tns:inputReportIncident&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;wsdl:output message=&lt;span class=&quot;code-quote&quot;&gt;&quot;tns:outputReportIncident&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/wsdl:operation&amp;gt;&lt;/span&gt;
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/wsdl:portType&amp;gt;&lt;/span&gt;

	&lt;span class=&quot;code-tag&quot;&gt;&lt;span class=&quot;code-comment&quot;&gt;&amp;lt;!-- Port bindings to transports and encoding - HTTP, document literal encoding is used --&amp;gt;&lt;/span&gt;&lt;/span&gt;
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;wsdl:binding name=&lt;span class=&quot;code-quote&quot;&gt;&quot;ReportIncidentBinding&quot;&lt;/span&gt; type=&lt;span class=&quot;code-quote&quot;&gt;&quot;tns:ReportIncidentEndpoint&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;soap:binding transport=&lt;span class=&quot;code-quote&quot;&gt;&quot;http://schemas.xmlsoap.org/soap/http&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;wsdl:operation name=&lt;span class=&quot;code-quote&quot;&gt;&quot;ReportIncident&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
			&amp;lt;soap:operation
				soapAction=&lt;span class=&quot;code-quote&quot;&gt;&quot;http://reportincident.example.camel.apache.org/ReportIncident&quot;&lt;/span&gt;
				style=&lt;span class=&quot;code-quote&quot;&gt;&quot;document&quot;&lt;/span&gt;/&amp;gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;wsdl:input&amp;gt;&lt;/span&gt;
				&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;soap:body parts=&lt;span class=&quot;code-quote&quot;&gt;&quot;parameters&quot;&lt;/span&gt; use=&lt;span class=&quot;code-quote&quot;&gt;&quot;literal&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/wsdl:input&amp;gt;&lt;/span&gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;wsdl:output&amp;gt;&lt;/span&gt;
				&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;soap:body parts=&lt;span class=&quot;code-quote&quot;&gt;&quot;parameters&quot;&lt;/span&gt; use=&lt;span class=&quot;code-quote&quot;&gt;&quot;literal&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/wsdl:output&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/wsdl:operation&amp;gt;&lt;/span&gt;
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/wsdl:binding&amp;gt;&lt;/span&gt;

	&lt;span class=&quot;code-tag&quot;&gt;&lt;span class=&quot;code-comment&quot;&gt;&amp;lt;!-- Service definition --&amp;gt;&lt;/span&gt;&lt;/span&gt;
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;wsdl:service name=&lt;span class=&quot;code-quote&quot;&gt;&quot;ReportIncidentService&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;wsdl:port name=&lt;span class=&quot;code-quote&quot;&gt;&quot;ReportIncidentPort&quot;&lt;/span&gt; binding=&lt;span class=&quot;code-quote&quot;&gt;&quot;tns:ReportIncidentBinding&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;soap:address location=&lt;span class=&quot;code-quote&quot;&gt;&quot;http://reportincident.example.camel.apache.org&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/wsdl:port&amp;gt;&lt;/span&gt;
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/wsdl:service&amp;gt;&lt;/span&gt;

&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/wsdl:definitions&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;h3&gt;&lt;a name=&quot;Tutorial-Example-ReportIncident-Part1-CXFwsdl2java&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;CXF wsdl2java&lt;/h3&gt;
&lt;p&gt;Then we integration the CXF wsdl2java generator in the pom.xml so we have CXF generate the needed POJO classes for our webservice contract. &lt;br /&gt;
However at first we must configure maven to live in the modern world of Java 1.5 so we must add this to the pom.xml&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;codeContent&quot;&gt;
&lt;pre class=&quot;code-xml&quot;&gt;&lt;span class=&quot;code-tag&quot;&gt;&lt;span class=&quot;code-comment&quot;&gt;&amp;lt;!-- to compile with 1.5 --&amp;gt;&lt;/span&gt;&lt;/span&gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;plugin&amp;gt;&lt;/span&gt;
				&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.apache.maven.plugins&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
				&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;maven-compiler-plugin&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
				&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;configuration&amp;gt;&lt;/span&gt;
					&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;source&amp;gt;&lt;/span&gt;1.5&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/source&amp;gt;&lt;/span&gt;
					&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;target&amp;gt;&lt;/span&gt;1.5&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/target&amp;gt;&lt;/span&gt;
				&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/configuration&amp;gt;&lt;/span&gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/plugin&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And then we can add the CXF wsdl2java code generator that will hook into the compile goal so its automatic run all the time:&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;codeContent&quot;&gt;
&lt;pre class=&quot;code-xml&quot;&gt;&lt;span class=&quot;code-tag&quot;&gt;&lt;span class=&quot;code-comment&quot;&gt;&amp;lt;!-- CXF wsdl2java generator, will plugin to the compile goal --&amp;gt;&lt;/span&gt;&lt;/span&gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;plugin&amp;gt;&lt;/span&gt;
				&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.apache.cxf&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
				&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;cxf-codegen-plugin&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
				&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;${cxf-version}&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
				&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;executions&amp;gt;&lt;/span&gt;
					&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;execution&amp;gt;&lt;/span&gt;
						&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;id&amp;gt;&lt;/span&gt;generate-sources&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/id&amp;gt;&lt;/span&gt;
						&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;phase&amp;gt;&lt;/span&gt;generate-sources&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/phase&amp;gt;&lt;/span&gt;
						&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;configuration&amp;gt;&lt;/span&gt;
							&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;sourceRoot&amp;gt;&lt;/span&gt;${basedir}/target/generated/src/main/java&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/sourceRoot&amp;gt;&lt;/span&gt;
							&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;wsdlOptions&amp;gt;&lt;/span&gt;
								&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;wsdlOption&amp;gt;&lt;/span&gt;
									&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;wsdl&amp;gt;&lt;/span&gt;${basedir}/src/main/webapp/WEB-INF/wsdl/report_incident.wsdl&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/wsdl&amp;gt;&lt;/span&gt;
								&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/wsdlOption&amp;gt;&lt;/span&gt;
							&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/wsdlOptions&amp;gt;&lt;/span&gt;
						&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/configuration&amp;gt;&lt;/span&gt;
						&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;goals&amp;gt;&lt;/span&gt;
							&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;goal&amp;gt;&lt;/span&gt;wsdl2java&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/goal&amp;gt;&lt;/span&gt;
						&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/goals&amp;gt;&lt;/span&gt;
					&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/execution&amp;gt;&lt;/span&gt;
				&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/executions&amp;gt;&lt;/span&gt;
			&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/plugin&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You are now setup and should be able to compile the project. So running the &lt;tt&gt;mvn compile&lt;/tt&gt; should run the CXF wsdl2java and generate the source code in the folder &lt;tt&gt;&amp;amp;{basedir}/target/generated/src/main/java&lt;/tt&gt; that we specified in the pom.xml above. Since its in the &lt;tt&gt;target/generated/src/main/java&lt;/tt&gt; maven will pick it up and include it in the build process. &lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;Tutorial-Example-ReportIncident-Part1-Configurationoftheweb.xml&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;Configuration of the web.xml&lt;/h3&gt;
&lt;p&gt;Next up is to configure the web.xml to be ready to use CXF so we can expose the webservice.&lt;br /&gt;
As Spring is the center of the universe, or at least is a very important framework in today's Java land we start with the listener that kick-starts Spring. This is the usual piece of code:&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;codeContent&quot;&gt;
&lt;pre class=&quot;code-xml&quot;&gt;&lt;span class=&quot;code-tag&quot;&gt;&lt;span class=&quot;code-comment&quot;&gt;&amp;lt;!-- the listener that kick-starts Spring --&amp;gt;&lt;/span&gt;&lt;/span&gt;
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;listener&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;listener-class&amp;gt;&lt;/span&gt;org.springframework.web.context.ContextLoaderListener&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/listener-class&amp;gt;&lt;/span&gt;
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/listener&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;And then we have the CXF part where we define the CXF servlet and its URI mappings to which we have chosen that all our webservices should be in the path &lt;tt&gt;/webservices/&lt;/tt&gt;&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;codeContent&quot;&gt;
&lt;pre class=&quot;code-xml&quot;&gt;&lt;span class=&quot;code-tag&quot;&gt;&lt;span class=&quot;code-comment&quot;&gt;&amp;lt;!-- CXF servlet --&amp;gt;&lt;/span&gt;&lt;/span&gt;
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;servlet&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;servlet-name&amp;gt;&lt;/span&gt;CXFServlet&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/servlet-name&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;servlet-class&amp;gt;&lt;/span&gt;org.apache.cxf.transport.servlet.CXFServlet&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/servlet-class&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;load-on-startup&amp;gt;&lt;/span&gt;1&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/load-on-startup&amp;gt;&lt;/span&gt;
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/servlet&amp;gt;&lt;/span&gt;

	&lt;span class=&quot;code-tag&quot;&gt;&lt;span class=&quot;code-comment&quot;&gt;&amp;lt;!-- all our webservices are mapped under this URI pattern --&amp;gt;&lt;/span&gt;&lt;/span&gt;
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;servlet-mapping&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;servlet-name&amp;gt;&lt;/span&gt;CXFServlet&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/servlet-name&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;url-pattern&amp;gt;&lt;/span&gt;/webservices/*&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/url-pattern&amp;gt;&lt;/span&gt;
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/servlet-mapping&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Then the last piece of the puzzle is to configure CXF, this is done in a spring XML that we link to fron the web.xml by the standard Spring &lt;tt&gt;contextConfigLocation&lt;/tt&gt; property in the web.xml&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;codeContent&quot;&gt;
&lt;pre class=&quot;code-xml&quot;&gt;&lt;span class=&quot;code-tag&quot;&gt;&lt;span class=&quot;code-comment&quot;&gt;&amp;lt;!-- location of spring xml files --&amp;gt;&lt;/span&gt;&lt;/span&gt;
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;context-param&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;param-name&amp;gt;&lt;/span&gt;contextConfigLocation&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/param-name&amp;gt;&lt;/span&gt;
		&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;param-value&amp;gt;&lt;/span&gt;classpath:cxf-config.xml&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/param-value&amp;gt;&lt;/span&gt;
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/context-param&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;We have named our CXF configuration file &lt;tt&gt;cxf-config.xml&lt;/tt&gt; and its located in the root of the classpath. In Maven land that is we can have the &lt;tt&gt;cxf-config.xml&lt;/tt&gt; file in the &lt;tt&gt;src/main/resources&lt;/tt&gt; folder. We could also have the file located in the WEB-INF folder for instance &lt;tt&gt;&amp;lt;param-value&amp;gt;/WEB-INF/cxf-config.xml&amp;lt;/param-value&amp;gt;&lt;/tt&gt;.&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;Tutorial-Example-ReportIncident-Part1-Gettingridoftheoldjspworld&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;Getting rid of the old jsp world&lt;/h3&gt;
&lt;p&gt;The maven archetype that created the basic folder structure also created a sample .jsp file index.jsp. This file &lt;tt&gt;src/main/webapp/index.jsp&lt;/tt&gt; should be deleted. &lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;Tutorial-Example-ReportIncident-Part1-ConfigurationofCXF&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;Configuration of CXF&lt;/h3&gt;
&lt;p&gt;The cxf-config.xml is as follows:&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;codeContent&quot;&gt;
&lt;pre class=&quot;code-xml&quot;&gt;&amp;lt;beans xmlns=&lt;span class=&quot;code-quote&quot;&gt;&quot;http://www.springframework.org/schema/beans&quot;&lt;/span&gt;
       &lt;span class=&quot;code-keyword&quot;&gt;xmlns:xsi&lt;/span&gt;=&lt;span class=&quot;code-quote&quot;&gt;&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/span&gt;
       &lt;span class=&quot;code-keyword&quot;&gt;xmlns:jaxws&lt;/span&gt;=&lt;span class=&quot;code-quote&quot;&gt;&quot;http://cxf.apache.org/jaxws&quot;&lt;/span&gt;
       xsi:schemaLocation=&quot;
            http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
            http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd&quot;&amp;gt;

    &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;import resource=&lt;span class=&quot;code-quote&quot;&gt;&quot;classpath:META-INF/cxf/cxf.xml&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;import resource=&lt;span class=&quot;code-quote&quot;&gt;&quot;classpath:META-INF/cxf/cxf-extension-soap.xml&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;import resource=&lt;span class=&quot;code-quote&quot;&gt;&quot;classpath:META-INF/cxf/cxf-servlet.xml&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;code-tag&quot;&gt;&lt;span class=&quot;code-comment&quot;&gt;&amp;lt;!-- implementation of the webservice --&amp;gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;bean id=&lt;span class=&quot;code-quote&quot;&gt;&quot;reportIncidentEndpoint&quot;&lt;/span&gt; class=&lt;span class=&quot;code-quote&quot;&gt;&quot;org.apache.camel.example.reportincident.ReportIncidentEndpointImpl&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;code-tag&quot;&gt;&lt;span class=&quot;code-comment&quot;&gt;&amp;lt;!-- export the webservice using jaxws --&amp;gt;&lt;/span&gt;&lt;/span&gt;
    &amp;lt;jaxws:endpoint id=&lt;span class=&quot;code-quote&quot;&gt;&quot;reportIncident&quot;&lt;/span&gt;
                    implementor=&lt;span class=&quot;code-quote&quot;&gt;&quot;#reportIncidentEndpoint&quot;&lt;/span&gt;
                    address=&lt;span class=&quot;code-quote&quot;&gt;&quot;/incident&quot;&lt;/span&gt;
                    wsdlLocation=&lt;span class=&quot;code-quote&quot;&gt;&quot;/WEB-INF/wsdl/report_incident.wsdl&quot;&lt;/span&gt;
                    endpointName=&lt;span class=&quot;code-quote&quot;&gt;&quot;s:ReportIncidentPort&quot;&lt;/span&gt;
                    serviceName=&lt;span class=&quot;code-quote&quot;&gt;&quot;s:ReportIncidentService&quot;&lt;/span&gt;
                    &lt;span class=&quot;code-keyword&quot;&gt;xmlns:s&lt;/span&gt;=&lt;span class=&quot;code-quote&quot;&gt;&quot;http://reportincident.example.camel.apache.org&quot;&lt;/span&gt;/&amp;gt;

&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/beans&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The configuration is standard &lt;a href=&quot;/confluence/display/CAMEL/CXF&quot; title=&quot;CXF&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;CXF&lt;/a&gt; and is documented at the &lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;http://cxf.apache.org/&quot; title=&quot;Visit page outside Confluence&quot; rel=&quot;nofollow&quot; target=&quot;_top&quot;&gt;Apache CXF website&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;/confluence/images/icons/linkext7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt;.&lt;/p&gt;

&lt;p&gt;The 3 import elements is needed by CXF and they must be in the file.&lt;/p&gt;

&lt;p&gt;Noticed that we have a spring bean &lt;b&gt;reportIncidentEndpoint&lt;/b&gt; that is the implementation of the webservice endpoint we let CXF expose.&lt;br /&gt;
Its linked from the jaxws element with the implementator attribute as we use the # mark to identify its a reference to a spring bean. We could have stated the classname directly as &lt;tt&gt;implementor=&quot;org.apache.camel.example.reportincident.ReportIncidentEndpoint&quot;&lt;/tt&gt; but then we lose the ability to let the ReportIncidentEndpoint be configured by spring.&lt;br /&gt;
The &lt;b&gt;address&lt;/b&gt; attribute defines the relative part of the URL of the exposed webservice. &lt;b&gt;wsdlLocation&lt;/b&gt; is an optional parameter but for persons like me that likes contract-first we want to expose our own .wsdl contracts and not the auto generated by the frameworks, so with this attribute we can link to the real .wsdl file. The last stuff is needed by CXF as you could have several services so it needs to know which this one is. Configuring these is quite easy as all the information is in the wsdl already.&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;Tutorial-Example-ReportIncident-Part1-ImplementingtheReportIncidentEndpoint&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;Implementing the ReportIncidentEndpoint&lt;/h3&gt;
&lt;p&gt;Phew after all these meta files its time for some java code so we should code the implementor of the webservice. So we fire up &lt;tt&gt;mvn compile&lt;/tt&gt; to let CXF generate the POJO classes for our webservice and we are ready to fire up a Java editor.&lt;/p&gt;

&lt;p&gt;You can use &lt;tt&gt;mvn idea:idea&lt;/tt&gt; or &lt;tt&gt;mvn eclipse:eclipse&lt;/tt&gt; to create project files for these editors so you can load the project. However IDEA has been smarter lately and can load a pom.xml directly.&lt;/p&gt;

&lt;p&gt;As we want to quickly see our webservice we implement just a quick and dirty as it can get. At first beware that since its jaxws and Java 1.5 we get annotations for the money, but they reside on the interface so we can remove them from our implementations so its a nice plain POJO again:&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;codeContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;package&lt;/span&gt; org.apache.camel.example.reportincident;

/**
 * The webservice we have implemented.
 */
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; class ReportIncidentEndpointImpl &lt;span class=&quot;code-keyword&quot;&gt;implements&lt;/span&gt; ReportIncidentEndpoint {

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; OutputReportIncident reportIncident(InputReportIncident parameters) {
        &lt;span class=&quot;code-object&quot;&gt;System&lt;/span&gt;.out.println(&lt;span class=&quot;code-quote&quot;&gt;&quot;Hello ReportIncidentEndpointImpl is called from &quot;&lt;/span&gt; + parameters.getGivenName());

        OutputReportIncident out = &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; OutputReportIncident();
        out.setCode(&lt;span class=&quot;code-quote&quot;&gt;&quot;OK&quot;&lt;/span&gt;);
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; out;
    }

}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We just output the person that invokes this webservice and returns a OK response. This class should be in the maven source root folder &lt;tt&gt;src/main/java&lt;/tt&gt; under the package name &lt;tt&gt;org.apache.camel.example.reportincident&lt;/tt&gt;. Beware that the maven archetype tool didn't create the &lt;tt&gt;src/main/java folder&lt;/tt&gt;, so you should create it manually.&lt;/p&gt;

&lt;p&gt;To test if we are home free we run &lt;tt&gt;mvn clean compile&lt;/tt&gt;.&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;Tutorial-Example-ReportIncident-Part1-Runningourwebservice&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;Running our webservice&lt;/h3&gt;
&lt;p&gt;Now that the code compiles we would like to run it in a web container, so we add jetty to our pom.xml so we can run &lt;tt&gt;mvn jetty:run&lt;/tt&gt;:&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;codeContent&quot;&gt;
&lt;pre class=&quot;code-xml&quot;&gt;&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;properties&amp;gt;&lt;/span&gt;
             ...
             &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;jetty-version&amp;gt;&lt;/span&gt;6.1.1&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/jetty-version&amp;gt;&lt;/span&gt;
	&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/properties&amp;gt;&lt;/span&gt;

       &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;build&amp;gt;&lt;/span&gt;
           &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;plugins&amp;gt;&lt;/span&gt;
               ...
               &lt;span class=&quot;code-tag&quot;&gt;&lt;span class=&quot;code-comment&quot;&gt;&amp;lt;!-- so we can run mvn jetty:run --&amp;gt;&lt;/span&gt;&lt;/span&gt;
               &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;plugin&amp;gt;&lt;/span&gt;
                   &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.mortbay.jetty&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
                   &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;maven-jetty-plugin&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
                   &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;version&amp;gt;&lt;/span&gt;${jetty-version}&lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
               &lt;span class=&quot;code-tag&quot;&gt;&amp;lt;/plugin&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;b&gt;Notice:&lt;/b&gt; We use Jetty v6.1.1 as never versions has troubles on my laptop. Feel free to try a newer version on your system, but v6.1.1 works flawless.&lt;/p&gt;

&lt;p&gt;So to see if everything is in order we fire up jetty with &lt;tt&gt;mvn jetty:run&lt;/tt&gt; and if everything is okay you should be able to access &lt;tt&gt;&lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;http://localhost:8080&quot; title=&quot;Visit page outside Confluence&quot; rel=&quot;nofollow&quot; target=&quot;_top&quot;&gt;http://localhost:8080&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;/confluence/images/icons/linkext7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt;&lt;/tt&gt;.&lt;br /&gt;
Jetty is smart that it will list the correct URI on the page to our web application, so just click on the link. This is smart as you don't have to remember the exact web context URI for your application - just fire up the default page and Jetty will help you.&lt;/p&gt;

&lt;p&gt;So where is the damn webservice then? Well as we did configure the web.xml to instruct the CXF servlet to accept the pattern &lt;tt&gt;/webservices/*&lt;/tt&gt; we should hit this URL to get the attention of CXF: &lt;tt&gt;&lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;http://localhost:8080/camel-example-reportincident/webservices&quot; title=&quot;Visit page outside Confluence&quot; rel=&quot;nofollow&quot; target=&quot;_top&quot;&gt;http://localhost:8080/camel-example-reportincident/webservices&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;/confluence/images/icons/linkext7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt;&lt;/tt&gt;.&lt;br /&gt;
&lt;a href='http://cwiki.apache.org/confluence/download/attachments/90920/tutorial_reportincident_cxf_servicelist2.png' target='tutorial_reportincident_cxf_servicelist2.png' rel=&quot;nofollow&quot;&gt;&lt;img src='/confluence/download/thumbnails/90920/tutorial_reportincident_cxf_servicelist2.png' align=&quot;absmiddle&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&amp;nbsp;&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;Tutorial-Example-ReportIncident-Part1-Hittingthewebservice&quot; target=&quot;_top&quot;&gt;&lt;/a&gt;Hitting the webservice&lt;/h3&gt;
&lt;p&gt;Now we have the webservice running in a standard .war application in a standard web container such as Jetty we would like to invoke the webservice and see if we get our code executed. Unfortunately this isn't the easiest task in the world - its not so easy as a REST URL, so we need tools for this. So we fire up our trusty webservice tool &lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;http://www.soapui.org/&quot; title=&quot;Visit page outside Confluence&quot; rel=&quot;nofollow&quot; target=&quot;_top&quot;&gt;SoapUI&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;/confluence/images/icons/linkext7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt; and let it be the one to fire the webservice request and see the response.&lt;/p&gt;

&lt;p&gt;Using SoapUI we sent a request to our webservice and we got the expected OK response and the console outputs the System.out so we are ready to code.&lt;br /&gt;
&lt;a href='http://cwiki.apache.org/confluence/download/attachments/90920/tutorial_reportincident_soapui2.png' target='tutorial_reportincident_soapui2.png' rel=&quot;nofollow&quot;&gt;&lt;img src='/confluence/download/thumbnails/90920/tutorial_reportincident_soapui2.png' a