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

Re: HTTPS XML - Help Needed on New App



Hi Don,

> 3.	XML parse presumably failed due to upper case issue (see below)

Impossible.  HTTPAPI doesn't even know that the postdata is XML, and 
therefore isn't trying to parse it!   Instead, it tries to parse the 
RESPONSE you get from the HTTP server that you connect to.

The problem was, you were getting a zero length response because the SSL 
connection wasn't working.  So it tried to parse a 0-length XML document 
-- which of course was an error.


> 4.	How did the HTTPAPIR4 get bound to the UPSTRACK?  I used
> crtbndrpg cmd, but noticed following lines of code in pgm, so wasn't
> sure if bind was to "R4" or a prior version or if it made a difference
>
> 	a.	H DFTACTGRP(*NO) BNDDIR('LIBHTTP/HTTPAPI')
> 	b.	/COPY LIBHTTP/QRPGLESRC,HTTPAPI_H


I'll give you a short answer:   When a program is created, the system 
tries to find a service program or module containing the subprocedures 
that your program tried to call.

It searches all of the modules listed directly on the compile command 
(there weren't any in this case) and then it searches all objects listed 
on all binding directories that were included.

In this case, you referenced a binding directory called 'HTTPAPI' in the 
'LIBHTTP' library.  You can think of a binding directory as a list of lots 
of shared objects (service programs or modules) that the system searches 
to resolve a subprocedure.

If you type the following command:

      WRKBNDDIRE LIBHTTP/HTTPAPI

It'll list all of the service programs and/or modules that the system will 
look through for that particular binding directory.  In this case, it 
should be only 3 service programs:  HTTPAPIR4, SOCKUTILR4 and EXPAT.

And that's how it finds the R4 object.


> 5.	Should the following be inserted before POSTDATA in UPSTRACK to
> get the UTF-8:  http_setCCSIDs(1208: 0);

It can be anywhere before the call to http_url_post() or 
http_url_post_xml() or whichever API you're using to post the data.


> 6.	Upper case caused by copy/paste into RPGLE source member with
> the default session parm set at Upper Case only.  Will fix this to mixed
> case.

You might want to simply use EXAMPLE16 from the HTTPAPI distribution.  It 
should be in the member named EXAMPLE16 of the QRPGLESRC file in LIBHTTP. 
IIRC, the same UPSTRACK program, except that you already have it on your 
system :)
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------