Skip to Content.
Sympa Menu

grouper-users - [grouper-users] Grouper ESB patch for ActiveMQ<5.10

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] Grouper ESB patch for ActiveMQ<5.10

Chronological Thread 
  • From: "Bryan E. Wooten" <>
  • To: "" <>
  • Subject: [grouper-users] Grouper ESB patch for ActiveMQ<5.10
  • Date: Mon, 10 Feb 2014 21:19:22 +0000
  • Accept-language: en-US

Problem description: Grouper correctly submits POSTs with raw JSON-data using Content-Type of “application/json”.  However, ActiveMQ (unexpectedly) only accepts POSTs where the JSON is preceded by  “body=”; additionally, I can only get this to work when setting Content-Type to "application/x-www-form-urlencoded” using a key of “body” and placing the data as the value (contrary to what a related AMQ bug-ticket seems to claim can be done by setting Content-Type to “text/xml”).



POST /api/message/MyQueue?type=someType HTTP/1.1
Host: localhost:8161
Cache-Control: no-cache
Content-Type: application/x-www-form-urlencoded



Workaround-patch: in file edu.internet2.middleware.grouper.changeLog.esb.consumer.EsbHttpPublisher


At around line 72 we find this line:

post.setRequestHeader("Content-Type", "application/json; charset=utf-8”);

Based on some configuration, this needs to be optionally:

post.setRequestHeader("Content-Type", "application/x-www-form-urlencoded”);


At around line 75 we find this line:

requestEntity = new StringRequestEntity(eventJsonString, "application/json", "utf-8”);

Based on the same configuration, this needs to be optionally:

requestEntity = new StringRequestEntity( "data=""" + eventJsonString, "application/x-www-form-urlencoded”, "utf-8"); 


Note: this problem only appears to apply to AMQ 5.8 and 5.9 — it is scheduled to be fixed in 5.10



  • [grouper-users] Grouper ESB patch for ActiveMQ<5.10, Bryan E. Wooten, 02/10/2014

Archive powered by MHonArc 2.6.16.

Top of Page