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



I do not know the problem but are you initializing the _LENGTH field in
your RPG code?




"WEB400" <web400-bounces@xxxxxxxxxxxxxxxxxx> wrote on 07/15/2019 07:48:35
PM:

From: Jon Paris <jon.paris@xxxxxxxxxxxxxx>
To: "Web Enabling the IBM i (AS/400 and iSeries)"
<web400@xxxxxxxxxxxxxxxxxx>
Date: 07/15/2019 07:48 PM
Subject: [EXTERNAL] [WEB400] Weird IWS Bug (?)
Sent by: "WEB400" <web400-bounces@xxxxxxxxxxxxxxxxxx>

Anyone seen this before?

I have a working REST/JSON Web Service generated by IWS (for the
curious Booth's challenge to me to find a better way to describe the
process than the current docs made me revisit it this weekend).

The service takes a URL of the form system stuff/sertvicename/cat/02
where cat is the parameter name and 02 is the value.

It works just fine but when there are less than the maximum number
of rows it outputs multiple empty elements.

To deal with this I added an extra parameter with array name_LENGTH
as the name and told the wizard to detect length.

Now here's the weirdness. When I invoke the service I get:

java.lang.RuntimeException: Invocation of program failed.
AS400Message (ID: CEE9901 text: Application error. MCH0603
unmonitored by RESTSRV4 at statement 0000000172, instruction
X'0000'.):com.ibm.as400.access.AS400Message@f9cb28fc
OK - let's debug that - I add a Service Entry Point and try again.
This time it doesn't "fail" it just produces rubbish output - like this:
{"RESULT":"","PRODUCTLIST_LENGTH":0,"PRODUCTLIST":
[{"PRODCD":"","PRODDS":"","CATCOD":"","STOH":0,"LNDCST":0.
00,"SELLPR":0.00,"DTLCHG":0,"DTLORD":0},
{"PRODCD":"","PRODDS":"","CATCOD":"","STOH":0,"LNDCST":0.
00,"SELLPR":0.00,"DTLCHG":0,"DTLORD":0},
{"PRODCD":"","PRODDS":"","CATCOD":"","STOH":0,"LNDCST":0.
00,"SELLPR":0.00,"DTLCHG":0,"DTLORD":0},
{"PRODCD":"","PRODDS":"","CATCOD":"","STOH":0,"LNDCST":0.
00,"SELLPR":0.00,"DTLCHG":0,"DTLORD":0},
...
{"PRODCD":"","PRODDS":"","CATCOD":"","STOH":0,"LNDCST":0.
00,"SELLPR":0.00,"DTLCHG":0,"DTLORD":0}]}
In other words the skeleton JSON but with no data!

How the hell can I debug something that "works" in debug and only
blows up when not?

Anyone seen this one before?


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.