You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by sa...@tcs.com on 2012/03/08 09:50:49 UTC

JMS binding - question

Hi,

I have defined a JMS binding for one of my services.
My service has only one operation (name is not onMessage) and param is an 
xml object type.
I have specified the operationSelector and wireFormat as jmsdefault.

I have a client where I send a TextMessage to the JMS queue, the message 
text being the XML string required.
When I test this, I get a ClassCastException - SpyMessage to TextMessage.
My queue is defined in JBoss AS. 

Instead when my service has just one operation named onMessage and its 
param is javax.jms.Message, the operationSelector and wireFormat tags 
commented, it works fine.

Am I messing up with any jars? Any suggestions on what I have to check 
specifically and order if any.

What I want is an operation with a name other than onMessage and a param 
whose type is not javax.jms.Message.
Could you please tell me what should be the configuration for this.

Sangeetha
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you



Re: JMS binding - question

Posted by Scott Kurz <sk...@gmail.com>.
Hi Sangeetha,

I'm not too familiar with JBoss messaging, but from your email they
seem to have a non-standard JMS Message type, 'SpyMessage' which the
Tuscany JMS Binding does not currently support binding to.

Perhaps you could try to address this from the JBoss side, adjusting
your configuration so that JBoss delivers a TextMessage instead?

----

Assuming you've figured that out, let me just mention FYI that the
default wireformat as well as the text/xml wireformat will use a
databinding (default is JAXB) to map your XML string to a Java
parameter... or you can use the "text" wireformat to map it simply to
a String.

Hope that helps,
Scott