I hope to get some help with sending and receiving JSON over HTTP.
I am again struggling with the examples and documentation, so I need help to understand how I am supposed to do this.
The task I have is to send some JSON to a RESTful webservice and in the process receive some JSON back.
I know I can use the JSMX commands to load an HTTPSERVICE and send a request with the appropriate headers to the right URL.
But how do I send some JSON with that request?
And how do I receive and parse the JSON that I will receive in the response?
Do I create an Integrator JSON Binding Wizard solution for each of these? And how do I bind them to the HTTP request?
Sending and receiving JSON over HTTP
Sending and receiving JSON over HTTP
I don't know what I am doing, nor how I did it. If it works, luck was involved 
Re: Sending and receiving JSON over HTTP
The examples for json show how the wams can respond with json. I too am looking for a way to receive a json response to populate a file.
Any help appreciated.
Mark
Any help appreciated.
Mark
Cheers,
Mark Mason
Mark Mason
Re: Sending and receiving JSON over HTTP
I was directed to the JSON samples in the Integrator documentation, as I was told I needed to use those. It means that I have to use Integrator to create an HTTP connection, setting custom headers, and Integrator to bind JSON out and in.
I can get my sample in a repostable format if you are interested. Most importantly, it works
I can get my sample in a repostable format if you are interested. Most importantly, it works
I don't know what I am doing, nor how I did it. If it works, luck was involved 
-
stevelee67
- Posts: 22
- Joined: Tue Mar 13, 2018 8:25 am
- Location: Madison WI
Re: Sending and receiving JSON over HTTP
i know this post is ancient but...
EPC 141070 should make this a whole heckuva lot easier. i've done some playing with it in a non-production VL instance (my "gee steve, what can i do with this? instance)
http://docs.lansa.com/14/en/lansa018/co ... _begin.htm can get you some basic info, and
http://docs.lansa.com/14/en/lansa018/co ... 1_0010.htm will get you more detailed information.
you'll want to get to know these classes:
EPC 141070 should make this a whole heckuva lot easier. i've done some playing with it in a non-production VL instance (my "gee steve, what can i do with this? instance)
http://docs.lansa.com/14/en/lansa018/co ... _begin.htm can get you some basic info, and
http://docs.lansa.com/14/en/lansa018/co ... 1_0010.htm will get you more detailed information.
you'll want to get to know these classes:
- XPRIM_HttpRequest
- XPRIM_JsonWriter
- XPRIM_RandomAccessJsonReader
- XPRIM_JsonObject
The path to wisdom does, in fact, begin with a single step. Where people go wrong is in ignoring all the thousands of other steps that come after it.
Hogfather (Terry Pratchett)
Hogfather (Terry Pratchett)