Hi,

 I hava deployed a* Java SCA service* and I am trying to use the* JMS
binding* that tuscany provides.
I have used a small java program to post a message to an activemq queue.
I use the the JMS binding on the Java SCA service side to listen for
messages.
When I used an "*ObjectMessage*" to post the message to the queue it worked
fine with tuscany's* 1.0.1 release*.
But when I migrated to the 1.1 release of tuscany I started getting runtime
exceptions because the* 1.1 release* accepts only* XML messages*.

I therefore used a "*TextMessage*" object and formatted an xml message
string and posted this to the queue.

This calls the appropriate method. But after calling the method it throws
the following runtime exceptions.

Exception while processing message:*
java.lang.ClassCastException*:*org.apache.tuscany.sca.binding.jms.impl.JMSBindingException
*

*java.lang.ClassCastException*:*
org.apache.tuscany.sca.binding.jms.impl.JMSBindingException*
        at
org.apache.tuscany.sca.binding.jms.provider.JMSMessageProcessorImpl.createXMLJMSMessage(
*JMSMessageProcessorImpl.java:140*)

        at
org.apache.tuscany.sca.binding.jms.provider.JMSMessageProcessorImpl.insertPayloadIntoJMSMessage(
*JMSMessageProcessorImpl.java:85*)

        at
org.apache.tuscany.sca.binding.jms.provider.JMSBindingListener.sendReply(*
JMSBindingListener.java:125*)
        at
org.apache.tuscany.sca.binding.jms.provider.JMSBindingListener.sendFaultReply(
*JMSBindingListener.java:152*)
        at
org.apache.tuscany.sca.binding.jms.provider.JMSBindingListener.onMessage(*
JMSBindingListener.java:65*)
        at org.apache.activemq.ActiveMQMessageConsumer.dispatch(*
ActiveMQMessageConsumer.java:854*)
        at org.apache.activemq.ActiveMQSessionExecutor.dispatch(*
ActiveMQSessionExecutor.java:99*)
        at org.apache.activemq.ActiveMQSessionExecutor.iterate(*
ActiveMQSessionExecutor.java:166*)
        at org.apache.activemq.thread.PooledTaskRunner.runTask(*
PooledTaskRunner.java:117*)
        at org.apache.activemq.thread.PooledTaskRunner.access$100(*
PooledTaskRunner.java:26*)
        at org.apache.activemq.thread.PooledTaskRunner$1.run(*
PooledTaskRunner.java:44*)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
*ThreadPoolExecutor.java:665*)

        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(
*ThreadPoolExecutor.java:690*)
        at java.lang.Thread.run(Unknown Source)


It is a little strange because it throws an exception after calling the
right method.

The xml message I sent had the following structure.

<soapenv:Envelope
  xmlns:q0="http://namespace1";
  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
  xmlns:xsd="http://www.w3.org/2001/XMLSchema";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
<soapenv:Header>
</soapenv:Header>
  <soapenv:Body>
<q0:methodname>
  <q0:argname>
    <q0:id>myId</q0:id>
    <q0:name>myName</q0:name>
  </q0:argname>
</q0:methodname>
  </soapenv:Body>
</soapenv:Envelope>

I am not sure what the problem here is. I think it might have to do with the
message format.

Also the method that is called does not have a return argument (that is it
has a void return type). Is that a problem?

Is there a kindred soul who can help me here :) ?
Any help would be greatly appreciated.

Cheers,
Altaf

Reply via email to