Skip to main content

I have used RMNet to consume SOAP services using XML.  I now need to consume a RESTFUL service using JSON.  Are there any example programs that show how this is done?  I need a solution that will work on both Windows and Linux platforms.  Calling Curl would not be an ideal solution; I will be making many calls to the service, and need it to be VERY responsive.   Thanks!

I have used RMNet to consume SOAP services using XML.  I now need to consume a RESTFUL service using JSON.  Are there any example programs that show how this is done?  I need a solution that will work on both Windows and Linux platforms.  Calling Curl would not be an ideal solution; I will be making many calls to the service, and need it to be VERY responsive.   Thanks!

Here's a link to a Forum link to a discussion on this ubject:

https://community.microfocus.com/t5/Extend-and-AcuCOBOL-Forum/RMNet-HttpPost-RESTful-JSON/m-p/1730896#M11170


I have used RMNet to consume SOAP services using XML.  I now need to consume a RESTFUL service using JSON.  Are there any example programs that show how this is done?  I need a solution that will work on both Windows and Linux platforms.  Calling Curl would not be an ideal solution; I will be making many calls to the service, and need it to be VERY responsive.   Thanks!

Also, if you have access to Version 9.2.5, installing BIS, tutorial3 is an example leveraging JSON


Here's a link to a Forum link to a discussion on this ubject:

https://community.microfocus.com/t5/Extend-and-AcuCOBOL-Forum/RMNet-HttpPost-RESTful-JSON/m-p/1730896#M11170

It's not so much the JSON part that I'm having trouble with (or maybe it is, and is why I'm struggling).  I'm trying to figure out what the actual calling structure looks like.  I understand the SOAP calls in RMNet (NetInit/http settings, authentication, etc) and finally the HttpPost, passing in the destination URL, content type, XML request: 

           CALL "HttpPost"
             USING
               W-DESTINATION-URL,  W-CONTENT-TYPE
               W-REQUEST-POINTER,  W-REQUEST-LENGTH
               W-RESPONSE-POINTER, W-RESPONSE-LENGTH
               W-EXTRA-HEADERS
             GIVING W-RESPONSE-STATUS

 

How does that translate to REST service?  Does RMNet support restful services?  Is the only difference the request payload?  An actual example calling a sample service would be helpful.