After a lengthy IRC discussion, it was determined that anything reading the Exchange off of an HTTP Component would need to perform a copy, as the underlying object is a stream.
MessageUtil.enableContentRereadability() is available to perform exactly this function, but does not support the StaxSource object. Jira ticket opened to correct this. https://issues.apache.org/activemq/browse/SM-1180 gnodet wrote: > > If the consumer endpoint is HTTP, it will by default put a stream on the > underlying socket as the content of the In message. > If you your listener read it (as it seems because you are displaying it), > you need to ensure you transform the content to a re-readable source > before > consuming it. > This can be done by using: > > > org.apache.servicemix.jbi.util.MessageUtil.enableContentRereadability(message); > > > > > On Dec 14, 2007 8:10 PM, mattrpav <[EMAIL PROTECTED]> wrote: > >> >> I have a HTTP Consumer passing a message to a bean, and the In message is >> being stripped down to <?xml version="1.0" encoding="UTF-8"?>. >> >> I have an Exchange Listener, and it appears to be happening when the >> message >> is being accepted by the bean. [handleExchange] output is from the >> Exchange >> listener, and [Persistence] is from the bean. Any ideas on why this is >> happening? >> >> [handleExchange: SENT] >> Component: servicemix-http >> Activation component name: servicemix-http >> Activation dest endpoint: null >> Activation id: null >> ServiceName: >> {http://airband.com/esb}Persistence<http://airband.com/esb%7DPersistence> >> ExchangeId: ID:192.168.1.104-116d97c39ad-10:3 >> DeliveryChannel: DeliveryChannel{servicemix-http} >> SouceId: [container=ServiceMix,name=servicemix-http] >> DestinationId: null >> Status: Active >> Timestamp: 1197653381599 >> Error: null >> Message In: <?xml version="1.0" >> encoding="UTF-8"?><sendEvent >> xmlns="http://airband.com/esb/ws" xmlns:ns2="http://airband.com/esb/xml" >> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> >> <Event createDate="2007-12-11T10:40:12.214+00:04" sourceSystem="dev >> test"/> >> </sendEvent> >> Message Out: null >> >> [handleExchange: ACCEPTED] >> Component: servicemix-http >> Activation component name: servicemix-http >> Activation dest endpoint: null >> Activation id: null >> ServiceName: >> {http://airband.com/esb}Persistence<http://airband.com/esb%7DPersistence> >> ExchangeId: ID:192.168.1.104-116d97c39ad-10:3 >> DeliveryChannel: DeliveryChannel{servicemix-http} >> SouceId: [container=ServiceMix,name=servicemix-http] >> DestinationId: [container=ServiceMix,name=servicemix-bean] >> Destination ContainerName: ServiceMix >> Destination Name: servicemix-bean >> Status: Active >> Timestamp: 1197653381630 >> Error: null >> Message In: <?xml version="1.0" encoding="UTF-8"?> >> Message Out: null >> >> [esb:Persistence] Received exchange: ID:192.168.1.104-116d97c39ad-10:3 >> Active >> [Persistence] <In msg> <?xml version="1.0" encoding="UTF-8"?> >> -- >> View this message in context: >> http://www.nabble.com/In-message-truncated-tp14339747s12049p14339747.html >> Sent from the ServiceMix - User mailing list archive at Nabble.com. >> >> > > > -- > Cheers, > Guillaume Nodet > ------------------------ > Blog: http://gnodet.blogspot.com/ > > -- View this message in context: http://www.nabble.com/In-message-truncated-tp14339747s12049p14405557.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
