Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Highlighted
dalekreitzer
Visitor.
75 views

Using RMNet to consume a JSON RESTFUL web API

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!

Dale

0 Likes
3 Replies
Micro Focus Expert
Micro Focus Expert

Re: Using RMNet to consume a JSON RESTFUL web API

0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Using RMNet to consume a JSON RESTFUL web API

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

0 Likes
dalekreitzer
Visitor.

Re: Using RMNet to consume a JSON RESTFUL web API

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.

 

 

 

Dale

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.