On Thu, Aug 4, 2022 at 1:19 PM Jack Woehr <jwoehr@xxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
Newer Method:
SELECT cast(qsys2.http_get(
'http://www.google.com',
'') as varchar(2048))
FROM SYSIBM.SYSDUMMY1
This returns a 404 for http: and an error for https:
Both http: and https: work when I run the "java" version
The https: error for the "Newer Method" is the same in iACS Run SQL Scripts:
Cause . . . . . : An error occurred while invoking user-defined function
HTTP_GET in library QSYS2. The error occurred while invoking the associated
external program or service program QSQAXISC in library QSYS, program entry
point or external name axiscGetClob, specific name HTTP_GET. The error
occurred on member SYSDUMMY1 file SYSDUMMY1 in library SYSIBM. The error
code is 1. The error codes and their meanings follow:
1 -- The external program or service program returned SQLSTATE 38501.
The text message returned from the program is: AXISC ERROR :
HTTPTransportException: Cannot initialize a channel to the remote end.
GSKit Error is 6003 - Access to the key database is not allowed. .
2 -- The external program failed before it completed.
3 -- The database timed out waiting for the program to return. The
timeout value used by the database was 0 minutes and 30 seconds.
4 -- The external program no longer exists or is not found.
5 -- One of the input parameters of the function had a data mapping
error.
6 through 26 -- See the previous message in the joblog.
For an external program, the program entry point displayed will be *N.
Recovery . . . : For error codes 1 and 2, determine the cause of the
error from either the SQLSTATE or a previously listed message.
For error code 3, either increase the timeout limit using the QAQQINI
file setting or determine why the external program or service program did
not return in the time allotted.
For error code 4, ensure the program or service program exists for the
duration of the query.
For error code 5, determine the cause of the data mapping error.
For error codes 6 through 26, see the previous message in the joblog.
Refer to the DB2 for i SQL programming topic collection in the
Database category in the IBM i Information Center book,
http://www.ibm.com/systems/i/infocenter/ for more information on
user-defined functions.
Possible choices for replying to message . . . . . . . . . . . . . . . :
&B C -- The request is canceled. &B I -- The request is ignored.
As an Amazon Associate we earn from qualifying purchases.