Hi John,

I really think your way of handling non-xml content is not the easier one, as you will certainly face lots of problems, trying to get around the fact the the content of the message has to be
an xml stream.

A better way should be to use attachments on the NormalizedMessage, as these
should also be able to handle non-xml data in a much better way. Do you any drawbacks
in trying this ?

Guillaume

HURST, John B wrote:

Hi,

I've had reasonable success dealing with non-XML files in the regular
service pipeline, i.e. as an OutBinding, because I can simply cast the
message content as a StreamSource and get a binary input stream from
that.

I tried to use the subscription mechanism to route some non-XML
messages, and it didn't work so well.  The SubscriptionManager uses by
default a CopyTransformer to get a copy of the message, to send to a
subscriber.  The problem is the CopyTransformer attempts to parse the
stream so as to get a DOMSource -- no good if the stream isn't XML.

Are we fighting uphill to process non-XML with ServiceMix?  Or, can I
specify the MessageTransformer to be used by the SubscriptionManager?  I
could probably code up an enhanced MessageTransformer that is tolerant
of specific binary formats in my usage.

John Hurst
Wellington, New Zealand



______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email ______________________________________________________________________



Reply via email to