Page 1 of 1

Problem compiling code

Posted: Fri May 17, 2024 11:38 am
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

Re: Problem compiling code

Posted: Fri May 17, 2024 9:53 pm
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.

Re: Problem compiling code

Posted: Tue May 21, 2024 7:46 am
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