Web Integration Service

2 posts / 0 new
Last post
Last seen: 2 years 11 months ago
Joined: 06/10/2014
Posts: 49
Web Integration Service


I've been using an early release version of the RTI Web Integration Service with 5.2.3 and it is working very well. The documentation says that the service can produce xml or json. So far I can only get xml output. Does anyone know how to get json formatted data?


Anne Fiore

Fernando Garcia's picture
Last seen: 3 months 2 weeks ago
Joined: 05/18/2011
Posts: 198

Hi Anne,

The Web integration Service API offers different query parameters can that help you tune the read/take operation (i.e., an HTTP GET request on a specific DataReaders). To read samples in JSON format, you can add the sampleFormat query parameter to the URL and set it to json. For example, the read operation on MySquareRdr that the Shapes Demo tutorial illustrates can be translated into JSON using the following HTTP request:

GET /dds/rest1/applications/ShapesDemoApp/domain_participants/ShapesDemoParticipant/subscribers/MySubscriber/data_readers/MySquareRdr?sampleFormat=json HTTP/1.1
Host: localhost:8080
Cache-Control: no-cache

Or the equivalent curlcommand:

curl -X GET -H "Cache-Control:no-cache" http://localhost:8080/dds/rest1/applications/ShapesDemoApp/domain_participants/ShapesDemoParticipant/subscribers/MySubscriber/data_readers/MySquareRdr?sampleFormat=json

For a simple example on how to read in JSON format using JavaScript, please take a look at this simple Shapes Demo application on Github. For more information on the query parameters that you can use in the read operation, please take a look at the API Reference (click on the GET operation on a specific DataReader, i.e., in the last row in the /applications table).

Please, let me know if you have more questions regarding Web Integration Service. We are also interested in your feedback, if you think that there are things that are not clear or there is any important feature that we may have  left out, please let us know.