activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurav chauhan <apurav.chau...@yahoo.com>
Subject Parsing TextMessage in JavaScript
Date Sun, 21 Feb 2010 19:15:18 GMT

hello all,
i am working with amq.js and ajax. i know how to get the contents of the
message if it is sent through the 
javascript like:

Sender code:
amq.sendMessage("topic://APURAV",""+document.getElementById("chatboxs").value+"");

Callback method
function(message)
  {
   alert("received
"+message.childNodes[0].data+message.getAttribute('type'));
  }
--------------------------------------------------------
But if i publish a TextMessage from my servlet through the code , i dont
know how to read the contents of that message.
Even though the above callback method works but i have no idea how to print
the contents.

Servlet Code Sample
...
TextMessage message =session.createTextMessage("hello");
		        message.setStringProperty("type", "apurav");
				producer.send(message);

PLEASE HELP ME WITH PRINTING THIS MESSAGE IN CALLBACK HANDLER.
THANKS IN ADVANCE
-- 
View this message in context: http://old.nabble.com/Parsing-TextMessage-in-JavaScript-tp27676880p27676880.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message