activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun <cloud...@hotmail.com>
Subject client side http post without a web server
Date Mon, 14 Aug 2006 22:23:23 GMT

Hi, I am new to activeMQ, is there a way to do a http post without a web
server invloved? 

My situation is I have a java application running on the client machine with
an embedded broker (the example embedded broker), the application is
subscribing to a queue(the example consumer). At the same time, there is a
web page on the client machine which needs to communicate with the java
application by sending a message to the queue using java script. All these
actions happen on a same local machine without a web server involved due to
firewall restrictions.


I have browsed throught the website and set up the example embedded broker
and example consumer to work, however, the example web demo is utilizing a
web server(client web page post back to the server and then the server talks
to the queue), while what I need is the client web page post directly to the
queue.


Here is my java script code which does not work

var oXMLHTTP = new ActiveXObject( "Microsoft.XMLHTTP" );

var sURL = "http://localhost:61616/queue/TEST/FOO"

oXMLHTTP.open( "POST", sURL, true );

oXMLHTTP.setRequestHeader("Content-type","application/x-www-form-urlencoded");

oXMLHTTP.send("This is the JMS message");



Thank you !!

Jun
-- 
View this message in context: http://www.nabble.com/client-side-http-post-without-a-web-server-tf2106129.html#a5805360
Sent from the ActiveMQ - User forum at Nabble.com.

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