HornetQ-REST HTTP-405 (Method Not Allowed) for GET, HEAD on queues
sumitsu Sep 10, 2013 6:16 PMI am unable to query the queue/topic resources via the HornetQ REST API using either the Wildfly AS 8.0.0-alpha4 release or the Wildfly master/head revision (downloaded and built as of yesterday).
Per the setup instructions, I've deployed a WAR (in exploded state) with the following contents:
HornetQ-REST.war HornetQ-REST.war/WEB-INF HornetQ-REST.war/WEB-INF/lib HornetQ-REST.war/WEB-INF/lib/hornetq-rest-2.4.0.Beta1.jar HornetQ-REST.war/WEB-INF/web.xml HornetQ-REST.war/WEB-INF/classes HornetQ-REST.war/WEB-INF/classes/hornetq-rest.conf.xml HornetQ-REST.war/META-INF HornetQ-REST.war/META-INF/MANIFEST.MF
I've attached a non-exploded version of the WAR to this post. (hornetq-rest-2.4.0.Beta1.jar is just the hornetq-rest.jar file included with the 2.4.0.Beta1 distribution, renamed for my clarity / tracking purposes.)
According to the HornetQ documentation, performing an HTTP GET or HEAD on the URL queues/{queue-name} (relative to the context path) should provide a response with headers like the following:
Server: Apache-Coyote/1.1 msg-pull-consumers: http://127.0.0.1:13510/HornetQ-REST/queues/jms.queue.sumitsu/pull-consumers msg-create-with-id: http://127.0.0.1:13510/HornetQ-REST/queues/jms.queue.sumitsu/create/{id} msg-create: http://127.0.0.1:13510/HornetQ-REST/queues/jms.queue.sumitsu/create msg-push-consumers: http://127.0.0.1:13510/HornetQ-REST/queues/jms.queue.sumitsu/push-consumers Content-Length: 0 Date: Tue, 10 Sep 2013 21:43:04 GMT
Instead, I'm getting an HTTP-405 "Method Not Allowed" response for both GET and HEAD, and indeed if I perform an OPTIONS request, GET and HEAD are not listed:
Allow: DELETE, OPTIONS Connection: keep-alive Content-Type: text/plain Content-Length: 15
By contrast, when I deploy the same HornetQ-REST WAR to JBossAS 7.2.0.Final, then perform the same OPTIONS request, I get this:
Server: Apache-Coyote/1.1 Allow: GET, OPTIONS, HEAD Content-Length: 0 Date: Tue, 10 Sep 2013 21:46:43 GMT
Other REST API calls appear to be working. For example, I can create and destroy destinations, and I appear to be able to publish messages. (I have not yet tried adding consumers.)
Am I doing something wrong in my Wildfly test, or is there a bug? If the latter, I'd assume that it would be a bug in Wildfly rather than HornetQ (since the JAX-RS-annotated REST endpoints are included in the WAR in hornetq-rest-2.4.0.Beta1.jar, and thus should be the same in both my Wildfly 8.0.0 and my JBossAS 7.2.0 test cases), but I could be wrong.
-
HornetQ-REST.war 114.7 KB