You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by gng <ga...@hp.com> on 2010/03/30 14:23:37 UTC

Newbie Question: using REST to post a message

Hi,

I'm new to ActiveMQ and am trying to POST a message to a queue. I'm using
Poster (the Firefox add-on) and notice that although the message makes it to
the queue it has no body. Attempts to retrieve the message using HTTP GET
results in a HTTP 500 internal error message. Using the admin interface to
compose and send a message to the queue works fine and my HTTP GET also then
works in those cases.

I get the same result using curl (example below) :-

curl -d "hello word"
<http://myserver.com:8161/demo/message/myqueue?timeout=10000&type=queue"

Can anyone give any ideas what could be wrong ? Any ideas much appreciated.
-- 
View this message in context: http://old.nabble.com/Newbie-Question%3A-using-REST-to-post-a-message-tp28081728p28081728.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Newbie Question: using REST to post a message

Posted by Dejan Bosanac <de...@nighttale.net>.
Hi,

this should work

curl -d "body=message" http://localhost:8161/demo/message/myqueue

Cheers
--
Dejan Bosanac - http://twitter.com/dejanb

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Tue, Mar 30, 2010 at 2:23 PM, gng <ga...@hp.com> wrote:

>
> Hi,
>
> I'm new to ActiveMQ and am trying to POST a message to a queue. I'm using
> Poster (the Firefox add-on) and notice that although the message makes it
> to
> the queue it has no body. Attempts to retrieve the message using HTTP GET
> results in a HTTP 500 internal error message. Using the admin interface to
> compose and send a message to the queue works fine and my HTTP GET also
> then
> works in those cases.
>
> I get the same result using curl (example below) :-
>
> curl -d "hello word"
> <http://myserver.com:8161/demo/message/myqueue?timeout=10000&type=queue"
>
> Can anyone give any ideas what could be wrong ? Any ideas much appreciated.
> --
> View this message in context:
> http://old.nabble.com/Newbie-Question%3A-using-REST-to-post-a-message-tp28081728p28081728.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>