Getting empty JMS message from a queue

webmethods Integration server version - 6.5
webMethods JMS Adapter version - 6.1 (Applied Fixes - JMS_6-1_Fix3)

I have made one service to publish a JMS message (DocumentToBytesMessage to give me ByteMessage) to a queue. A MessageListener notifications has been set to get message from that queue which publishes adapter notification document to broker. Another service that subscribes to this publishable document. But while trying to convert this message from JMSByteMessage to Document using service BytesMessageToDocument, I’m getting this exception -
Input field: JMSMessage cannot be null or empty.
Weblogic messaging service is the target JMS provider. JMS Connection details :
Transaction Type - LOCAL_TRANSACTION
JNDI Initial Context Factory - weblogic.jndi.WLInitialContextFactory
JNDI Provider URL - t3://<hostname>:<Port>
QueueConnectionFactory JNDI Name - com.mdsi.port.paJms.queueConnectionFactory

Hi Akash,
Have u designed a MessageListener with some avialable webMethods services,like the “sendToQueue” to send a message to queue. If so can u advice how do we receive a meesage. Coz Iam trying the same, but unable to do so.

Neetu

Neetu,

You would use a MessageConsumer, MessageRequestor or JMS Adapter Notification to retrieve messages from a JMS queue or topic.

The first two allow you to retrieve one or more messages from the JMS destination programatically. The notification causes a Broker document to be published when a message arrives in a queue or topic you are monitoring. You would then create an IS trigger to invoke a service to process the JMS message after mapping it from the broker document published by the notification.

Mark

Hi Mark,

Thanks for that information. However it’s not helping me. Let me be clearer. I am trying to read a message from a queue created in WebMethods Jboss Package: JBoss > Tools > MBean Manager > jboss.mq.destination:name=testWmQueue,service=Queue.

I have written the following code to lookup this queue from an external application:

Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY,“org.jnp.interfaces.NamingContextFactory”);
env.put(Context.PROVIDER_URL,“jnp://10.24.142.132:1099”);
env.put(Context.PROVIDER_URL,“10.24.142.132:8080”);
Context context = new InitialContext(env);
QueueConnectionFactory queueConnectionFactory = (QueueConnectionFactory)context.lookup(“java:/ConnectionFactory”);
Queue queue = (Queue)context.lookup("queue/ testWmQueue ");

However I get the following error : javax.naming.NameNotFoundException: queue/ testWmQueue

Please advice if there is any other way to look up a queue at the destination specified above.

Also would like to add that, the Ports detail reads: the Provider as Jetty for Port 8080.

Please help as I am unable to proceed further.

Thanks & Regards,
Neetu