× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



IWS accepts JSON or XML and parses it into the parameters you specified when creating the web service client. When configuring IWS, you can tell it to accept only one or the other (JSON or XML) or both. It's transparent to the procedure that's processing the request -- either one ends up in the parms you specified.

And when sending a response, IWS takes the parms from your service program and formats them in either JSON or XML and sends it to the requester.

But it does not provide any procedures for you to use in your program to parse JSON or XML.

On 11/3/2019 12:31 AM, Jon Paris wrote:
To add to Vern's comment. The role IWS plays is in this area is acting as a web service client. It has no inherent JSON consumption capability (unless they've snuck that in and I didn't notice). What it provides is the equivalent to Scott's HTTPAPI and personally I think it is fair more complicated and less flexible than Scott's ap[proach. I'm using IWS more as a provider of web services, but still don't use it for consuming.

As Vern notes, YAJLINTO with DATA-INTO is a great tool. Or for situations where that doesn't fit then just the "raw" YAJL APIs.



On Nov 2, 2019, at 11:19 PM, Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx> wrote:

Booth - it might depend on how you will use IWS - do you mean to consume a web service in your RPG program?

Even if it can be used, it is probably like using a bulldozer or steam shovel to plant tulips.

I have 2 recommendations

- the DATA-INTO op code that is now available, combined with Scott Klement's YAJL service program
- embedded SQL using the JSON_TABLE function that is similar to what can be done with XMLTABLE.

I don't remember if JSON_TABLE has the underscore - it might be JSONTABLE

HTH
Vern

On 11/2/2019 3:31 PM, Booth Martin wrote:
Is IWS useful for consuming json data with RPG? What are solutions that you believe are useful?

--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.