How to get XML as an output to a REST Open Edge Project ? - Forum - Technology Partner - Progress Community

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

 Forum

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

This question is not answered

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
  • 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.

    Architect of the SmartComponent Library and WinKit

    Consultingwerk Ltd.

  • 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.

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

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

    Architect of the SmartComponent Library and WinKit

    Consultingwerk Ltd.

  • 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
     
    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.

  • 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,

  • 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.

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

    Architect of the SmartComponent Library and WinKit

    Consultingwerk Ltd.