[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ftpapi] Inquiry on HTTPAPI Error


I am creating a web service for the first time in our IBM i machine. Currently, I have an RPG program that accepts as input JSON data from HTTP server, using HTTP POST method.

I keep getting the following error message:

java.lang.RuntimeException: Invocation of program failed.
AS400Message (ID: CEE9901 text: Application error.  MCH3601 unmonitored by YAJL at statement 0000000001, instruction X'0000'.):com.ibm.as400.access.AS400Message@c93517ec

Please help me resolve this error. Can't seem to determine if this is a setup error when I deployed the service, or a problem with user access, or a problem with the program itself.

I used the following code to accept the JSON data from HTTP input, following the standard declaration from the sample RESP API program codes.

    docNode = yajl_stdin_load_tree( *ON: errMsg );   
    if errMsg <> '';                                 
       cusord.errMsg = 'json parse: ' + errMsg;      
       cusord.success = *off;                        
       yajl_writeStdout(500: errMsg);                

Can't seem to get past the first line of code. But if I use the yajl_stmf_load_tree function, there's no error. So I figure the problem is with the yajl_stdin_load_tree function.

I really need some help here.

Thanks in advance.

Jose Tumbaga

On Friday, April 6, 2018, 9:09:26 AM GMT+8, Jose Tumbaga <diamond_jose@xxxxxxxxx> wrote:

Hi Mike,

Thanks for the response. I believe the URL is a parameter for the http_url_post function. Or do I have to set it up somewhere else?

Attaching the code again.



On Friday, April 6, 2018, 1:52:13 AM GMT+8, Mike Corbo <Mike.Corbo@xxxxxxxxxxxxx> wrote:

In your code I do not see where you set the url.URL should be set to the site you are trying to get to, this would cause the host name  lookup failure in the log


Mike Corbo
Programmer Analyst
National Retail Systems, Inc.
611 Rte 46W
Hasbrouck Heights, NJ 07604
T.201.330.1900 x2713

From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Jose Tumbaga
Sent: Thursday, April 5, 2018 3:27 AM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: [Ftpapi] Inquiry on HTTPAPI Error




This is my first time to use HTTPAPI in RPG to post a JSON API to a web service. I've been successful in generating the jsonData, but I got stopped at the sending part. I keep getting the error message below. Do you have any idea what's causing the error and how I can correct it?




Jose Tumbaga Jr.




Ftpapi mailing list
Ftpapi mailing list