How to get XML as an output to a REST Open Edge Project ?

Posted by anzeljamal on 03-Feb-2015 08:08

I have tried creating REST project and by default the output comes out as JSON. Can any one please suggest how can we get XML as a response to a REST Service ?

All Replies

Posted by Mike Fechner on 03-Feb-2015 08:11

WebSpeed?

Von meinem Windows Phone gesendet

Von: anzeljamal
Gesendet: ‎03.‎02.‎2015 14:09
An: TU.OE.Tech.Partner@community.progress.com
Betreff: [Technical Users - OE Tech Partner] How to get XML as an output to a REST Open Edge Project  ?

Thread created by anzeljamal

I have tried creating REST project and by default the output comes out as JSON. Can any one please suggest how can we get XML as a response to a REST Service ?

Stop receiving emails on this subject.

Flag this post as spam/abuse.

Posted by anzeljamal on 03-Feb-2015 08:19

No i didn't mean Webspeed.  i mean the REST service which we can create using the latest OpenEdge release. By default it gives the response in JSON format, but i need to get the response as XML.

Posted by Srinivas Munigala on 03-Feb-2015 08:29

As of now, Progress REST service supports only JSON format.

Posted by Mike Fechner on 03-Feb-2015 08:29

I understood …
 
The REST Adapter does not support that.
 
You can implement GET and POST Rest calls with WebSpeed.

Posted by Peter Judge on 03-Feb-2015 08:29

I believe that only JSON is currently supported as a media type. The closest doc I can find to support that is http://documentation.progress.com/output/OpenEdge115/openedge115/#page/dvwsv/output-parameter-mapping.html# .
 
-- peter
 
[collapse]
From: anzeljamal [mailto:bounce-anzeljamal@community.progress.com]
Sent: Tuesday, 03 February, 2015 09:20
To: TU.OE.Tech.Partner@community.progress.com
Subject: RE: [Technical Users - OE Tech Partner] How to get XML as an output to a REST Open Edge Project ?
 
Reply by anzeljamal

No i didn't mean Webspeed.  i mean the REST service which we can create using the latest OpenEdge release. By default it gives the response in JSON format, but i need to get the response as XML.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by pedromarcerodriguez on 03-Feb-2015 09:10

One solution (if applicable in your case) it would be to proxy the REST calls through a server that makes the translation between xml -> json.

Using nodejs with xml2js plus restify, for instance, you could have a quick solution to get xml in restify, parse it to json and send it to tomcat and retrieve the reply same way.

It is definetely not a nice solution but if you have to support XML can be used as a workaround (even that JSON is the way to go and you should migrate to that).

Regards,

Posted by anzeljamal on 05-Feb-2015 03:38

Thanks for your valuable input. I have created rest service with json as output. But i have an understanding that rest supports xml as output. but i couldn't find a way in which we are do it in openedge.

Posted by Mike Fechner on 05-Feb-2015 03:42

I believe you should be posting that as an enhancement request on the ideas section here on communities

This thread is closed