2 Replies Latest reply on Aug 30, 2010 1:30 AM by jandouwevonk

    Sending a JMS Message via Stomp to JSON client

    jandouwevonk

      Hi,

       

      From Openedge I am posting a JMS Message to a queue called "sampleQ1". I am using the Stomp protocol. The body of the JMS message contains a JSON formatted dataset. From within Openedge I use the WRITE-JSON() method to create a JSON string from a dataset.

       

      I use FUSE Message broker 5.4.0 out of the box with only the Stomp connector enabled on port 61613

       

      With my RESTful JSON clients I want to pick up the message. But the message does not arrive in my webbrowser the right way (at least the way I expect it).

      If I use http://localhost:8161/demo/message/sampleQ1?readTimeout=10000&type=queue to retreive the message it is not shown the proper way.

       

      I compare it to the Twitter JSON Api output at http://api.twitter.com/1/statuses/public_timeline.json

      That call to Twitter shows the output in a webbrowser (Safari) or downloads the .json file (Firefox)

       

      I want the same result from ActiveMQ ... and I pressume that the 'Content-Type' is not set correct. On Twitter the Content-Type = 'application/json'.

       

      Adding a header 'Content-Type' from Openedge or via a Camel route, doesn't work.

       

      Any ideas?

       

      Jan Douwe Vonk