Hi

I will try to simplify my route at first to try to pin point the problem. 

You can also try to use the "trace" feature of Camel
http://activemq.apache.org/camel/tracer.html
as it would show the execution flows.

However make the route more simpler. Also in your route you send to 
"seda:whcLog" twice. And maybe that confuses you.

What do you expect it to do? = What is the correct solution to your problem?

You can also add a .process() where you can add you own java code and use 
debugger or system.out to be sure the data you are looking for is there.

Also make sure the split is doing what it should correctly. Have you tried to 
check the result of the split is correct?
 
Bottom line: Dig a big more, make it a bit simpler and you will find the 
problem. But don't hesitate to ask again here.

Glad you are trying it out and hopefully will get a solution to it. At least 
Camel gives you at the end the power of pure Java where you can do what ever 
you want, so you are not stuck in some kind of "limit".


Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk
-----Original Message-----
From: dkozic [mailto:[EMAIL PROTECTED] 
Sent: 20. august 2008 14:43
To: [email protected]
Subject: RE: Marshaling jdbc output with xstream


Hi,

I have modified route acording to your suggestion. It is now:

from("timer://whcTimer?period=20000&delay=10000").setBody(
        constant("select 1 ID,  'addRequest|38765405818||' skript from dual")).
to("seda:whcLog").to("jdbc:dataSource").to("seda:whcLog").splitter(body()).to("seda:whcLog").to("seda:whcA");
        
from("seda:whcA").to("seda:whcLog").marshal().xstream().convertBodyTo(String.class).to("seda:whcB");

from("seda:whcB").to("seda:whcLog");

from("seda:whcLog").to("log:asw.someLogger?level=DEBUG&showHeaders=true");

But the log output is the same as before:

2008-08-20 14:35:27,640 [seda:whcLog thread:3] DEBUG asw.someLogger:73  -
Exchange[Headers:{}, BodyType:String, Body:select 1 ID, 
'addRequest|38765405818||' skript from dual]
2008-08-20 14:35:30,015 [seda:whcLog thread:3] DEBUG asw.someLogger:73  -
Exchange[Headers:{jdbc.columnCount=2}, BodyType:java.util.ArrayList,
Body:[{SKRIPT=addRequest|38765405818||, ID=1}]]
2008-08-20 14:35:30,015 [seda:whcLog thread:3] DEBUG asw.someLogger:73  -
Exchange[Headers:{org.apache.camel.splitSize=1,
org.apache.camel.splitCounter=0, jdbc.columnCount=2},
BodyType:java.util.HashMap, Body:{SKRIPT=addRequest|38765405818||, ID=1}]
2008-08-20 14:35:30,046 [seda:whcLog thread:3] DEBUG asw.someLogger:73  -
Exchange[Headers:{org.apache.camel.splitSize=1,
org.apache.camel.splitCounter=0, jdbc.columnCount=2},
BodyType:java.util.HashMap, Body:{SKRIPT=addRequest|38765405818||, ID=1}]
2008-08-20 14:35:30,312 [seda:whcLog thread:3] DEBUG asw.someLogger:73  -
Exchange[Headers:{org.apache.camel.splitSize=1,
org.apache.camel.splitCounter=0, jdbc.columnCount=2}, BodyType:String,
Body:]

What is wrong with my route?

By the way, great product!!!



Claus Ibsen wrote:
> 
> Hi
> 
> You need to convert to body after xstream marshal to what you want - eg
> String.
> 
> This is part of a route I have used for POC with Camel, where we want to
> store on JMS queue as readable String
> 
>   from("gsoQueue")
>             // map the input from GS to our inhouse format
>             .processRef("mapper")
>             // marhsal the inhouse format to a xml stream and as a string
> so we can browse
>             // it on the queue (xstream is default byte arrays)
>             .marshal().xstream().convertBodyTo(String.class)
>             .to("inhouseQueue");
> 
> 
> 
> Med venlig hilsen
>  
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web: www.silverbullet.dk
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Marshaling-jdbc-output-with-xstream-tp19065283s22882p19068605.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to