× 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.



Hi,

Just to clarify. The IWS server piece allows the automatic mapping of
JSON/XML to program parameters. The ILE program does not need to know
anything about XML or JSON.

The IWS client piece, as it relates to REST, allows you to send
user-defined payloads such as XML or JSON, but the burden of generating
and parsing the payloads is up to the client application.

So yes, you can use the IWS client to consume services, and it is as easy
as any other mechanism as far as the sending and receiving payloads.


"WEB400" <web400-bounces@xxxxxxxxxxxxxxxxxx> wrote on 11/04/2019 01:12:35
PM:

From: Peter Dow <petercdow@xxxxxxxxx>
To: web400@xxxxxxxxxxxxxxxxxx
Date: 11/04/2019 01:12 PM
Subject: [EXTERNAL] Re: [WEB400] Is IWS useful for consuming json
data with RPG?
Sent by: "WEB400" <web400-bounces@xxxxxxxxxxxxxxxxxx>

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://urldefense.proofpoint.com/v2/url?

u=https-3A__lists.midrange.com_mailman_listinfo_web400&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-

ew&m=Nmaz1Ou_08goJ5BeNgKzQqQEt4JeyeNKPy3ZS76naB0&s=WDmU2FVitqVTL6aLe78MkE3lYtbEqj6GnKVOWGdomqc&e=
or email: WEB400-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://urldefense.proofpoint.com/v2/url?
u=https-3A__archive.midrange.com_web400&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-

ew&m=Nmaz1Ou_08goJ5BeNgKzQqQEt4JeyeNKPy3ZS76naB0&s=lbI8Hh3uhUMmLkJW8pUoe-
Hm9G3Ntq2lRsVIQpM9kvk&e= .




--
This email has been checked for viruses by Avast antivirus software.
https://urldefense.proofpoint.com/v2/url?
u=https-3A__www.avast.com_antivirus&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-

ew&m=Nmaz1Ou_08goJ5BeNgKzQqQEt4JeyeNKPy3ZS76naB0&s=MylIMx6ctISSRwhaRrZk8AxcCfYtgF_4TceqfH8b9Qc&e=
--
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://urldefense.proofpoint.com/v2/url?

u=https-3A__lists.midrange.com_mailman_listinfo_web400&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-

ew&m=Nmaz1Ou_08goJ5BeNgKzQqQEt4JeyeNKPy3ZS76naB0&s=WDmU2FVitqVTL6aLe78MkE3lYtbEqj6GnKVOWGdomqc&e=
or email: WEB400-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://urldefense.proofpoint.com/v2/url?
u=https-3A__archive.midrange.com_web400&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-

ew&m=Nmaz1Ou_08goJ5BeNgKzQqQEt4JeyeNKPy3ZS76naB0&s=lbI8Hh3uhUMmLkJW8pUoe-
Hm9G3Ntq2lRsVIQpM9kvk&e= .





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.