camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Chekan <vche...@cox.net>
Subject Re: xstream usage
Date Tue, 22 Jul 2008 04:39:30 GMT
Yesh, that's what I did. As Claus advised I also inserted my own 
Processor to dump additional information. Apparently 
marshall().xstream() returns array of size 0.
Too bad it works fine under Eclipse. I keep digging. Most likely it is 
something with classpath/libraries.

To my surprise (most of my experience is c#) byte[].class.getName() 
returns "[B". At first I thought it is some binary garbage and only 
getCanonicalName clarified the situation :)))

Vadim.

James Strachan wrote:
> Turning on the trace output can help see what the real payloads of the
> messages are at each step of a route...
> http://activemq.apache.org/camel/tracer.html
> 
> 2008/7/20 Claus Ibsen <ci@silverbullet.dk>:
>> Hi
>>
>> You could add a process step where you can debug / log out your exchange. And 100%
determine the body type.
>>
>> It does look like a strange body type? The code does after all just print its classname
(albeit removing java.lang) for the standard types.
>>
>> Does it print the body content also? Looks like you cutted the logging short in this
mail.
>>
>>
>> Med venlig hilsen
>>
>> Claus Ibsen
>> ......................................
>> Silverbullet
>> Skovsgårdsvænget 21
>> 8362 Hørning
>> Tlf. +45 2962 7576
>> Web: www.silverbullet.dk
>>
>> -----Original Message-----
>> From: Vadim Chekan [mailto:kot.begemot@gmail.com]
>> Sent: 19. juli 2008 23:35
>> To: camel-user@activemq.apache.org
>> Subject: xstream usage
>>
>> I'm having problems with xstrem. I'm trying to convert jdbc output
>> into xml and then extract a node I'm interested in.
>> Host application: activemq-5.1.0
>> Camel: today's trunk build.
>> Code:
>>                from("activemq:vadim33").
>>                marshal().
>>                xstream().
>>                to("activemq:vadim44");
>>
>> After marshaling I get some strange body "BodyType:[B Body:". I would
>> expect xml dom object or xml text there.
>> Any hints what the problem could be?
>>
>> 2008-07-19 14:26:12,141 [enerContainer-1] INFO  TraceInterceptor
>>        - ID-vchekan/3625-1216502771610/1-1 -> interceptor2
>> Interceptor[Delegate(Pipeline[DeadLetterChannel[Delegate(TraceInterceptor[Marshal[org.apache.camel.model.dataformat.XStreamDataFormat@120540c]]),
>> RecipientList[log:org.apache.camel.DeadLetterChannel?level=error],
>> RedeliveryPolicy[maximumRedeliveries=6]],
>> DeadLetterChannel[Delegate(TraceInterceptor[To[activemq:vadim44]]),
>> RecipientList[log:org.apache.camel.DeadLetterChannel?level=error],
>> RedeliveryPolicy[maximumRedeliveries=6]]])] InOnly Properties:{}
>> Headers:{JMSXGroupID=null, JMSType=null, JMSCorrelationID=null,
>> JMSMessageID=ID:vchekan-3550-1216502210018-2:0:1:1:2, JMSExpiration=0,
>> JMSRedelivered=false, jdbc.columnCount=1, JMSDeliveryMode=2,
>> JMSPriority=4, JMSTimestamp=1216502224862, JMSReplyTo=null,
>> JMSDestination=queue://vadim33} BodyType:java.util.ArrayList
>> Body:[{body=some text}]
>>
>> 2008-07-19 14:26:12,188 [enerContainer-1] INFO  TraceInterceptor
>>        - ID-vchekan/3625-1216502771610/1-1 -> marshal1
>> Marshal[org.apache.camel.model.dataformat.XStreamDataFormat@120540c]
>> InOnly Properties:{CamelCauseException=null}
>> Headers:{JMSXGroupID=null, JMSType=null, JMSCorrelationID=null,
>> JMSMessageID=ID:vchekan-3550-1216502210018-2:0:1:1:2, JMSExpiration=0,
>> JMSRedelivered=false, jdbc.columnCount=1, JMSDeliveryMode=2,
>> JMSPriority=4, JMSTimestamp=1216502224862, JMSReplyTo=null,
>> JMSDestination=queue://vadim33} BodyType:java.util.ArrayList
>> Body:[{some text}]
>>
>> 2008-07-19 14:26:12,391 [enerContainer-1] INFO  TraceInterceptor
>>        - ID-vchekan/3625-1216502771610/1-1 -> to3
>> To[activemq:vadim44] InOnly Properties:{CamelCauseException=null}
>> Headers:{JMSXGroupID=null, JMSType=null, JMSCorrelationID=null,
>> JMSMessageID=ID:vchekan-3550-1216502210018-2:0:1:1:2, JMSExpiration=0,
>> JMSRedelivered=false, jdbc.columnCount=1, JMSDeliveryMode=2,
>> JMSPriority=4, JMSTimestamp=1216502224862, JMSReplyTo=null,
>> JMSDestination=queue://vadim33} BodyType:[B Body:
>>
>>
>> --
>> From RFC 2631: In ASN.1, EXPLICIT tagging is implicit unless IMPLICIT
>> is explicitly specified
>>
> 
> 
> 


Mime
View raw message