activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stratio <stra...@hotmail.it>
Subject Problem with Ajax API
Date Tue, 21 Dec 2010 15:54:18 GMT

Hello I'm experimenting a new trouble :(

I'm still using ActiveMQ 5.4.2 on Windows 7. I'm running a Ruby client which
creates a topic named "/topic/ActiveMQFeed" using Stomp Protocol and publish
on it a message every 3 seconds.

I've created a client using javascript with Websocket over Stomp and it
works ;)

Now I would like to create a client using Ajax API without webSocket. 

I saw this page http://activemq.apache.org/ajax.html to learn the Ajax API
and i wrote this code :


<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="amq_jquery_adapter.js"></script>
<script type="text/javascript" src="amq.js"></script>

var amq = org.activemq.Amq;
amq.init({ uri: 'amq', logging: true, timeout: 45 });

var testHandler = function(message) {
    		alert("received "+message);
};

amq.addListener("test", "topic://topic/ActiveMQFeed", testHandler);


Now if i run this code i don't see anything on the browser and on the Chrome
Javascript debugger i get this error :

"Error occurred in poll. HTTP result: 0, status: parsererror"

What does this error depend on? Is it the uri the problem or what?

Thanks in advance for you help.

-- 
View this message in context: http://activemq.2283324.n4.nabble.com/Problem-with-Ajax-API-tp3155676p3155676.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message