Problem compiling code

Discussions related to HTTPAPI (An HTTP Client Package for RPG programming.) http://www.scottklement.com/httpapi/
Post Reply
kjarrig
Posts: 6
Joined: Tue Apr 18, 2023 8:31 am

Problem compiling code

Post by kjarrig »

Hi,
I've been using WSDL2RPG to send data to webservices, but not it's now maintained any more, so I'm switching to HTTPAPI from Scott. The problem I'm having is compiling my code, compiles fine when I use CRTRPGMOD, but when I use CRTRPG I get an error.
The errors is:
Unresolved references . . . . . . . . . . . . : 1
Symbol Type Library Object Bound Identifier
*MODULE ALVISPGM RSK002 *YES BASE64_ENCODE

Code: Select all

 ctl-opt OPTION(*NODEBUGIO:*NOEXPDDS:*SRCSTMT);
   ctl-opt BNDDIR('XMLILIB/XMLI1': 'LIBHTTP/HTTPAPI');

   //  Program variables...
   Dcl-s xmlPointer pointer;
   Dcl-s xmlLength int(10:0);
   dcl-s xmlOutput pointer;
   dcl-s xmlOutputlen int(10:0);
   dcl-s rc int(10:0);
   dcl-s xmldata varchar(1500000);
   dcl-s Xmlencode64 like(xmlData);
   dcl-s wwEnclen like(rc);

   /include xmlilib/qrpglesrc,xmli1_h
   /include libhttp/qrpglesrc,httpapi_h
   /include libhttp/qrpglesrc,private_h           

    wwEnclen = base64_encode(xmlPointer:xmlLength:xmlOutput:xmlOutputlen);

I'm using RDI and can see the base64_encode in the outline view under Prototypes.
This is the compile command CRTPGM PGM(ALVISPGM/RSK002) MODULE(ALVISPGM/RSK002) ) ACTGRP(*ENTMOD) DETAIL(*BASIC) TGTRLS(*CURRENT)
Your help is greatly appriciated.

Kindest regards,

Kjartan
Scott Klement
Site Admin
Posts: 799
Joined: Sun Jul 04, 2021 5:12 am

Re: Problem compiling code

Post by Scott Klement »

You appear to be trying to call the BASE64 utility. This is not part of HTTPAPI, it is a separate download and a separate binding directory that you'll need to bind to.

If you're still having problems after resolving the above error, please provide the error messages. I have no idea what your post means.
kjarrig
Posts: 6
Joined: Tue Apr 18, 2023 8:31 am

Re: Problem compiling code

Post by kjarrig »

Hi Scott,
Not the first time that I have problems explaining my problems, but you gave me answer, so now the code compiles. Thank you very much
Post Reply