camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dkozic <drazen.ko...@asw.eu>
Subject Marshaling jdbc output with xstream
Date Wed, 20 Aug 2008 08:54:00 GMT

Hi,

I am trying to marshal sql output with xstream like this

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().to("seda:whcB");

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

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

The log output is this:
2008-08-20 10:42:05,890 [seda:whcLog thread:3] DEBUG asw.someLogger:73  -
Exchange[Headers:{}, BodyType:String, Body:select 1 ID, 
'addRequest|38765405818||' skript from dual]
2008-08-20 10:42:07,906 [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 10:42:07,921 [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 10:42:07,921 [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 10:42:08,218 [seda:whcLog thread:3] DEBUG asw.someLogger:73  -
Exchange[Headers:{org.apache.camel.splitSize=1,
org.apache.camel.splitCounter=0, jdbc.columnCount=2}, BodyType:[B, Body:]

After xstream marshalling message body is something strange, not xml.

I searched forum and find this entry:
http://www.nabble.com/xstream-usage-td18548989s22882.html#a18548989

and this jira issue:
http://issues.apache.org/activemq/browse/CAMEL-744
and this one:
http://issues.apache.org/activemq/browse/CAMEL-749

I allready have xstream-1.3.jar in my classpath. also I have tryed with
-Dfile.encoding=UTF-8, with no results.

Please help


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


Mime
View raw message