Re: Filtering XML exchange body content

2013-01-24 Thread Claus Ibsen
On Thu, Jan 24, 2013 at 8:40 AM, David Karlsen davidkarl...@gmail.com wrote:
 Maybe try an xslt transform?
 Den 23. jan. 2013 23:26 skrev Martin Stiborský martin.stibor...@gmail.com
 følgende:


Yeah xslt would work.

But I assume you can also do

transform
   xpath/foo/bar/xpath
/transform

To transform the message using the xpath expression.

Mind that with xpath, then namespaces is tricky and if your XML has namepaces,
then you must use them in the xpath expression also. Or use some trick
with local_xxx stuff. I can't remember its syntax.




 Hello guys,
 is it possible with standard Camel weapons, to filter XML body with XPath
 to contain only selected data?
 I tried various combination of .setBody(), .XPath() and filter().
 I believe the solution needs .setBody(), but I can't find the correct
 solution.

 Thanks!

 --
 S pozdravem / Best regards
 Martin Stiborský

 Jabber: st...@njs.netlab.cz
 Twitter: http://www.twitter.com/stibi




-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: NoSuchProviderException: imap while using simple route on Camel 2.10.2 and Karaf 2.2.9

2013-01-24 Thread Claus Ibsen
On Thu, Jan 24, 2013 at 8:13 AM, Thibault Cassan
thibault.cas...@gmail.com wrote:
 Christian,

 I am using Oracle's JDK.


And have you tried restarting the Karaf container after installing all
these features.
Sometimes this can fix weird issues.



 Regards,
 Thibault
 2013/1/24 Christian Müller christian.muel...@gmail.com

 Which JDK do you use (Oracle, IBM, OpenJDK, ...)?

 Best,
 Christian

 Sent from a mobile device
 Am 24.01.2013 07:37 schrieb Thibault Cassan thibault.cas...@gmail.com:

  Hi all,
 
  I am using Camel 2.10.2 on Karaf 2.2.9 (JDK 1.7.0_09 or 1.6.0_37, I tried
  with both), and i am facing a curious behavior.
  Here is how to reproduce it, from a fresh downloaded Apache Karaf 2.2.9:
   - Start karaf
   - Add some features URL: 'features:addurl
  mvn:org.apache.camel.karaf/apache-camel/2.10.2/xml/features
  mvn:org.apache.activemq/activemq-karaf/5.7.0/xml/features'
   - Add some features: 'features:install activemq activemq-spring camel
  camel-jms camel-mail camel-cxf camel-jaxb camel-mina camel-jmx
 camel-saxon
  activemq-camel'
   - Create adefault Broker: 'activemq:create-broker'
 
  Until this point, everything seems to work fine. Now let's create a route
  involving the mail component:
  beans xmlns=http://www.springframework.org/schema/beans;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=
 http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
 http://camel.apache.org/schema/spring
  http://camel.apache.org/schema/spring/camel-spring.xsd
  
  camelContext id=test.mail xmlns=
  http://camel.apache.org/schema/spring;
 
  route id=test.inbound.mail
  from uri=imap://
  b...@example.com?host=localhostamp;password=test/
  log message=Read ok/
  /route
 
  /camelContext
  /beans
 
  I write this in a XML file, a copy it in the deploy directory of Karaf.
 The
  route seems ok.
 
  Now, the problem. If I stop Karaf (using logout from the karaf command
  prompt), and restart it, I am facing a new exception:
  2013-01-24 07:30:18,861 | WARN  | /b...@example.com |
  MailConsumer | 255 - org.apache.camel.camel-core -
  2.10.2 | Consumer Consumer[imap://b...@example.com?host=localh
  ostpassword=**] failed polling endpoint: Endpoint[imap://
  b...@example.com?host=localhostpassword=**]. Will try again at next
  poll. Caused by: [javax.mail.NoSuchProviderExceptio
  n - imap]
  javax.mail.NoSuchProviderException: imap
  at
  javax.mail.Session.getService(Session.java:798)[130:javax.mail:1.4.4]
  at
  javax.mail.Session.getStore(Session.java:578)[130:javax.mail:1.4.4]
  at
  javax.mail.Session.getStore(Session.java:540)[130:javax.mail:1.4.4]
  at
  javax.mail.Session.getStore(Session.java:519)[130:javax.mail:1.4.4]
  at
 
 
 org.apache.camel.component.mail.MailConsumer.ensureIsConnected(MailConsumer.java:375)[262:org.apache.camel.camel-mail:2.10.2]
  at
 
 
 org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:82)[262:org.apache.camel.camel-mail:2.10.2]
  at
 
 
 org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:142)[255:org.apache.camel.camel-core:2.10.2]
  at
 
 
 org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:92)[255:org.apache.camel.camel-core:2.10.2]
  at
 
 
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)[:1.6.0_37]
  at
 
 
 java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_37]
  at
 
 java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[:1.6.0_37]
  at
 
 
 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[:1.6.0_37]
  at
 
 
 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)[:1.6.0_37]
  at
 
 
 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[:1.6.0_37]
  at
 
 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_37]
  at
 
 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_37]
  at java.lang.Thread.run(Thread.java:662)[:1.6.0_37]
 
  This one is more curious. I made a search with my friend Google, but
 wasn't
  able to find a way to make it work correctly. Does anyone have already
  faced this and have an idea how to configure it ?
 
  Best regards,
  Thibault Cassan
 




-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Splitter EIP query

2013-01-24 Thread Claus Ibsen
On Wed, Jan 23, 2013 at 10:56 PM, gilboy josephoto...@gmail.com wrote:
 Hi

 I am using a splitter EIP in my route.

 I am leveraging the parallelprocessing property of the splitter EIP in my
 route. My route gets triggered from a quartz endpoint, e.g.

 *from(quartz).to(bean:myBean).split().parallelProcessing()etc*

 Is there any way I can get the quartz thread to wait until all the threads
 after the split have completed their tasks?


I think you need to configure quartz to be stateful.


 Thanks
 Joe



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Splitter-EIP-query-tp5726095.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: NoSuchProviderException: imap while using simple route on Camel 2.10.2 and Karaf 2.2.9

2013-01-24 Thread Thibault Cassan
Yes, I tried to restart Karaf after installing all features. I also tried
restarting after each feature install.
Each time I get the same error.
Le 24 janv. 2013 09:18, Claus Ibsen claus.ib...@gmail.com a écrit :

 On Thu, Jan 24, 2013 at 8:13 AM, Thibault Cassan
 thibault.cas...@gmail.com wrote:
  Christian,
 
  I am using Oracle's JDK.
 

 And have you tried restarting the Karaf container after installing all
 these features.
 Sometimes this can fix weird issues.



  Regards,
  Thibault
  2013/1/24 Christian Müller christian.muel...@gmail.com
 
  Which JDK do you use (Oracle, IBM, OpenJDK, ...)?
 
  Best,
  Christian
 
  Sent from a mobile device
  Am 24.01.2013 07:37 schrieb Thibault Cassan 
 thibault.cas...@gmail.com:
 
   Hi all,
  
   I am using Camel 2.10.2 on Karaf 2.2.9 (JDK 1.7.0_09 or 1.6.0_37, I
 tried
   with both), and i am facing a curious behavior.
   Here is how to reproduce it, from a fresh downloaded Apache Karaf
 2.2.9:
- Start karaf
- Add some features URL: 'features:addurl
   mvn:org.apache.camel.karaf/apache-camel/2.10.2/xml/features
   mvn:org.apache.activemq/activemq-karaf/5.7.0/xml/features'
- Add some features: 'features:install activemq activemq-spring camel
   camel-jms camel-mail camel-cxf camel-jaxb camel-mina camel-jmx
  camel-saxon
   activemq-camel'
- Create adefault Broker: 'activemq:create-broker'
  
   Until this point, everything seems to work fine. Now let's create a
 route
   involving the mail component:
   beans xmlns=http://www.springframework.org/schema/beans;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=
  http://www.springframework.org/schema/beans
   http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  http://camel.apache.org/schema/spring
   http://camel.apache.org/schema/spring/camel-spring.xsd
   
   camelContext id=test.mail xmlns=
   http://camel.apache.org/schema/spring;
  
   route id=test.inbound.mail
   from uri=imap://
   b...@example.com?host=localhostamp;password=test/
   log message=Read ok/
   /route
  
   /camelContext
   /beans
  
   I write this in a XML file, a copy it in the deploy directory of
 Karaf.
  The
   route seems ok.
  
   Now, the problem. If I stop Karaf (using logout from the karaf command
   prompt), and restart it, I am facing a new exception:
   2013-01-24 07:30:18,861 | WARN  | /b...@example.com |
   MailConsumer | 255 - org.apache.camel.camel-core -
   2.10.2 | Consumer Consumer[imap://b...@example.com?host=localh
   ostpassword=**] failed polling endpoint: Endpoint[imap://
   b...@example.com?host=localhostpassword=**]. Will try again at
 next
   poll. Caused by: [javax.mail.NoSuchProviderExceptio
   n - imap]
   javax.mail.NoSuchProviderException: imap
   at
   javax.mail.Session.getService(Session.java:798)[130:javax.mail:1.4.4]
   at
   javax.mail.Session.getStore(Session.java:578)[130:javax.mail:1.4.4]
   at
   javax.mail.Session.getStore(Session.java:540)[130:javax.mail:1.4.4]
   at
   javax.mail.Session.getStore(Session.java:519)[130:javax.mail:1.4.4]
   at
  
  
 
 org.apache.camel.component.mail.MailConsumer.ensureIsConnected(MailConsumer.java:375)[262:org.apache.camel.camel-mail:2.10.2]
   at
  
  
 
 org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:82)[262:org.apache.camel.camel-mail:2.10.2]
   at
  
  
 
 org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:142)[255:org.apache.camel.camel-core:2.10.2]
   at
  
  
 
 org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:92)[255:org.apache.camel.camel-core:2.10.2]
   at
  
  
 
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)[:1.6.0_37]
   at
  
  
 
 java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_37]
   at
  
 
 java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[:1.6.0_37]
   at
  
  
 
 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[:1.6.0_37]
   at
  
  
 
 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)[:1.6.0_37]
   at
  
  
 
 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[:1.6.0_37]
   at
  
  
 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_37]
   at
  
  
 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_37]
   at java.lang.Thread.run(Thread.java:662)[:1.6.0_37]
  
   This one is more curious. I made a search with my friend Google, but
  wasn't
   able to find a way to make it work correctly. Does anyone have already
   faced this 

Re: HTTP Endpoint construction in CamelSpringTest

2013-01-24 Thread Claus Ibsen
Hi

The servlet component requires you to run inside a Servlet
container, such as Apache Tomcat, Jetty,
and ESB containers such as ServiceMix etc.

When you run it standalone as unit test, then there is no servlet
container, and you cannot use that.

You can swap the servlet with jetty instead. Then you use Jetty as the
http server for testing.
Or you can look at some of the 3rd party libraries that can simulate a
servlet environment.
In fact I think we do that in camel-servlet source code for testing itself.

https://svn.apache.org/repos/asf/camel/trunk/components/camel-servlet/


On Wed, Jan 23, 2013 at 10:35 PM, Zemin Hu zemin...@hotmail.com wrote:
 I am trying to use CamelSpringTestSupport to build my unit tests. Most of my
 routes are in Spring XML format. Here is my first test case:
 public class SimpeRouteTest extends CamelSpringTestSupport {
 protected AbstractXmlApplicationContext createApplicationContext() {
 return new
 FileSystemXmlApplicationContext(src/main/webapp/WEB-INF/applicationContext.xml);
 }

 @Test
 public void testSimpleRoute() throws Exception {
 String response =
 template.requestBodyAndHeader(http://localhost:8080/services/test/simple;,
 body: Hello World, MY_HEADER, my name, String.class);
 System.err.println(response);
 }
 }

 The Spring XML route:
 routeContext id=test-route-simple
 xmlns=http://camel.apache.org/schema/spring;
 route
 from uri=servlet:///test/simple /
 setBody
 constanthello world/constant
 /setBody
 /route
 /routeContext

 I can see the log that route is started during(before) test run:
 [  main] SpringCamelContext INFO  Route:
 route90 started and consuming from: Endpoint[servlet:///test/simple]

 if I use servlet:///test/simple, I got:
 You cannot create producer with servlet endpoint, please consider to use
 http or http4 endpoint.

 if I use http://localhost:8080/services/test/simple;, or
 http://localhost:80/test/simple; or other versions, I got:
 I/O exception (java.net.ConnectException) caught when processing request:
 Connection refused: connect
 I read Testing with Camel in CamelInAction book, it used file:// which is
 working, but there are no samples for servlet:/// which is most commonly
 used.

 What's is correct way for the endpoint? How to test servlet:/// or http:
 component without having to start routes in a web server?

 I am using camel-core 2.9.1, camel-test 2.9.1.
 Thanks.



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/HTTP-Endpoint-construction-in-CamelSpringTest-tp5726090.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: NoSuchProviderException: imap while using simple route on Camel 2.10.2 and Karaf 2.2.9

2013-01-24 Thread Claus Ibsen
On Thu, Jan 24, 2013 at 9:21 AM, Thibault Cassan
thibault.cas...@gmail.com wrote:
 Yes, I tried to restart Karaf after installing all features. I also tried
 restarting after each feature install.
 Each time I get the same error.

Ah have you changed the jre.properties file?

See the bottom of the release notes
http://camel.apache.org/camel-2100-release.html

eg replace the jre.properties with the cxf.jre.properties from the Karaf distro.


 Le 24 janv. 2013 09:18, Claus Ibsen claus.ib...@gmail.com a écrit :

 On Thu, Jan 24, 2013 at 8:13 AM, Thibault Cassan
 thibault.cas...@gmail.com wrote:
  Christian,
 
  I am using Oracle's JDK.
 

 And have you tried restarting the Karaf container after installing all
 these features.
 Sometimes this can fix weird issues.



  Regards,
  Thibault
  2013/1/24 Christian Müller christian.muel...@gmail.com
 
  Which JDK do you use (Oracle, IBM, OpenJDK, ...)?
 
  Best,
  Christian
 
  Sent from a mobile device
  Am 24.01.2013 07:37 schrieb Thibault Cassan 
 thibault.cas...@gmail.com:
 
   Hi all,
  
   I am using Camel 2.10.2 on Karaf 2.2.9 (JDK 1.7.0_09 or 1.6.0_37, I
 tried
   with both), and i am facing a curious behavior.
   Here is how to reproduce it, from a fresh downloaded Apache Karaf
 2.2.9:
- Start karaf
- Add some features URL: 'features:addurl
   mvn:org.apache.camel.karaf/apache-camel/2.10.2/xml/features
   mvn:org.apache.activemq/activemq-karaf/5.7.0/xml/features'
- Add some features: 'features:install activemq activemq-spring camel
   camel-jms camel-mail camel-cxf camel-jaxb camel-mina camel-jmx
  camel-saxon
   activemq-camel'
- Create adefault Broker: 'activemq:create-broker'
  
   Until this point, everything seems to work fine. Now let's create a
 route
   involving the mail component:
   beans xmlns=http://www.springframework.org/schema/beans;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=
  http://www.springframework.org/schema/beans
   http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  http://camel.apache.org/schema/spring
   http://camel.apache.org/schema/spring/camel-spring.xsd
   
   camelContext id=test.mail xmlns=
   http://camel.apache.org/schema/spring;
  
   route id=test.inbound.mail
   from uri=imap://
   b...@example.com?host=localhostamp;password=test/
   log message=Read ok/
   /route
  
   /camelContext
   /beans
  
   I write this in a XML file, a copy it in the deploy directory of
 Karaf.
  The
   route seems ok.
  
   Now, the problem. If I stop Karaf (using logout from the karaf command
   prompt), and restart it, I am facing a new exception:
   2013-01-24 07:30:18,861 | WARN  | /b...@example.com |
   MailConsumer | 255 - org.apache.camel.camel-core -
   2.10.2 | Consumer Consumer[imap://b...@example.com?host=localh
   ostpassword=**] failed polling endpoint: Endpoint[imap://
   b...@example.com?host=localhostpassword=**]. Will try again at
 next
   poll. Caused by: [javax.mail.NoSuchProviderExceptio
   n - imap]
   javax.mail.NoSuchProviderException: imap
   at
   javax.mail.Session.getService(Session.java:798)[130:javax.mail:1.4.4]
   at
   javax.mail.Session.getStore(Session.java:578)[130:javax.mail:1.4.4]
   at
   javax.mail.Session.getStore(Session.java:540)[130:javax.mail:1.4.4]
   at
   javax.mail.Session.getStore(Session.java:519)[130:javax.mail:1.4.4]
   at
  
  
 
 org.apache.camel.component.mail.MailConsumer.ensureIsConnected(MailConsumer.java:375)[262:org.apache.camel.camel-mail:2.10.2]
   at
  
  
 
 org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:82)[262:org.apache.camel.camel-mail:2.10.2]
   at
  
  
 
 org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:142)[255:org.apache.camel.camel-core:2.10.2]
   at
  
  
 
 org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:92)[255:org.apache.camel.camel-core:2.10.2]
   at
  
  
 
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)[:1.6.0_37]
   at
  
  
 
 java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_37]
   at
  
 
 java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[:1.6.0_37]
   at
  
  
 
 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[:1.6.0_37]
   at
  
  
 
 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)[:1.6.0_37]
   at
  
  
 
 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[:1.6.0_37]
   at
  
  
 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_37]
   at
  
  
 
 

Re: Websphere 6.1.0.45: Unable to return data from a camel-cxf component (POJO mode)

2013-01-24 Thread Claus Ibsen
On Wed, Jan 23, 2013 at 9:02 PM, panzerhans espen+ca...@tjonneland.no wrote:
 I have created a CXF webservice and exposed it with camel. The webservice is
 code first (JSR-181) annotated Java class, springed up in my application
 context.

 The class looks like this:

 @WebService(name=DataExport, serviceName=DataExport,
 targetNamespace=com.somecompany.dataexport.v1)
 public class DataExport {

 public String fetchVesselRegisterV1(@WebParam(name=input) SIInput
 input) {
 return ;
 }
 }

 I understand that the return statement is never called as camel-cxf
 intercepts the message on return (?). At least in a debugger it never stops
 there.

 My Spring config is like this:
  cxf:cxfEndpoint id=export-webservice address=/DataExport

 serviceClass=com.somecompany.si.integration.data.export.DataExport
 cxf:properties
 entry key=dataFormat value=POJO/
 /cxf:properties
 /cxf:cxfEndpoint

 My Route is Java DSL with spring:
 ...
 from(cxf:bean:export-webservice?dataFormat=POJO)//
 .routeId(DataExportWSRoute)//

 .to(bean:com.somecompany.si.integration.data.export.ExportWSProcessor);
 ...

 The handling bean correctly picks up the data when the webservice is called,
 and I am able to read input parameters sent to the WS. However things go
 wrong in Websphere after I push my reply (just a  Base64 encoded String)
 into the exchange: exchng.getOut().setBody(encodedXML);


You have configured CXF to use POJO mode.
So that means you must use the expected return type, from the web
service interface.
In your case its a String. So I guess its okay to return String data.

The generated .wsdl file does that indicate a return type of xs:string ?


And as you set response on getOut, then check this FAQ
http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html

Its possible easier to mutate the IN instead. Or else you may need to
propagate headers.
Though that's maybe not the cause here. Though a rule of thumb its
easier to mutate IN,
so you wont loose your headers etc during routing in Camel.

Could you log the base64 encoded data. It may cause the response XML
to be invalid etc.
Have you tried just to return Hello World or some plain text, to see
if that works?


 I get the following exception:

 2013-01-23 20:33:35,585 WARN  WebContainer : 0
 |cxf.phase.PhaseInterceptorChain|logging.LogUtils-doLog() #369 [] -
 Interceptor for
 {com.somecompany.dataExport.v1}DataExport#{com.somecompany.dataExport.v1}fetchVesselRegisterV1
 has thrown exception, unwinding now
 java.lang.IllegalArgumentException: Invalid LF not followed by whitespace



 at
 com.ibm.ws.genericbnf.impl.BNFHeadersImpl.checkHeaderValue(BNFHeadersImpl.java:4507)
 at
 com.ibm.ws.genericbnf.impl.BNFHeadersImpl.appendHeader(BNFHeadersImpl.java:494)
 at
 com.ibm.ws.webcontainer.channel.WCCResponseImpl.addHeader(WCCResponseImpl.java:209)
 at
 com.ibm.ws.webcontainer.srt.SRTServletResponse.addField(SRTServletResponse.java:296)
 at
 com.ibm.ws.webcontainer.srt.SRTServletResponse.addHeader(SRTServletResponse.java:1669)
 at
 org.apache.cxf.transport.http.AbstractHTTPDestination.copyResponseHeaders(AbstractHTTPDestination.java:274)
 at
 org.apache.cxf.transport.http.AbstractHTTPDestination.flushHeaders(AbstractHTTPDestination.java:557)
 at
 org.apache.cxf.transport.http.AbstractHTTPDestination.flushHeaders(AbstractHTTPDestination.java:524)
 at
 org.apache.cxf.transport.http.AbstractHTTPDestination$WrappedOutputStream.onFirstWrite(AbstractHTTPDestination.java:659)
 at
 org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:42)
 at
 com.ctc.wstx.sw.EncodingXmlWriter.flushBuffer(EncodingXmlWriter.java:698)
 at com.ctc.wstx.sw.EncodingXmlWriter.flush(EncodingXmlWriter.java:172)
 at com.ctc.wstx.sw.EncodingXmlWriter.close(EncodingXmlWriter.java:151)
 at
 com.ctc.wstx.sw.BaseStreamWriter._finishDocument(BaseStreamWriter.java:1429)
 at
 com.ctc.wstx.sw.BaseStreamWriter.writeEndDocument(BaseStreamWriter.java:553)
 at
 org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEndingInterceptor.handleMessage(SoapOutInterceptor.java:282)
 at
 org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEndingInterceptor.handleMessage(SoapOutInterceptor.java:270)
 at
 org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
 at
 org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:99)
 at
 org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:315)
 at
 org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:77)
 at
 org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
 at
 

Re: Get full request url from Exchange

2013-01-24 Thread Claus Ibsen
On Wed, Jan 23, 2013 at 10:10 PM, Pranab Mehta rou...@gmail.com wrote:
 I am running Camel 2.8, and to proxy a https web service I use the
 following route:
 from(servlet:///proxyWebService/api/?matchOnUriPrefix=true)
 .process(myProcessor)
 
 .to(https4://realWebService:8443/api/?bridgeEndpoint=truethrowExceptionOnFailure=false);

 Now, in the process leg, I want to be able to extract the full Request
 URL with hostname and port that was used to access the servlet. I am
 hoping this information is somewhere in the Exchange, but I am unable
 to find it.


You can get access to the HttpServletRequest, where you can find all
the details you need.

In the processor you can do

HttpMessage msg = exchange.getIn(HttpMessage.class);
HttpServletRequest req = msg.getRequest();


 tia,
 rouble



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Exceptions management

2013-01-24 Thread Claus Ibsen
On Wed, Jan 23, 2013 at 11:20 AM, developpef src...@orange.fr wrote:
 Hello,

 This message to get more explanations on exceptions management on routes.

 Here is my app :

 I created a custom MyException extending RuntimeCamelException (wich extends
 Exception).

 My routes are :

 onException(MyException.class).handled(true).log(FATAL).end();

 from(...).onException(Exception.class).log(LOCAL_ERROR).end().to(myBean);

 MyBean is throwing a MyException.

 I was surprised to see that it was cached in the general onException route
 (with log FATAL) and not in the local route (with log LOCAL_ERROR).

 Is this due to the extension of RuntimeCamelException or do I missed
 something?


What Camel version do you use?


 Thanks



 -
 http://developpef.blogspot.com
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Exceptions-management-tp5726051.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: NoSuchProviderException: imap while using simple route on Camel 2.10.2 and Karaf 2.2.9

2013-01-24 Thread Thibault Cassan
Yes, that was it, problem solved!
Sorry, it seems I didn't read enough the camel release note...
Thanks for having answered this quickly.

Regards,
Thibault
 Le 24 janv. 2013 09:26, Claus Ibsen claus.ib...@gmail.com a écrit :

 On Thu, Jan 24, 2013 at 9:21 AM, Thibault Cassan
 thibault.cas...@gmail.com wrote:
  Yes, I tried to restart Karaf after installing all features. I also tried
  restarting after each feature install.
  Each time I get the same error.

 Ah have you changed the jre.properties file?

 See the bottom of the release notes
 http://camel.apache.org/camel-2100-release.html

 eg replace the jre.properties with the cxf.jre.properties from the Karaf
 distro.


  Le 24 janv. 2013 09:18, Claus Ibsen claus.ib...@gmail.com a écrit :
 
  On Thu, Jan 24, 2013 at 8:13 AM, Thibault Cassan
  thibault.cas...@gmail.com wrote:
   Christian,
  
   I am using Oracle's JDK.
  
 
  And have you tried restarting the Karaf container after installing all
  these features.
  Sometimes this can fix weird issues.
 
 
 
   Regards,
   Thibault
   2013/1/24 Christian Müller christian.muel...@gmail.com
  
   Which JDK do you use (Oracle, IBM, OpenJDK, ...)?
  
   Best,
   Christian
  
   Sent from a mobile device
   Am 24.01.2013 07:37 schrieb Thibault Cassan 
  thibault.cas...@gmail.com:
  
Hi all,
   
I am using Camel 2.10.2 on Karaf 2.2.9 (JDK 1.7.0_09 or 1.6.0_37, I
  tried
with both), and i am facing a curious behavior.
Here is how to reproduce it, from a fresh downloaded Apache Karaf
  2.2.9:
 - Start karaf
 - Add some features URL: 'features:addurl
mvn:org.apache.camel.karaf/apache-camel/2.10.2/xml/features
mvn:org.apache.activemq/activemq-karaf/5.7.0/xml/features'
 - Add some features: 'features:install activemq activemq-spring
 camel
camel-jms camel-mail camel-cxf camel-jaxb camel-mina camel-jmx
   camel-saxon
activemq-camel'
 - Create adefault Broker: 'activemq:create-broker'
   
Until this point, everything seems to work fine. Now let's create a
  route
involving the mail component:
beans xmlns=http://www.springframework.org/schema/beans;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xsi:schemaLocation=
   http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
   http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd

camelContext id=test.mail xmlns=
http://camel.apache.org/schema/spring;
   
route id=test.inbound.mail
from uri=imap://
b...@example.com?host=localhostamp;password=test/
log message=Read ok/
/route
   
/camelContext
/beans
   
I write this in a XML file, a copy it in the deploy directory of
  Karaf.
   The
route seems ok.
   
Now, the problem. If I stop Karaf (using logout from the karaf
 command
prompt), and restart it, I am facing a new exception:
2013-01-24 07:30:18,861 | WARN  | /b...@example.com |
MailConsumer | 255 -
 org.apache.camel.camel-core -
2.10.2 | Consumer Consumer[imap://b...@example.com?host=localh
ostpassword=**] failed polling endpoint: Endpoint[imap://
b...@example.com?host=localhostpassword=**]. Will try again at
  next
poll. Caused by: [javax.mail.NoSuchProviderExceptio
n - imap]
javax.mail.NoSuchProviderException: imap
at
   
 javax.mail.Session.getService(Session.java:798)[130:javax.mail:1.4.4]
at
javax.mail.Session.getStore(Session.java:578)[130:javax.mail:1.4.4]
at
javax.mail.Session.getStore(Session.java:540)[130:javax.mail:1.4.4]
at
javax.mail.Session.getStore(Session.java:519)[130:javax.mail:1.4.4]
at
   
   
  
 
 org.apache.camel.component.mail.MailConsumer.ensureIsConnected(MailConsumer.java:375)[262:org.apache.camel.camel-mail:2.10.2]
at
   
   
  
 
 org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:82)[262:org.apache.camel.camel-mail:2.10.2]
at
   
   
  
 
 org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:142)[255:org.apache.camel.camel-core:2.10.2]
at
   
   
  
 
 org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:92)[255:org.apache.camel.camel-core:2.10.2]
at
   
   
  
 
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)[:1.6.0_37]
at
   
   
  
 
 java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_37]
at
   
  
 
 java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[:1.6.0_37]
at
   
   
  
 
 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[:1.6.0_37]
at
   
   
  
 
 

Re: NoSuchProviderException: imap while using simple route on Camel 2.10.2 and Karaf 2.2.9

2013-01-24 Thread Claus Ibsen
On Thu, Jan 24, 2013 at 9:44 AM, Thibault Cassan
thibault.cas...@gmail.com wrote:
 Yes, that was it, problem solved!
 Sorry, it seems I didn't read enough the camel release note...
 Thanks for having answered this quickly.


Karaf 2.3.x onwards don't require this anymore.


 Regards,
 Thibault
  Le 24 janv. 2013 09:26, Claus Ibsen claus.ib...@gmail.com a écrit :

 On Thu, Jan 24, 2013 at 9:21 AM, Thibault Cassan
 thibault.cas...@gmail.com wrote:
  Yes, I tried to restart Karaf after installing all features. I also tried
  restarting after each feature install.
  Each time I get the same error.

 Ah have you changed the jre.properties file?

 See the bottom of the release notes
 http://camel.apache.org/camel-2100-release.html

 eg replace the jre.properties with the cxf.jre.properties from the Karaf
 distro.


  Le 24 janv. 2013 09:18, Claus Ibsen claus.ib...@gmail.com a écrit :
 
  On Thu, Jan 24, 2013 at 8:13 AM, Thibault Cassan
  thibault.cas...@gmail.com wrote:
   Christian,
  
   I am using Oracle's JDK.
  
 
  And have you tried restarting the Karaf container after installing all
  these features.
  Sometimes this can fix weird issues.
 
 
 
   Regards,
   Thibault
   2013/1/24 Christian Müller christian.muel...@gmail.com
  
   Which JDK do you use (Oracle, IBM, OpenJDK, ...)?
  
   Best,
   Christian
  
   Sent from a mobile device
   Am 24.01.2013 07:37 schrieb Thibault Cassan 
  thibault.cas...@gmail.com:
  
Hi all,
   
I am using Camel 2.10.2 on Karaf 2.2.9 (JDK 1.7.0_09 or 1.6.0_37, I
  tried
with both), and i am facing a curious behavior.
Here is how to reproduce it, from a fresh downloaded Apache Karaf
  2.2.9:
 - Start karaf
 - Add some features URL: 'features:addurl
mvn:org.apache.camel.karaf/apache-camel/2.10.2/xml/features
mvn:org.apache.activemq/activemq-karaf/5.7.0/xml/features'
 - Add some features: 'features:install activemq activemq-spring
 camel
camel-jms camel-mail camel-cxf camel-jaxb camel-mina camel-jmx
   camel-saxon
activemq-camel'
 - Create adefault Broker: 'activemq:create-broker'
   
Until this point, everything seems to work fine. Now let's create a
  route
involving the mail component:
beans xmlns=http://www.springframework.org/schema/beans;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xsi:schemaLocation=
   http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
   http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd

camelContext id=test.mail xmlns=
http://camel.apache.org/schema/spring;
   
route id=test.inbound.mail
from uri=imap://
b...@example.com?host=localhostamp;password=test/
log message=Read ok/
/route
   
/camelContext
/beans
   
I write this in a XML file, a copy it in the deploy directory of
  Karaf.
   The
route seems ok.
   
Now, the problem. If I stop Karaf (using logout from the karaf
 command
prompt), and restart it, I am facing a new exception:
2013-01-24 07:30:18,861 | WARN  | /b...@example.com |
MailConsumer | 255 -
 org.apache.camel.camel-core -
2.10.2 | Consumer Consumer[imap://b...@example.com?host=localh
ostpassword=**] failed polling endpoint: Endpoint[imap://
b...@example.com?host=localhostpassword=**]. Will try again at
  next
poll. Caused by: [javax.mail.NoSuchProviderExceptio
n - imap]
javax.mail.NoSuchProviderException: imap
at
   
 javax.mail.Session.getService(Session.java:798)[130:javax.mail:1.4.4]
at
javax.mail.Session.getStore(Session.java:578)[130:javax.mail:1.4.4]
at
javax.mail.Session.getStore(Session.java:540)[130:javax.mail:1.4.4]
at
javax.mail.Session.getStore(Session.java:519)[130:javax.mail:1.4.4]
at
   
   
  
 
 org.apache.camel.component.mail.MailConsumer.ensureIsConnected(MailConsumer.java:375)[262:org.apache.camel.camel-mail:2.10.2]
at
   
   
  
 
 org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:82)[262:org.apache.camel.camel-mail:2.10.2]
at
   
   
  
 
 org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:142)[255:org.apache.camel.camel-core:2.10.2]
at
   
   
  
 
 org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:92)[255:org.apache.camel.camel-core:2.10.2]
at
   
   
  
 
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)[:1.6.0_37]
at
   
   
  
 
 java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_37]
at
   
  
 
 java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[:1.6.0_37]
at
   
   
  
 
 

Re: NoSuchProviderException: imap while using simple route on Camel 2.10.2 and Karaf 2.2.9

2013-01-24 Thread Thibault Cassan
Ok good news. But I was waiting for the next Camel release. I had some
issues running all my camel components (xslt, if I remember well) with
Karaf 2.3, and someone gave me the advice to wait before migrating.
 Le 24 janv. 2013 09:50, Claus Ibsen claus.ib...@gmail.com a écrit :

 On Thu, Jan 24, 2013 at 9:44 AM, Thibault Cassan
 thibault.cas...@gmail.com wrote:
  Yes, that was it, problem solved!
  Sorry, it seems I didn't read enough the camel release note...
  Thanks for having answered this quickly.
 

 Karaf 2.3.x onwards don't require this anymore.


  Regards,
  Thibault
   Le 24 janv. 2013 09:26, Claus Ibsen claus.ib...@gmail.com a écrit :
 
  On Thu, Jan 24, 2013 at 9:21 AM, Thibault Cassan
  thibault.cas...@gmail.com wrote:
   Yes, I tried to restart Karaf after installing all features. I also
 tried
   restarting after each feature install.
   Each time I get the same error.
 
  Ah have you changed the jre.properties file?
 
  See the bottom of the release notes
  http://camel.apache.org/camel-2100-release.html
 
  eg replace the jre.properties with the cxf.jre.properties from the Karaf
  distro.
 
 
   Le 24 janv. 2013 09:18, Claus Ibsen claus.ib...@gmail.com a
 écrit :
  
   On Thu, Jan 24, 2013 at 8:13 AM, Thibault Cassan
   thibault.cas...@gmail.com wrote:
Christian,
   
I am using Oracle's JDK.
   
  
   And have you tried restarting the Karaf container after installing
 all
   these features.
   Sometimes this can fix weird issues.
  
  
  
Regards,
Thibault
2013/1/24 Christian Müller christian.muel...@gmail.com
   
Which JDK do you use (Oracle, IBM, OpenJDK, ...)?
   
Best,
Christian
   
Sent from a mobile device
Am 24.01.2013 07:37 schrieb Thibault Cassan 
   thibault.cas...@gmail.com:
   
 Hi all,

 I am using Camel 2.10.2 on Karaf 2.2.9 (JDK 1.7.0_09 or
 1.6.0_37, I
   tried
 with both), and i am facing a curious behavior.
 Here is how to reproduce it, from a fresh downloaded Apache
 Karaf
   2.2.9:
  - Start karaf
  - Add some features URL: 'features:addurl
 mvn:org.apache.camel.karaf/apache-camel/2.10.2/xml/features
 mvn:org.apache.activemq/activemq-karaf/5.7.0/xml/features'
  - Add some features: 'features:install activemq activemq-spring
  camel
 camel-jms camel-mail camel-cxf camel-jaxb camel-mina camel-jmx
camel-saxon
 activemq-camel'
  - Create adefault Broker: 'activemq:create-broker'

 Until this point, everything seems to work fine. Now let's
 create a
   route
 involving the mail component:
 beans xmlns=http://www.springframework.org/schema/beans;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=
http://www.springframework.org/schema/beans

 http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://camel.apache.org/schema/spring
 http://camel.apache.org/schema/spring/camel-spring.xsd
 
 camelContext id=test.mail xmlns=
 http://camel.apache.org/schema/spring;

 route id=test.inbound.mail
 from uri=imap://
 b...@example.com?host=localhostamp;password=test/
 log message=Read ok/
 /route

 /camelContext
 /beans

 I write this in a XML file, a copy it in the deploy directory of
   Karaf.
The
 route seems ok.

 Now, the problem. If I stop Karaf (using logout from the karaf
  command
 prompt), and restart it, I am facing a new exception:
 2013-01-24 07:30:18,861 | WARN  | /b...@example.com |
 MailConsumer | 255 -
  org.apache.camel.camel-core -
 2.10.2 | Consumer Consumer[imap://b...@example.com?host=localh
 ostpassword=**] failed polling endpoint: Endpoint[imap://
 b...@example.com?host=localhostpassword=**]. Will try
 again at
   next
 poll. Caused by: [javax.mail.NoSuchProviderExceptio
 n - imap]
 javax.mail.NoSuchProviderException: imap
 at

  javax.mail.Session.getService(Session.java:798)[130:javax.mail:1.4.4]
 at

 javax.mail.Session.getStore(Session.java:578)[130:javax.mail:1.4.4]
 at

 javax.mail.Session.getStore(Session.java:540)[130:javax.mail:1.4.4]
 at

 javax.mail.Session.getStore(Session.java:519)[130:javax.mail:1.4.4]
 at


   
  
 
 org.apache.camel.component.mail.MailConsumer.ensureIsConnected(MailConsumer.java:375)[262:org.apache.camel.camel-mail:2.10.2]
 at


   
  
 
 org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:82)[262:org.apache.camel.camel-mail:2.10.2]
 at


   
  
 
 org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:142)[255:org.apache.camel.camel-core:2.10.2]
 at


   
  
 
 

Re: NoSuchProviderException: imap while using simple route on Camel 2.10.2 and Karaf 2.2.9

2013-01-24 Thread Claus Ibsen
On Thu, Jan 24, 2013 at 9:55 AM, Thibault Cassan
thibault.cas...@gmail.com wrote:
 Ok good news. But I was waiting for the next Camel release. I had some
 issues running all my camel components (xslt, if I remember well) with
 Karaf 2.3, and someone gave me the advice to wait before migrating.

Yeah wait for Karaf 2.3.1 and Camel 2.11
Camel 2.10.x works fine on Karaf 2.2.x

  Le 24 janv. 2013 09:50, Claus Ibsen claus.ib...@gmail.com a écrit :

 On Thu, Jan 24, 2013 at 9:44 AM, Thibault Cassan
 thibault.cas...@gmail.com wrote:
  Yes, that was it, problem solved!
  Sorry, it seems I didn't read enough the camel release note...
  Thanks for having answered this quickly.
 

 Karaf 2.3.x onwards don't require this anymore.


  Regards,
  Thibault
   Le 24 janv. 2013 09:26, Claus Ibsen claus.ib...@gmail.com a écrit :
 
  On Thu, Jan 24, 2013 at 9:21 AM, Thibault Cassan
  thibault.cas...@gmail.com wrote:
   Yes, I tried to restart Karaf after installing all features. I also
 tried
   restarting after each feature install.
   Each time I get the same error.
 
  Ah have you changed the jre.properties file?
 
  See the bottom of the release notes
  http://camel.apache.org/camel-2100-release.html
 
  eg replace the jre.properties with the cxf.jre.properties from the Karaf
  distro.
 
 
   Le 24 janv. 2013 09:18, Claus Ibsen claus.ib...@gmail.com a
 écrit :
  
   On Thu, Jan 24, 2013 at 8:13 AM, Thibault Cassan
   thibault.cas...@gmail.com wrote:
Christian,
   
I am using Oracle's JDK.
   
  
   And have you tried restarting the Karaf container after installing
 all
   these features.
   Sometimes this can fix weird issues.
  
  
  
Regards,
Thibault
2013/1/24 Christian Müller christian.muel...@gmail.com
   
Which JDK do you use (Oracle, IBM, OpenJDK, ...)?
   
Best,
Christian
   
Sent from a mobile device
Am 24.01.2013 07:37 schrieb Thibault Cassan 
   thibault.cas...@gmail.com:
   
 Hi all,

 I am using Camel 2.10.2 on Karaf 2.2.9 (JDK 1.7.0_09 or
 1.6.0_37, I
   tried
 with both), and i am facing a curious behavior.
 Here is how to reproduce it, from a fresh downloaded Apache
 Karaf
   2.2.9:
  - Start karaf
  - Add some features URL: 'features:addurl
 mvn:org.apache.camel.karaf/apache-camel/2.10.2/xml/features
 mvn:org.apache.activemq/activemq-karaf/5.7.0/xml/features'
  - Add some features: 'features:install activemq activemq-spring
  camel
 camel-jms camel-mail camel-cxf camel-jaxb camel-mina camel-jmx
camel-saxon
 activemq-camel'
  - Create adefault Broker: 'activemq:create-broker'

 Until this point, everything seems to work fine. Now let's
 create a
   route
 involving the mail component:
 beans xmlns=http://www.springframework.org/schema/beans;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=
http://www.springframework.org/schema/beans

 http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://camel.apache.org/schema/spring
 http://camel.apache.org/schema/spring/camel-spring.xsd
 
 camelContext id=test.mail xmlns=
 http://camel.apache.org/schema/spring;

 route id=test.inbound.mail
 from uri=imap://
 b...@example.com?host=localhostamp;password=test/
 log message=Read ok/
 /route

 /camelContext
 /beans

 I write this in a XML file, a copy it in the deploy directory of
   Karaf.
The
 route seems ok.

 Now, the problem. If I stop Karaf (using logout from the karaf
  command
 prompt), and restart it, I am facing a new exception:
 2013-01-24 07:30:18,861 | WARN  | /b...@example.com |
 MailConsumer | 255 -
  org.apache.camel.camel-core -
 2.10.2 | Consumer Consumer[imap://b...@example.com?host=localh
 ostpassword=**] failed polling endpoint: Endpoint[imap://
 b...@example.com?host=localhostpassword=**]. Will try
 again at
   next
 poll. Caused by: [javax.mail.NoSuchProviderExceptio
 n - imap]
 javax.mail.NoSuchProviderException: imap
 at

  javax.mail.Session.getService(Session.java:798)[130:javax.mail:1.4.4]
 at

 javax.mail.Session.getStore(Session.java:578)[130:javax.mail:1.4.4]
 at

 javax.mail.Session.getStore(Session.java:540)[130:javax.mail:1.4.4]
 at

 javax.mail.Session.getStore(Session.java:519)[130:javax.mail:1.4.4]
 at


   
  
 
 org.apache.camel.component.mail.MailConsumer.ensureIsConnected(MailConsumer.java:375)[262:org.apache.camel.camel-mail:2.10.2]
 at


   
  
 
 org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:82)[262:org.apache.camel.camel-mail:2.10.2]
 at


   
  
 
 

Re: add custom soap - header

2013-01-24 Thread Christoph Emmersberger
Hi,

I guess you are still on the exchange and set there the exchange header with 
name operationName instead of adding this header to you're SOAP message.

What I've done in the past to solve this issue is the following:

(1) Write a SoapHeaderProcessor
(2) Receive the SoapMessage from your exchange
(3) Modify the header the way you want to
(4) Include the SoapHeaderProcessor into your camel route

I'm not quite sure if that's the only way of doing it, but this way it works.

Please let me know of you have any further questions.

- Christoph

On Jan 23, 2013, at 5:11 PM, Gabriel Wetzler wrote:

 Hi, 
 I'am facing a problem adding an custom soap-header to an web-service request. 
 My route is setup in pojo-mode and looks like this: 
 route id=CustomerServiceUpdateCustomerTest
camel:from uri=direct:iccsUpdateCustomerRequest/
 setHeader headerName=“operationName“
constantabc123/constant
/setHeader
to uri=cxf:bean:ICCSCustomerService/  
camel:to uri=stream:out/
 /route
 I whant to invoke the route by sending an request – object to the direct – 
 component. But I need to add an soap – Header to the soap – envelope like 
 this one: 
 ns2:Header
simpleAuth xmlns=http://xsoap.iccs.de/v1; password=xyz 
 username=abc/
 /ns2:Header
 I couldn't figure out the solution for this problem. Do you have any 
 suggestions for me? 
 thanks



Re: Splitter EIP query

2013-01-24 Thread gilboy
Thanks for the response.

Yes I was planning on configuring quartz to be stateful. 

However, even if I configure it to be stateful I am assuming once I hit the
splitter(assume message contains a list of objects) with parallelprocessing
enabled the quartz thread will complete before the threadpool behind the
splitter has completed all the tasks.

I am wondering if I can get the quartz thread to wait until all the threads
in the splitter have completed their tasks

Thanks



--
View this message in context: 
http://camel.465427.n5.nabble.com/Splitter-EIP-query-tp5726095p5726137.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Splitter EIP query

2013-01-24 Thread Claus Ibsen
On Thu, Jan 24, 2013 at 10:22 AM, gilboy josephoto...@gmail.com wrote:
 Thanks for the response.

 Yes I was planning on configuring quartz to be stateful.

 However, even if I configure it to be stateful I am assuming once I hit the
 splitter(assume message contains a list of objects) with parallelprocessing
 enabled the quartz thread will complete before the threadpool behind the
 splitter has completed all the tasks.


No the splitter will wait for all the spltis to complete before it ends.


 I am wondering if I can get the quartz thread to wait until all the threads
 in the splitter have completed their tasks

 Thanks



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Splitter-EIP-query-tp5726095p5726137.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Possible bug with multicast shareUnitOfWork

2013-01-24 Thread Willem jiang
I think I found the issue, shareUnitOfWork should create the a new 
UnitOfWorkProcessor per processing instead of using the last one, as the parent 
UnitOfWork is different next time. When you using the shareUnitOfWork, the 
error handler should just get one call.
I will commit the fix after running a whole unit tests with my change.


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
  http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Thursday, January 24, 2013 at 3:21 PM, Willem.Jiang wrote:

 Hi,
  
 I can reproduce this kind of error in the trunk by adding a simple unit test
 as you said.
 If I remove the shareUnitOfWork setting, the error handler can get expect
 numbers messages.
 So I just fill a JIRA CAMEL-6005[1] for it.
  
 [1]https://issues.apache.org/jira/browse/CAMEL-6005
  
 Willem
  
  
  
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Possible-bug-with-multicast-shareUnitOfWork-tp5726103p5726113.html
 Sent from the Camel - Users mailing list archive at Nabble.com 
 (http://Nabble.com).





Bindy/FixedLength/encoding/optional fields

2013-01-24 Thread Walzer, Thomas
Hi all,

I see strange behaviour in camel-bindy:

1) When I unmarshal a fixed-length file I get errors when the file is encoded 
in e.g. UTF-8. It seems that characters that need multiple bytes to encode 
confuse the parser/scanner. There was a JIRA with regard to bindy-csv but 
nothing bindy-fixed.

2) The length parameter in the fixedlength-annotation is required (otherwise it 
is 0). Wouldn´t it be nice if this were computed. It would be great to have 
optional fixed-length fields (like in old host files). Or do I have to go the 
smooks-route? 

Regards, Thomas.




Re: Bindy/FixedLength/encoding/optional fields

2013-01-24 Thread Claus Ibsen
Hi

Have you looked at beanio. Its a great library
http://camel.apache.org/beanio



On Thu, Jan 24, 2013 at 10:41 AM, Walzer, Thomas
thomas.wal...@integratix.net wrote:
 Hi all,

 I see strange behaviour in camel-bindy:

 1) When I unmarshal a fixed-length file I get errors when the file is encoded 
 in e.g. UTF-8. It seems that characters that need multiple bytes to encode 
 confuse the parser/scanner. There was a JIRA with regard to bindy-csv but 
 nothing bindy-fixed.

 2) The length parameter in the fixedlength-annotation is required (otherwise 
 it is 0). Wouldn´t it be nice if this were computed. It would be great to 
 have optional fixed-length fields (like in old host files). Or do I have to 
 go the smooks-route?

 Regards, Thomas.





-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Bindy/FixedLength/encoding/optional fields

2013-01-24 Thread Walzer, Thomas

BeanIO looks great, I´ll give it a try. So many libraries - so little time. 
Thank you Claus.



Am 24.01.2013 um 10:49 schrieb Claus Ibsen claus.ib...@gmail.com:

 Hi
 
 Have you looked at beanio. Its a great library
 http://camel.apache.org/beanio
 
 
 
 On Thu, Jan 24, 2013 at 10:41 AM, Walzer, Thomas
 thomas.wal...@integratix.net wrote:
 Hi all,
 
 I see strange behaviour in camel-bindy:
 
 1) When I unmarshal a fixed-length file I get errors when the file is 
 encoded in e.g. UTF-8. It seems that characters that need multiple bytes to 
 encode confuse the parser/scanner. There was a JIRA with regard to bindy-csv 
 but nothing bindy-fixed.
 
 2) The length parameter in the fixedlength-annotation is required (otherwise 
 it is 0). Wouldn´t it be nice if this were computed. It would be great to 
 have optional fixed-length fields (like in old host files). Or do I have to 
 go the smooks-route?
 
 Regards, Thomas.
 
 
 
 
 
 -- 
 Claus Ibsen
 -
 Red Hat, Inc.
 FuseSource is now part of Red Hat
 Email: cib...@redhat.com
 Web: http://fusesource.com
 Twitter: davsclaus
 Blog: http://davsclaus.com
 Author of Camel in Action: http://www.manning.com/ibsen



Re: Exceptions management

2013-01-24 Thread developpef
We currently use 2.10.2



-
http://developpef.blogspot.com
--
View this message in context: 
http://camel.465427.n5.nabble.com/Exceptions-management-tp5726051p5726143.html
Sent from the Camel - Users mailing list archive at Nabble.com.


binding method result to header

2013-01-24 Thread DOLECEK Ales
Hello,

  is there way to bind method result to (input) message header.

If not then it would be fine if @Header annotation could be used on method. If 
the exchange has out message it would set the header on the out message. 
Otherwise it would set the header on in message.

Ales


Custom interceptors and finding the first and last camel route

2013-01-24 Thread BAnanth
Hello,

We have a requirement wherein we need to do some database operations
(inserts/updates) immedialtely after the first and last routes are executed.

We would be writing two custom interceptors - one for the insert operation
after the first route is executed , and the other for the update operation
once the last route is executed.

We wanted to know if there is a way/method to know when the first route in
camel has been executed. Likewise is there a way to find out the last route
executed and then trigger the interceptor for updating the data in the
database.

As always, appreciate your help.

Thanks and Regards,
Bhavani



--
View this message in context: 
http://camel.465427.n5.nabble.com/Custom-interceptors-and-finding-the-first-and-last-camel-route-tp5726148.html
Sent from the Camel - Users mailing list archive at Nabble.com.


issues with simple example

2013-01-24 Thread AMARNATH, Balachandar
I am new to camel and trying to run a simple example. I have the following 
classes constitute a simple route which I am not able to run it.

public class CamelStarter {

/**
 * @param args
 */
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
CamelContext context = new DefaultCamelContext();
context.addRoutes((RoutesBuilder) new IntegrationRoute());
context.start();
context.stop();

}

}


public class IntegrationRoute extends RouteBuilder {

@Override
public void configure() throws Exception {
from(file:///home/bala/input.txt).process(new 
simpleProcessor()).toString();

}

}

public class simpleProcessor implements Processor {

@Override
public void process(Exchange arg0) throws Exception {
// TODO Auto-generated method stub
System.out.println(Received 
+arg0.getIn().getBody(String.class));
}

}


I compiled all the classes and ran CamelStarter class. It goes to the 
configure() method and after that, I am not seeing any more output. No error. I 
expect the code in process() be executed and print something which is not 
happening.
Can someone give me a hint here?


Many thanks and regards
Bala



With thanks and regards
Balachandar




The information in this e-mail is confidential. The contents may not be 
disclosed or used by anyone other than the addressee. Access to this e-mail by 
anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and 
delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of 
this e-mail as it has been sent over public networks. If you have any concerns 
over the content of this message or its Accuracy or Integrity, please contact 
Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus 
scanning software but you should take whatever measures you deem to be 
appropriate to ensure that this message and any attachments are virus free.



camel shutdown

2013-01-24 Thread siraj
Hi,

I have deployed camel in tomcat server.
I want to shutdown camel context when the tomcat server down.
when tomcat server shutdown, it will call servletcontextlistener
contextDestroyed() method.
How can i shutdown camel inside servletcontextlistener.


thanks.




--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-shutdown-tp5726146.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel shutdown

2013-01-24 Thread siraj
to the above post, I am using camel 2.10.3



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-shutdown-tp5726146p5726147.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel shutdown

2013-01-24 Thread Claus Ibsen
Hi

If you are using spring then you can let it handle the lifecycle
http://camel.apache.org/tutorial-on-using-camel-in-a-web-application.html



On Thu, Jan 24, 2013 at 12:06 PM, siraj sira...@gmail.com wrote:
 Hi,

 I have deployed camel in tomcat server.
 I want to shutdown camel context when the tomcat server down.
 when tomcat server shutdown, it will call servletcontextlistener
 contextDestroyed() method.
 How can i shutdown camel inside servletcontextlistener.


 thanks.




 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/camel-shutdown-tp5726146.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: add custom soap - header

2013-01-24 Thread Christoph Emmersberger
Hi Gabriel,

first of all a general question, have you tried to debug a unit test to solve 
your issue?

As far as I can see by now you are looking into the exchange.getOut() message. 
Have you tried looking into your exchange.getIn() message? This might resolve 
your NPE issue.

One more thing to check is the way you're sending messages. Are you workung 
with POJO, PAYLOAD or MESSAGE mode. All three types have different way's to 
handle SoapHeaders, see also:
POJO mode: 
http://camel.apache.org/cxf.html#CXF-HowtogetandsetSOAPheadersinPOJOmode
PAYLOAD mode: 
http://camel.apache.org/cxf.html#CXF-HowtogetandsetSOAPheadersinPAYLOADmode
MESSAGE mode: 
http://camel.apache.org/cxf.html#CXF-SOAPheadersarenotavailableinMESSAGEmode
Basically the idea of accessing the headers seems to be right.

Cheers,

- Christoph


On Jan 24, 2013, at 1:03 PM, Gabriel wrote:

 ace like SoapHeaderProcessor?
 I tried to do it with an normal processor (see my question at  
 http://stackoverflow.com/questions/14497253/setting-custom-soap-header-to-pojo-message-in-camel-cxf
 http://stackoverflow.com/questions/14497253/setting-custom-soap-header-to-pojo-message-in-camel-cxf
  
 )



Re: camel shutdown

2013-01-24 Thread siraj
thanks for the reply. I am using spring and i have defined camelcontext in my
xml config file:

camelContext xmlns=http://camel.apache.org/schema/spring;
  routeBuilder ref=xmlBuilder /
 /camelContext

I would like to know, when the tomcat server stops will the camel shutdown
all routes and stops gracefully.







--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-shutdown-tp5726146p5726155.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel shutdown

2013-01-24 Thread Claus Ibsen
On Thu, Jan 24, 2013 at 1:24 PM, siraj sira...@gmail.com wrote:
 thanks for the reply. I am using spring and i have defined camelcontext in my
 xml config file:

 camelContext xmlns=http://camel.apache.org/schema/spring;
   routeBuilder ref=xmlBuilder /
  /camelContext

 I would like to know, when the tomcat server stops will the camel shutdown
 all routes and stops gracefully.


Yes when tomcat stops, it stops spring, which then stops Camel.
And Camel shutdown graceful
http://camel.apache.org/graceful-shutdown.html








 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/camel-shutdown-tp5726146p5726155.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: add custom soap - header

2013-01-24 Thread Gabriel
Hi Christoph,
yes I programmed a jUnit Test. Currently my route lokks like that:

camelContext xmlns=http://camel.apache.org/schema/spring;
  
dataFormats
soapjaxb contextPath=de.iccs.xapi.customer.v1/
/dataFormats

camel:route  id=CustomerServiceUpdateCustomerTest
camel:from uri=seda:iccsUpdateCustomerRequest/
setHeader headerName=operationName
constantupdateCustomer/constant
/setHeader
process ref=setSimpleAuthHeader/
to uri=cxf:bean:ICCSCustomerService/ 
process ref=printResponse/
/camel:route
/camelContext

The setSimpleAuthHeader processor looks like that:

public class setSimpleAuthHeader implements Processor {

@Override
public void process(Exchange exchange) throws Exception {
ListSoapHeader soapHeaders = CastUtils.cast((List?)
exchange.getOut().getHeader(Header.HEADER_LIST));

// Insert a new header
String xml = ?xml version=\1.0\
encoding=\utf-8\?outofbandHeader quot;
+
quot;xmlns=\quot;http://cxf.apache.org/outofband/Header\quot;
hdrAttribute=\quot;testHdrAttribute\quot; quot;
+
quot;xmlns:soap=\quot;http://schemas.xmlsoap.org/soap/envelope/\quot;
soap:mustUnderstand=\quot;1\quot;
+ namesimpleAuth username=\xxx\ password=\yyy\
xmlns=\http://xsoap.iccs.de/v1\;/name/outofbandHeader;

SoapHeader newHeader = new SoapHeader(new QName(simpleAuthHeader),
DOMUtils.readXml(new StringReader(xml)).getDocumentElement());
// make sure direction is OUT since it is a response message.
newHeader.setDirection(Direction.DIRECTION_OUT);
//newHeader.setMustUnderstand(false);
soapHeaders.add(newHeader);

}
}

I changed excange.getIn() to excange.getOut() but I still have a npe.
Do you have an idea what's wrong?

Thanks Gabriel



Christoph Emmersberger wrote
 Hi Gabriel,
 
 first of all a general question, have you tried to debug a unit test to
 solve your issue?
 
 As far as I can see by now you are looking into the exchange.getOut()
 message. Have you tried looking into your exchange.getIn() message? This
 might resolve your NPE issue.
 
 One more thing to check is the way you're sending messages. Are you
 workung with POJO, PAYLOAD or MESSAGE mode. All three types have different
 way's to handle SoapHeaders, see also:
 POJO mode:
 http://camel.apache.org/cxf.html#CXF-HowtogetandsetSOAPheadersinPOJOmode
 PAYLOAD mode:
 http://camel.apache.org/cxf.html#CXF-HowtogetandsetSOAPheadersinPAYLOADmode
 MESSAGE mode:
 http://camel.apache.org/cxf.html#CXF-SOAPheadersarenotavailableinMESSAGEmode
 Basically the idea of accessing the headers seems to be right.
 
 Cheers,
 
 - Christoph
 
 
 On Jan 24, 2013, at 1:03 PM, Gabriel wrote:
 
 ace like SoapHeaderProcessor?
 I tried to do it with an normal processor (see my question at  
 http://stackoverflow.com/questions/14497253/setting-custom-soap-header-to-pojo-message-in-camel-cxf
 lt;http://stackoverflow.com/questions/14497253/setting-custom-soap-header-to-pojo-message-in-camel-cxfgt;
  
 )





--
View this message in context: 
http://camel.465427.n5.nabble.com/add-custom-soap-header-tp5726077p5726161.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Scala DSL with Scala 2.10

2013-01-24 Thread Alexander Nemish
Claus Ibsen claus.ibsen@... writes:

 
 Hi
 
 The scalate team has been so kind to cut releases that support Scala
 2.9 and 2.10.
 So the last hurdle for Camel is to have an OSGi bundle of Scala 2.10
 which is in the works.
 
 When all that is released. We could reconsider upgrading camel-scala
 to 2.10 as we have all the needed pieces now.
 Also considering that if we do it before a Camel 2.11 release then
 thats easier. As we can't upgrade later in a patch release.
 
 Also I think typesafe is not keen on supporting Scala 2.9 as much any
 longer as 2.10 is out?
 Any news of new Scala 2.9 releases on the way?
 

Hi Claus,

Scala 2.10 scala-library.jar is OSGi ready. Also, scalate team already made a 
release for Scala 2.10. Typesafe claims to support Scala 2.9 for quite awhile, 
there is 2.9.3 release planned later this year.

If it's not too late, could you please consider including 2.10 build for Camel 
2.11 release? Camel is the last dependency holding our project from migrating 
to 
Scala 2.10.

Thank you,
Alexander Nemish



Re: camel shutdown

2013-01-24 Thread siraj
Hi Ashwin,

Can you please elaborate some more



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-shutdown-tp5726146p5726159.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Websphere 6.1.0.45: Unable to return data from a camel-cxf component (POJO mode)

2013-01-24 Thread panzerhans
Thank you for your reply.

For the WSDL: Yes, return type is correct.
xs:complexType name=fetchVesselRegisterV1Response
xs:sequence
xs:element minOccurs=0 name=return type=xs:string/
/xs:sequence
/xs:complexType

I have tried both staying away from putting anything into the exchange.out
and instead manipulating the in body. This ended with a NPE:

2013-01-24 14:45:33,003 WARN  WebContainer : 0
|cxf.phase.PhaseInterceptorChain|logging.LogUtils-doLog() #369 [] -
Interceptor for
{com.statoil.preemExport.v1}PreemExport#{com.statoil.preemExport.v1}fetchVesselRegisterV1
has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault
at
org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:121)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
at
org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:77)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:113)
at
org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:97)
at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:461)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:188)
at
org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:148)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:103)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1213)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:658)
at
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:526)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3673)
at 
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:269)
at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:831)
at
com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1478)
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:133)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:457)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:515)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:300)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:271)
at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1593)
Caused by: java.lang.NullPointerException
at
com.statoil.sis.integration.preem.export.jaxws_asm.FetchVesselRegisterV1Response_WrapperTypeHelper1.createWrapperObject(Unknown
Source)
at
org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:105)
... 34 more


After copying attachments and headers onto the Out (from In) and then again
setting the out body with the String same exception as before came. If I
change the return message to something simple like Hello world same
exception comes. 

I am going to try to wrap the response in a small object with getters and
setters to see if it makes a difference.




--
View this message in context: 
http://camel.465427.n5.nabble.com/Websphere-6-1-0-45-Unable-to-return-data-from-a-camel-cxf-component-POJO-mode-tp5726083p5726163.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: HTTP Endpoint construction in CamelSpringTest

2013-01-24 Thread Zemin Hu
Actually I have been considering using jetty, I just have not tried out yet.
Let me know if you have some ready samples in hand for this purpose. I would
imagine if I use jetty, I have to put jetty: in front of all URIs, then
remove them after unit test, if you want to do test again, you have to
repeat these steps. Can you think of some other elegant way to do it? And
another thought: since I can see all the routes actually are started by
SpringCamelContext when I ran this test, I can find them from the log:
SpringCamelContext INFO  Route: route90 started and consuming
from: Endpoint[servlet:///test/simple] 
Where does SpringCamelContext keep them? are the routes in memory? are they
accessible from some APIs if they are not published as web services?

I looked at the unit test code for camel-servlet that you pointed out, they
use something from com.meterware.httpunit to start another servlet
environment, I already have jetty configured in my environment as plug-in,
so I don't want to do that. Another reason is that all tests are built
around Java DSL based routes, no Spring XML DSL route tests. I don't want to
dig that deep.
Thanks.



--
View this message in context: 
http://camel.465427.n5.nabble.com/HTTP-Endpoint-construction-in-CamelSpringTest-tp5726090p5726165.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: HTTP Endpoint construction in CamelSpringTest

2013-01-24 Thread Willem jiang
Hi,

What does your routes look like?
Do you need to simulate the Server behavior to the client (which could be a 
camel route) to test?

If you want to use the HttpUnit, you have to use the HttpUnit client API to 
invoke the service.
You can also try to start a embed Jetty server which can hold the reference of 
camel servlet, and create the route builder with Java code.


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
  http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem




On Thursday, January 24, 2013 at 10:37 PM, Zemin Hu wrote:

 Actually I have been considering using jetty, I just have not tried out yet.
 Let me know if you have some ready samples in hand for this purpose. I would
 imagine if I use jetty, I have to put jetty: in front of all URIs, then
 remove them after unit test, if you want to do test again, you have to
 repeat these steps. Can you think of some other elegant way to do it? And
 another thought: since I can see all the routes actually are started by
 SpringCamelContext when I ran this test, I can find them from the log:
 SpringCamelContext INFO Route: route90 started and consuming
 from: Endpoint[servlet:///test/simple]  
 Where does SpringCamelContext keep them? are the routes in memory? are they
 accessible from some APIs if they are not published as web services?
  
 I looked at the unit test code for camel-servlet that you pointed out, they
 use something from com.meterware.httpunit to start another servlet
 environment, I already have jetty configured in my environment as plug-in,
 so I don't want to do that. Another reason is that all tests are built
 around Java DSL based routes, no Spring XML DSL route tests. I don't want to
 dig that deep.
 Thanks.
  
  
  
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/HTTP-Endpoint-construction-in-CamelSpringTest-tp5726090p5726165.html
 Sent from the Camel - Users mailing list archive at Nabble.com 
 (http://Nabble.com).





Re: HTTP Endpoint construction in CamelSpringTest

2013-01-24 Thread Zemin Hu
You are right. I was trying too hard to use CamelSpringTestSupport, thinking
it might be simpler to start my route and to test it together. I am wrong.
This CamelSpringTestSupport can do other tests, say file in Ibsen's book,
but not for servlet.
I am going to quit using CamelSpringTestSupport, just go straight with
HttpUnit or HttpClient to do this kind of test. Besides, I also found it's
hard to specify request method GET/POST/PUT/DELETE with ProducerTemplate. 




--
View this message in context: 
http://camel.465427.n5.nabble.com/HTTP-Endpoint-construction-in-CamelSpringTest-tp5726090p5726170.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: issues with simple example

2013-01-24 Thread Claus Ibsen
On Thu, Jan 24, 2013 at 12:32 PM, AMARNATH, Balachandar
balachandar.amarn...@airbus.com wrote:
 I am new to camel and trying to run a simple example. I have the following 
 classes constitute a simple route which I am not able to run it.

 public class CamelStarter {

 /**
  * @param args
  */
 public static void main(String[] args) throws Exception {
 // TODO Auto-generated method stub
 CamelContext context = new DefaultCamelContext();
 context.addRoutes((RoutesBuilder) new IntegrationRoute());
 context.start();
 context.stop();

 }

 }


Hi

See this FAQ
http://camel.apache.org/running-camel-standalone-and-have-it-keep-running.html

You need to keep Camel running, as you start + stop it asap



 public class IntegrationRoute extends RouteBuilder {

 @Override
 public void configure() throws Exception {
 from(file:///home/bala/input.txt).process(new 
 simpleProcessor()).toString();

 }

 }

 public class simpleProcessor implements Processor {

 @Override
 public void process(Exchange arg0) throws Exception {
 // TODO Auto-generated method stub
 System.out.println(Received 
 +arg0.getIn().getBody(String.class));
 }

 }


 I compiled all the classes and ran CamelStarter class. It goes to the 
 configure() method and after that, I am not seeing any more output. No error. 
 I expect the code in process() be executed and print something which is not 
 happening.
 Can someone give me a hint here?


 Many thanks and regards
 Bala



 With thanks and regards
 Balachandar




 The information in this e-mail is confidential. The contents may not be 
 disclosed or used by anyone other than the addressee. Access to this e-mail 
 by anyone else is unauthorised.
 If you are not the intended recipient, please notify Airbus immediately and 
 delete this e-mail.
 Airbus cannot accept any responsibility for the accuracy or completeness of 
 this e-mail as it has been sent over public networks. If you have any 
 concerns over the content of this message or its Accuracy or Integrity, 
 please contact Airbus immediately.
 All outgoing e-mails from Airbus are checked using regularly updated virus 
 scanning software but you should take whatever measures you deem to be 
 appropriate to ensure that this message and any attachments are virus free.




-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: binding method result to header

2013-01-24 Thread Claus Ibsen
Hi

I am not sure we follow what you talk about.

You can read about bean parameter binding in the Camel docs


On Thu, Jan 24, 2013 at 11:58 AM, DOLECEK Ales
ales.dole...@nextiraone.eu wrote:
 Hello,

   is there way to bind method result to (input) message header.

 If not then it would be fine if @Header annotation could be used on method. 
 If the exchange has out message it would set the header on the out message. 
 Otherwise it would set the header on in message.

 Ales



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Cannot change directory to: \

2013-01-24 Thread Claus Ibsen
On Wed, Jan 23, 2013 at 10:54 PM, iyusuf
iqbalyusufdipu+mailingl...@gmail.com wrote:
 It works with version 2.10.2
 Thanks all!!


Yeah it turns out it is only 2.10.3 that had this problem.
It is fixed in the upcoming 2.10.4.




 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Cannot-change-directory-to-tp5725722p5726094.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Websphere 6.1.0.45: Unable to return data from a camel-cxf component (POJO mode)

2013-01-24 Thread panzerhans
No change when wrapping the string inside an object.

I have two other contract first webservices. Those does not display the
above behaviour. So I am going to pick up the WSDL file and rewrite the
spring wiring.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Websphere-6-1-0-45-Unable-to-return-data-from-a-camel-cxf-component-POJO-mode-tp5726083p5726183.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Wrong test for allowRedeliveryWhileStopping, possible bug.

2013-01-24 Thread lleclerc
Hi,

There is a problem that invalidate the test for
allowRedeliveryWhileStopping.

I am using 2.11-SNAPSHOT and have been looking at the test located in :
org.apache.camel.processor.RedeliveryErrorHandlerNoRedeliveryOnShutdownTest

I think that right from the start, the test can't last for 20 seconds, and
thus making the test pass.
Here is my unit test : http://paste.org/60638

The test testSend3Redelivery() is success and the testSend20Redelivery()
fails. 
Something completely stop the camel route and even prevent deadLetterChannel
to catch the problem.
Even if I try to increase the ShutdownStrategy timeout.

Thanks,



--
View this message in context: 
http://camel.465427.n5.nabble.com/Wrong-test-for-allowRedeliveryWhileStopping-possible-bug-tp5726184.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel-Crypto ElGamal encryption works in mvn camel:run but not in Karaf/OSGi

2013-01-24 Thread Patel, Gaurav
I have camel 2.10.3 installed and am using the example pubring-ElGamal.gpg from 
'components\camel-crypto\src\test\resources\org\apache\camel\component\crypto' 
in camel-crypto and user 'sd...@nowhere.net'.

When I run the camel route with mvn camel:run, the RSA encryption works 
perfectly as well as the DSA + ElGamal encryption.  When I move this exact 
route to Karaf, the RSA encryption continues to work but the DSA + ElGamal 
gives the following stack trace:

org.bouncycastle.openpgp.PGPException: exception encrypting session key at 
org.bouncycastle.openpgp.PGPEncryptedDataGenerator.open(Unknown Source) at 
org.bouncycastle.openpgp.PGPEncryptedDataGenerator.open(Unknown Source) at 
org.apache.camel.converter.crypto.PGPDataFormat.marshal(PGPDataFormat.java:86) 
at 
org.apache.camel.processor.MarshalProcessor.process(MarshalProcessor.java:59) 
at 
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
 at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
 at 
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
 at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
 at 
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
 at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
 at 
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
 at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
 at 
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
 at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
 at 
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:334)
 at 
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)
 at 
org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
 at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
 at 
org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)
 at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
 at org.apache.camel.processor.Pipeline.process(Pipeline.java:117) at 
org.apache.camel.processor.Pipeline.process(Pipeline.java:80) at 
org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
 at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
 at 
org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
 at 
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
 at 
org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)
 at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
 at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
 at 
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
 at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
 at 
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
 at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)
 at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:86)
 at 
org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:104)
 at 
org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:560)
 at 
org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:498)
 at 
org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:467)
 at 
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)
 at 
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)
 at 
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1058)
 at 
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1050)
 at 
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:947)
 at 

File component - run them sequentially

2013-01-24 Thread renamsavio
Hi there,
I have a doubt.. I've got 3 File components. But I wanna know how to make
them run sequentially..in other words, the second File component will be run
just when the first one finishes its work in all the files from that
directory, and so on.! I tried to use 'delay', but it's not always i will be
able to know the exact time the first component will finish. I searched a
lot about this but i couldn't find a answer..

Thanks!



--
View this message in context: 
http://camel.465427.n5.nabble.com/File-component-run-them-sequentially-tp5726185.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: issues with simple example

2013-01-24 Thread Christian Müller
The file endpoint should be a directory and not a file.

Sent from a mobile device
Am 24.01.2013 12:33 schrieb AMARNATH, Balachandar 
balachandar.amarn...@airbus.com:

 I am new to camel and trying to run a simple example. I have the following
 classes constitute a simple route which I am not able to run it.

 public class CamelStarter {

 /**
  * @param args
  */
 public static void main(String[] args) throws Exception {
 // TODO Auto-generated method stub
 CamelContext context = new DefaultCamelContext();
 context.addRoutes((RoutesBuilder) new IntegrationRoute());
 context.start();
 context.stop();

 }

 }


 public class IntegrationRoute extends RouteBuilder {

 @Override
 public void configure() throws Exception {
 from(file:///home/bala/input.txt).process(new
 simpleProcessor()).toString();

 }

 }

 public class simpleProcessor implements Processor {

 @Override
 public void process(Exchange arg0) throws Exception {
 // TODO Auto-generated method stub
 System.out.println(Received
 +arg0.getIn().getBody(String.class));
 }

 }


 I compiled all the classes and ran CamelStarter class. It goes to the
 configure() method and after that, I am not seeing any more output. No
 error. I expect the code in process() be executed and print something which
 is not happening.
 Can someone give me a hint here?


 Many thanks and regards
 Bala



 With thanks and regards
 Balachandar




 The information in this e-mail is confidential. The contents may not be
 disclosed or used by anyone other than the addressee. Access to this e-mail
 by anyone else is unauthorised.
 If you are not the intended recipient, please notify Airbus immediately
 and delete this e-mail.
 Airbus cannot accept any responsibility for the accuracy or completeness
 of this e-mail as it has been sent over public networks. If you have any
 concerns over the content of this message or its Accuracy or Integrity,
 please contact Airbus immediately.
 All outgoing e-mails from Airbus are checked using regularly updated virus
 scanning software but you should take whatever measures you deem to be
 appropriate to ensure that this message and any attachments are virus free.




Re: binding method result to header

2013-01-24 Thread Christian Müller
Ales,

You can use the exchange as parameter in your bean method and set you
result as in/out header if you want.

Sent from a mobile device
Am 24.01.2013 11:59 schrieb DOLECEK Ales ales.dole...@nextiraone.eu:

 Hello,

   is there way to bind method result to (input) message header.

 If not then it would be fine if @Header annotation could be used on
 method. If the exchange has out message it would set the header on the out
 message. Otherwise it would set the header on in message.

 Ales



NullpointerException in ClassPathXmlApplicationContext

2013-01-24 Thread Christian Jacob
Hi there, 
I'm quite new to Camel and face some problems when building unit tests which
extend CamelSpringTestSupport. In the constructor of
ttClassPathXmlApplicationContext/tt, I oftenly (*but not always!*) get a
NullpointerException. This is the stack trace:p/


Can anybody help me? Many thanks in advance!



--
View this message in context: 
http://camel.465427.n5.nabble.com/NullpointerException-in-ClassPathXmlApplicationContext-tp5726189.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: NullpointerException in ClassPathXmlApplicationContext

2013-01-24 Thread Claus Ibsen
On Thu, Jan 24, 2013 at 9:29 PM, Christian Jacob cjaco...@aol.com wrote:
 Hi there,
 I'm quite new to Camel and face some problems when building unit tests which
 extend CamelSpringTestSupport. In the constructor of
 ttClassPathXmlApplicationContext/tt, I oftenly (*but not always!*) get a
 NullpointerException. This is the stack trace:p/


 Can anybody help me? Many thanks in advance!


What JDK, Camel and Spring version do you use?





 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/NullpointerException-in-ClassPathXmlApplicationContext-tp5726189.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Scala DSL with Scala 2.10

2013-01-24 Thread Claus Ibsen
On Thu, Jan 24, 2013 at 2:48 PM, Alexander Nemish anem...@gmail.com wrote:
 Claus Ibsen claus.ibsen@... writes:


 Hi

 The scalate team has been so kind to cut releases that support Scala
 2.9 and 2.10.
 So the last hurdle for Camel is to have an OSGi bundle of Scala 2.10
 which is in the works.

 When all that is released. We could reconsider upgrading camel-scala
 to 2.10 as we have all the needed pieces now.
 Also considering that if we do it before a Camel 2.11 release then
 thats easier. As we can't upgrade later in a patch release.

 Also I think typesafe is not keen on supporting Scala 2.9 as much any
 longer as 2.10 is out?
 Any news of new Scala 2.9 releases on the way?


 Hi Claus,

 Scala 2.10 scala-library.jar is OSGi ready. Also, scalate team already made a
 release for Scala 2.10. Typesafe claims to support Scala 2.9 for quite awhile,
 there is 2.9.3 release planned later this year.

 If it's not too late, could you please consider including 2.10 build for Camel
 2.11 release? Camel is the last dependency holding our project from migrating 
 to
 Scala 2.10.


I have logged ticket
https://issues.apache.org/jira/browse/CAMEL-6011

And upgrading Scala now.

 Thank you,
 Alexander Nemish




-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: File component - run them sequentially

2013-01-24 Thread Claus Ibsen
On Thu, Jan 24, 2013 at 8:10 PM, renamsavio renamsav...@gmail.com wrote:
 Hi there,
 I have a doubt.. I've got 3 File components. But I wanna know how to make
 them run sequentially..in other words, the second File component will be run
 just when the first one finishes its work in all the files from that
 directory, and so on.! I tried to use 'delay', but it's not always i will be
 able to know the exact time the first component will finish. I searched a
 lot about this but i couldn't find a answer..


Why do you have 3 file components, why not have only 1?


 Thanks!



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/File-component-run-them-sequentially-tp5726185.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: HTTP Endpoint construction in CamelSpringTest

2013-01-24 Thread Claus Ibsen
On Thu, Jan 24, 2013 at 4:56 PM, Zemin Hu zemin...@hotmail.com wrote:
 You are right. I was trying too hard to use CamelSpringTestSupport, thinking
 it might be simpler to start my route and to test it together. I am wrong.
 This CamelSpringTestSupport can do other tests, say file in Ibsen's book,
 but not for servlet.
 I am going to quit using CamelSpringTestSupport, just go straight with
 HttpUnit or HttpClient to do this kind of test. Besides, I also found it's
 hard to specify request method GET/POST/PUT/DELETE with ProducerTemplate.


The HTTP components of Camel often has a header that can control to
use GET / POST / etc.
So for that you need to send both body + headers with the producer template.






 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/HTTP-Endpoint-construction-in-CamelSpringTest-tp5726090p5726170.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: File component - run them sequentially

2013-01-24 Thread renamsavio
Each file component handles with a diferent directory..

directory root (File Component 1)
   directory 1 (File Component 2) - File Component 1 finishes
processing all the files from its directory, so it starts
   directory 2 (File Component 3) - File Component 2 finishes
processing all the files from its directory, so it starts

Whether I don't use the option 'delay'..the 3 file components starts
randomly. I tried to create a logic putting them inside a Direct
component(don't know whether it's a good practice), but they even start and
stop randomly and simultaneously.

Thanks!



--
View this message in context: 
http://camel.465427.n5.nabble.com/File-component-run-them-sequentially-tp5726185p5726200.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: NullpointerException in ClassPathXmlApplicationContext

2013-01-24 Thread Christian Jacob

Hi Claus,

I'm using JDK 1.7.0, Camel 2.10.3, and Spring 3.2.0.RELEASE, and I'm running my 
tests in Eclipse Juno.

Thanks for your help. Do you need more informations?

Regards,
Christian


-Ursprüngliche Mitteilung- 
Von: Claus Ibsen-2 [via Camel] ml-node+s465427n5726190...@n5.nabble.com
An: Christian Jacob cjaco...@aol.com
Verschickt: Do, 24 Jan 2013 9:32 pm
Betreff: Re: NullpointerException in ClassPathXmlApplicationContext


On Thu, Jan 24, 2013 at 9:29 PM, Christian Jacob [hidden email] wrote:
 Hi there,
 I'm quite new to Camel and face some problems when building unit tests which
 extend CamelSpringTestSupport. In the constructor of
 ttClassPathXmlApplicationContext/tt, I oftenly (*but not always!*) get a
 NullpointerException. This is the stack trace:p/


 Can anybody help me? Many thanks in advance!


What JDK, Camel and Spring version do you use?





 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/NullpointerException-in-ClassPathXmlApplicationContext-tp5726189.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: [hidden email]
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen





If you reply to this email, your message will be added to the discussion below:

http://camel.465427.n5.nabble.com/NullpointerException-in-ClassPathXmlApplicationContext-tp5726189p5726190.html
 

To unsubscribe from NullpointerException in 
ClassPathXmlApplicationContext, click here.
NAML
 




--
View this message in context: 
http://camel.465427.n5.nabble.com/NullpointerException-in-ClassPathXmlApplicationContext-tp5726189p5726202.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Tokenize Producing XML That is Not Well-Formed

2013-01-24 Thread Henryk Konsek
 If you agree, I'll submit a JIRA issue and can
 work on a patch.

Good catch Greg :) . I created the appropriate Jira issue [1]. We
would appreciate if you contribute the patch for the bug you detected.

[1] https://issues.apache.org/jira/browse/CAMEL-6012

--
Henryk Konsek
http://henryk-konsek.blogspot.com


Re: NullpointerException in ClassPathXmlApplicationContext

2013-01-24 Thread Claus Ibsen
On Fri, Jan 25, 2013 at 12:06 AM, Christian Müller
christian.muel...@gmail.com wrote:
 Camel 2.10.3 only supports Spring 3.0.x and 3.1.x.
 Spring 3.2.x support is added in the upcoming Camel 2.11.0 release.
 Which concrete JDK 1.7.0 version do you use? Some older ones had issues
 with parsing XML documents.


Yeah the earlier version of JDK 1.7 was buggy.

Also you may want to add JAXB 2.2.6 on the classpath which is newer
and more reliable
than what comes out of JDK.

If you use Maven then camel-core has dependencies for that out of the box.


 Sent from a mobile device
 Am 24.01.2013 22:26 schrieb Christian Jacob cjaco...@aol.com:


 Hi Claus,

 I'm using JDK 1.7.0, Camel 2.10.3, and Spring 3.2.0.RELEASE, and I'm
 running my tests in Eclipse Juno.

 Thanks for your help. Do you need more informations?

 Regards,
 Christian


 -Ursprüngliche Mitteilung-
 Von: Claus Ibsen-2 [via Camel] ml-node+s465427n5726190...@n5.nabble.com
 An: Christian Jacob cjaco...@aol.com
 Verschickt: Do, 24 Jan 2013 9:32 pm
 Betreff: Re: NullpointerException in ClassPathXmlApplicationContext


 On Thu, Jan 24, 2013 at 9:29 PM, Christian Jacob [hidden email]
 wrote:
  Hi there,
  I'm quite new to Camel and face some problems when building unit tests
 which
  extend CamelSpringTestSupport. In the constructor of
  ttClassPathXmlApplicationContext/tt, I oftenly (*but not always!*)
 get a
  NullpointerException. This is the stack trace:p/
 
 
  Can anybody help me? Many thanks in advance!
 

 What JDK, Camel and Spring version do you use?



 
 
  --
  View this message in context:
 http://camel.465427.n5.nabble.com/NullpointerException-in-ClassPathXmlApplicationContext-tp5726189.html
  Sent from the Camel - Users mailing list archive at Nabble.com.



 --
 Claus Ibsen
 -
 Red Hat, Inc.
 FuseSource is now part of Red Hat
 Email: [hidden email]
 Web: http://fusesource.com
 Twitter: davsclaus
 Blog: http://davsclaus.com
 Author of Camel in Action: http://www.manning.com/ibsen





 If you reply to this email, your message will be added to the discussion
 below:

 http://camel.465427.n5.nabble.com/NullpointerException-in-ClassPathXmlApplicationContext-tp5726189p5726190.html

 To unsubscribe from NullpointerException
 in ClassPathXmlApplicationContext, click here.
 NAML





 --
 View this message in context:
 http://camel.465427.n5.nabble.com/NullpointerException-in-ClassPathXmlApplicationContext-tp5726189p5726202.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen