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

RE: AW: question about example 2



Looks okay to me...next we need some debug information.

Add this to the top of the RPGLE
c                   callp     http_debug(*ON)

Create a PDM option:
Option  Command                         
  VD    dspf '/tmp/httpapi_debug.txt'   

Now run your program and take a look in the debug file by using option VD.

See anything strange? It probably all looks a little foreign if you haven't seen it yet. Download the file and attach to your message and we can point you to what comes next.



-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Larry Kleinman
Sent: Tuesday, March 24, 2015 1:34 PM
To: HTTPAPI and FTPAPI Projects
Subject: RE: AW: question about example 2

Mike - I'm getting lost.  I think I did what you suggested, but no data is 
POSTing to the PHP script.   I've acttached the code that I'm using.   Do 
you see what I'm doing wrong?




Larry Kleinman
Kleinman Associates, Inc.
212-949-6469




From:   Mike Krebs <mkrebs@xxxxxxxxxxxxxxxxxx>
To:     HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>, 
Date:   03/24/2015 12:22 PM
Subject:        RE: AW: question about example 2
Sent by:        ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx



So, that is pretty straight forward. Just substitute your variables (RequestID, Reference, etc) for the from, subject and Comment in EXAMPLE2.

You will have myPointer to the webform data when you are finished. Send that to http_url_post_raw in place of %addr(data). Send dataSize in place of %len(%trimr(data)). The rest you can use EXAMPLE5 for.

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [ mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Larry Kleinman
Sent: Tuesday, March 24, 2015 10:57 AM
To: HTTPAPI and FTPAPI Projects
Subject: RE: AW: question about example 2

The URL is a private one, which you will not be able to access.   It is 
only a PHP script with lines like

$RequestID = $_POST["RequestID"]
$Reference = $_POST["Reference"]

so I want the RPG program to POST a value for RequestD and for Reference

The script also does some simple ECHOs, and I want to get that back in retdata



Larry Kleinman
Kleinman Associates, Inc.
212-949-6469




From:   Mike Krebs <mkrebs@xxxxxxxxxxxxxxxxxx>
To:     HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>, 
Date:   03/24/2015 11:42 AM
Subject:        RE: AW: question about example 2
Sent by:        ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx



Did you send us the url you are trying to post to? Using the webForm stuff 

it is pretty easy to create the right variable but reading the html and 
getting them right is not always easy. A URL would make it easier to help 
you.


-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [
mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Larry Kleinman
Sent: Tuesday, March 24, 2015 9:58 AM
To: HTTPAPI and FTPAPI Projects
Subject: Re: AW: question about example 2

Hi Thomas - I've attached the source for EXAMPLE5. 

I can't figure out how to use it to POST data to the web form, and I 
suspect that it involves using some of the code in EXAMPLE2, which I've 
also attached.   I guess I am trying to combine the two of them into 
something which will POST several fields to a web form (like EXAMPLE 2 
does with fromAddr, subject, and message) , and put what was returned by 
the web site into data that I can manipulate (like EXAMPLE 5 foes with
retdata)



Larry Kleinman
Kleinman Associates, Inc.
212-949-6469




From:   Thomas Raddatz <thomas.raddatz@xxxxxx>
To:     "'HTTPAPI and FTPAPI Projects'" <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>, 
Date:   03/24/2015 08:46 AM
Subject:        AW: question about example 2
Sent by:        ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx



Larry,

It was great if you could send the source to me, since I do not have an 
archive of 1.23. The oldest archive I have is 1.25.

Thomas.

-----Ursprüngliche Nachricht-----
Von: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [ 
mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] Im Auftrag von Larry 
Kleinman
Gesendet: Dienstag, 24. März 2015 13:28
An: HTTPAPI and FTPAPI Projects
Cc: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
Betreff: Re: question about example 2

Yep, I am using the same version.   Thomas, do you need me to send you the 



source, or can you find it in an archive of version 1.23

Larry Kleinman
Kleinman Associates, Inc.
212-949-6469




From:   Thomas Bishop <tbishop2@xxxxxxxxxx>
To:     "ftpapi@xxxxxxxxxxxxxxxxxxxxxx" <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>, 
Date:   03/24/2015 08:08 AM
Subject:        Re: question about example 2
Sent by:        ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx




My copy of EXAMPLE5 also uses "raw".  Version 1.23

Comment at top of EXAMPLE5 source code states:
* This performs the same example as EXAMPLE4, except that it
* uses the "raw" versio of http_url_post(). The advantage is
* that data is received directly into a variable in the program
* instead of writing it to the IFS. 

Source code contains the following:
c                   eval      rc=http_url_post_raw( 
c                             'https://wwwcie.ups.com/ups.app' + 
c                             '/xml/Track': 
c                              %addr(data): %len(%trimr(data)): 
c                              1: %paddr('INCOMING')) 
c                   if        rc <> 1 
c                   eval      msg = http_error 
c                   dsply                   msg 
c                   return 
c                   endif 

The information transmitted is intended only for the person or entity to 
which it is addressed and may contain CONFIDENTIAL material.  If you 
receive this material/information in error, please contact the sender and 
delete or destroy the material/information.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------

--
IMPORTANT NOTICE:
This email is confidential, may be legally privileged, and is for the 
intended recipient only. Access, disclosure, copying, distribution, or 
reliance on any of it by anyone else is prohibited and may be a criminal 
offence. Please delete if obtained in error and email confirmation to the 
sender.

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------