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

RE: Which procedure for non-XML document



Example5 and example9 will show how you can do this.

Example5 is using post and is pretty close to what you want to do. You would
need to add your parse logic at some point.

Example9 shows a get version. In example9, you find the Save_To_Disk
procedure that takes the incoming bytes and writes them to disk. You would
create a routine "Save_To_Variable" and concatenate the incoming bytes
together (like example5 does). Then run your parse logic across that.

Good luck.

Mike Krebs

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Sturgeoff, Lorne
Sent: Thursday, October 30, 2008 11:17 AM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: Which procedure for non-XML document

We have a requirement to communicate in real time with a web service
from an interactive RPG green-screen application. The web service states
that requests can be sent via HTTPS GET or POST of name/value data in a
way similar to an HTML FORM. Data is returned in the body of the HTTPS
reply as name/value pairs. 

 

Note that this is not XML.

 

For example: 

Send:
https://www.blahblah.com/something.cfm?Method=Check&Username=username&Pa
ssword=password&, and so on.

 

Receive: TransactionId=XYZ1234567890& TransactionResultCode=7100&
TransactionMessage=Approved, and so on.

 

My question for the list is, what would be the appropriate HTMLAPI
procedure to call for this application? I was considering http_get() but
am reluctant to use it because I think it requires a stream file in the
IFS to hold the results. Since this application can be called by several
simultaneous interactive green-screen users, I want to avoid using work
files in the IFS. I would rather parse the name/value pairs in an RPG
variable. Is there a way to do this in HTTPAPI?

 

Lorne Sturgeoff

Allied Global Holdings Inc.

(905) 513-3517

lorne.sturgeoff@xxxxxxxxxxxxx

 


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