James,

The reason that the JMS Connector creates and accepts BytesMessage is for
attachments support.  The rationale is that the attachment encoding may not
map well into a TextMessage.  However, there is nothing that says that a
simple soap message without attachments could/should not be sent as a
TextMessage.  This support is currently not available but could be
considered for a future iteration of the JMS transport if enough people want
this.  

The code to add support for TextMessage is relatively straightforward.
Would you be interested in contributing a patch?

Thanks,
Jaime 

> -----Original Message-----
> From: James Turner [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 11, 2003 5:55 PM
> To: [EMAIL PROTECTED]
> Subject: JMS transport only supports BytesMessage ??
> 
> Having a look at the SimpleJMSListener it assumes all messages
> are javax.jms.BytesMessage.
> 
> >  /**
> >   * This method is called asynchronously whenever a message arrives.
> >    * @param message
> >    */
> >    public void onMessage(javax.jms.Message message)
> >   {
> >        try
> >       {
> >            // pass off the message to a worker as a BytesMessage
> >            SimpleJMSWorker worker = new SimpleJMSWorker(this,
> (BytesMessage)message);
> 
> 
> Various other parts of the code also make this assumption (e.g.
> JMSConnector).
> Is there any particular reason why this is so, and why TextMessage
> is not supported ?
> Are there any plans to support other message types in the future ??
> 
> Can anyone shed any light on this
> TIA James


Reply via email to