Hi Asankha,
I removed the ActiveMQ JMS provider now. I use the JBossMQ JMS provider
coming with JBoss. Therefore I made the following changes:
Axis2.xml:
<transportReceiver name="jms"
class="org.apache.axis2.transport.jms.JMSListener">
<parameter name="default" locked="false">
<parameter name="java.naming.factory.initial"
locked="false">org.jnp.interfaces.NamingContextFactory</parameter>
<parameter name="java.naming.provider.url"
locked="false">jnp://localhost:1199</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName"
locked="false">ConnectionFactory</parameter>
</parameter>
</transportReceiver>
Client:
url = "jms:/" +
"StockQuoteService" +
"?transport.jms.ConnectionFactoryJNDIName=ConnectionFactory" +
"&java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory" +
"&java.naming.provider.url=jnp://localhost:1199";
JBoss jbossmq-destinations-service.xml:
<mbean code="org.jboss.mq.server.jmx.Queue"
name="jboss.mq.destination:service=Queue,name=StockQuoteService">
<depends
optional-attribute-name="DestinationManager">jboss.mq:service=Destinatio
nManager</depends>
</mbean>
The effect is that the client sends a JMS message to the queue
StockQuoteService. But I get no response (client log):
2008-04-02 09:27:32,587 DEBUG org.jboss.mq.il.uil2.UILClientILService -
Starting
2008-04-02 09:27:32,712 DEBUG org.apache.axis2.transport.jms.JMSSender -
[Client]Sending message to destination : QUEUE.StockQuoteService
2008-04-02 09:27:32,774 DEBUG org.apache.axis2.transport.jms.JMSSender -
Waiting for a maximum of 30000ms for a response message to destination :
QUEUE.JMS_TQ1
2008-04-02 09:28:02,775 WARN org.apache.axis2.transport.jms.JMSSender -
Did not receive a JMS response within 30000 ms to destination :
QUEUE.StockQuoteService
2008-04-02 09:28:02,775 DEBUG org.jboss.mq.il.uil2.SocketManager - End
ReadTask.run
2008-04-02 09:28:02,775 DEBUG org.jboss.mq.il.uil2.UILClientILService -
Stopping
2008-04-02 09:28:02,775 DEBUG org.jboss.mq.il.uil2.SocketManager - End
WriteTask.run
2008-04-02 09:28:02,869 FATAL com.billit.client -
org.apache.axis2.AxisFault: Incoming message input stream is null
It seems like the request was sent to the right queue but the webservice
is not listening to the queue. I did no special configuration for the
webservice. Therefore I think it should listen to a queue with the
service name (StockQuoteService). Do I need a special message receiver?
The StockQuoteService from the Axis2 example has the message receiver
public class StockQuoteServiceMessageReceiverInOut extends
org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver ...
Any ideas?
Regards!
Ines
________________________________
Von: Asankha C. Perera [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 2. April 2008 08:43
An: [email protected]
Betreff: Re: SOAP with JMS and JBoss
Ines
1. axis2.xml: I uncommented the JMS transportReceiver and
transportSender.
So does the configuration now point to an ActiveMQ JMS provider
instance?
1. ActiveMQ: I followed the steps to integrate the Apache ActiveMQ
with JBoss as decribed in
http://activemq.apache.org/integrating-apache-activemq-with-jboss.html
I am not familiar with this.. but why would you want to integrate
ActiveMQ with JBoss? You can select either of these as your JMS provider
and just use it..
1. Client: I changed the URL to
jms:/StockQuoteService?transport.jms.ConnectionFactoryJNDIName=QueueConn
ectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.Activ
eMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616
This obviously points to ActiveMQ
The result is that I get no response:
2008-03-28 12:13:39,286 WARN
org.apache.axis2.transport.jms.JMSOutTransportInfo - Cannot get or
lookup JMS destination : StockQuoteService from url : jms:/
StockQuoteService?transport.jms.ConnectionFactoryJNDIName=QueueConnectio
nFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQIn
itialContextFactory&java.naming.provider.url=tcp://localhost:61616 :
StockQuoteService
This means that there was no JMS destination named "StockQuoteService"
found on the JNDI when using the given properties (listed out in the
warning message).. Usually, AMQ creates destinations "on demand" but I
think other providers like JBoss requires you to create these before
hand. Since you have done some 'integration' of the two, I am not sure
what is valid.. you could use a JMS sample client like the QueueBrowser
or JConsole to see if the destination actually exists and visible when
using the above params
asankha