[Info-vax] Restful API w/JSON client package or library on OpenVMS
Arne Vajhøj
arne at vajhoej.dk
Wed Mar 13 20:39:42 EDT 2024
On 3/13/2024 6:34 PM, Richard Jordan wrote:
> One of our customers currently on VSI VMS on Integrity has been using
> the GSOAP kit from HP as a client to communicate with a third party app
> on windows server. The company making that product is dropping
> SOAP/GSOAP and moving to only support JSON-based Restful API.
>
> I see several items that purport to provide a Restful API for 'server'
> side use on VMS, like WSIT from VSI. Client mentions seem to be
> relegated to other platforms. Other options seem to be the same; server
> only.
>
> Are there any packages, callable libraries, "Netlib" like options, etc
> that would allow VMS programs to access restful API servers? Whether
> its encapsulation like the GSOAP kits, or just linking in a callable
> library of routines?
>
> Major props if it can be called from BASIC without intervening C or
> other language.
>
> Is VMS Python an option since it looks like Restful API is supported by
> recent versions of that language on VMS? I assume we'd have to get
> BASIC to talk to Python to do the communications in that case...
I know of some options for client for RESTful web services:
* Java with any HTTP client including builtin HttpURLConnection
and any JSON library including GSon
* Python with request and json modules
* PHP with curl extension and json_encode/json_decode
* native code with plain sockets and some JSON library
like cJSON
There are code examples for client in Java, Groovy, Python,
PHP, C and Pascal here:
https://www.vajhoej.dk/arne/articles/vmsipc.html#rest
I guess I could come up with a Basic example similar to
the Pascal example.
But else:
Basic program--(binary/socket)--Java/Groovy/Python gateway
program--(JSON/HTTP)-->web service
should not be that bad.
Arne
More information about the Info-vax
mailing list