There is no real magic with NormalizedMessage. Just have a look at the
JBI spec. It's explained there very detailed.
I think you did the right thing with doing a custom marshaler for your
protocol. So now it depends what you got when de-serializing your
object message. I think if its a pure object you can just put that
object to the headers map of the inMsg. Another way would be to use
xstream for serializing / deserializing objects which would give you a
perfect XML you can directly put into the content of the normalized
message. I don't know your stuff good enough to give you better hints
;)

Lars


2009/9/25 Barrie Treloar <[email protected]>:
> On Fri, Sep 25, 2009 at 4:53 PM, Lars Heinemann <[email protected]> wrote:
>> So you fill the JMS queue from outside SMX and process them inside SMX?
>> Well you always have to use Normalized messages inside the bus. Thats
>> the way JBI works.
>>
>> If you read a topic or queue from within ServiceMix you will always
>> get a MessageExchange containing a normalized message.
>> Where exactly is the problem?
>
> The problem is my understanding of how a NormalizedMessage is filled.
>
> The default marshalers only support TextMessages and I have ObjectMessages
> being published on the Queue and consumed from the Topic.
> SMX is doing the publishing (Queue) and consuming (Topic) and another
> service outside of SMX is consuming the request (Queue) and publishing the
> response (Topic).
>
> To get this to work I have written my own Marshaler, extending the
> DefaultConsumerMarshaler and DefaultProviderMarshaler and hacked the code
> that uses
> PhaseInterceptorChain to convert to/from NormalizedMessages.
>
> I couldn't find documentation that explains how you work with
> NormalizedMessages.
>
> All this is very new, so I expect I am doing something wrong.
>
> The next step after this proof of concept would be to create a binding
> component for another protocol.
> And I expect that will require understanding NormalizedMessages in greater
> details.
>
> Thanks
>



-- 
http://lhein.blogspot.com

Reply via email to