activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblwizard <>
Subject PHP, REST and ActiveMQ
Date Mon, 17 May 2010 22:26:24 GMT


I am just getting started with ActiveMQ and trying to do a simple test of
adding a message to a queue and getting a message from a queue.  Can
somebody give a couple of pointers.  Currently I am simply trying to do a
POST to add a message to an existing queue.

should the the uri be something like:


Where TEST4 is a queue name on my server.  Here is the PHP code that I am
trying to use:

	$url = 'http://localhost:8161/queue/TEST4/';
	$body = 'dbltest message to test activemq';
	$session = curl_init($url);
	curl_setopt ($session, CURLOPT_POST, true);
	curl_setopt ($session, CURLOPT_POSTFIELDS, $body);
	curl_setopt($session, CURLOPT_HEADER, false);
	curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
	$response = curl_exec($session);
	echo 'my response was:<br>';	
	echo $response;	
	echo 'end of response.<br>';	

This doesn't work ... I get a 404 error.  Can somebody help me figure out
what I'm missing?


View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message