Yes, the service does require a base64 encoded string.
And yes, our size concern was in trying to build the xml to send to the service, we were running up against the maximum size for an alpha-numeric field 16773104. We also figured that using some kind of stream would likely be the solution, but were unsure how.
Attached is our program. It attempts to read an existing pdf from IFS, base64 encode it, and send it to the service. How would you recommend adjusting this program to be able to handle larger documents like 150mb?
Hdatfmt(*usa) timfmt(*hms) BNDDIR('UTLIB/COMMON' : 'LIBHTTP/HTTPAPI'
H : 'BASE64/BASE64')
D fileDescriptor S 10I 0
D flags S 10U 0
D permissions S 10U 0
D pdfFile S 50A VARYING
D pdfContents S A LEN(10000000)
D Msg S 50A
D Len S 10I 0
D encData S A LEN(10000000)
D url S 200 VARYING
D request s A LEN(10000000)
D responseCode s 10I 0
flags = O_RDONLY;
permissions = S_IRUSR;
pdfFile = '/home/JUSTINB/Test.pdf';
fileDescriptor = open(pdfFile
if fileDescriptor < 0;
Msg = 'Failed to open ' + pdfFile + ' for reading';
len = read(fileDescriptor
url = '';
+ '<DepositDocument xmlns="http://tempuri.org/">'
+ '<comment>' + 'Test' + '</comment>'
responseCode = http_url_post_xml(
if (responseCode <> 1);
C EVAL *INLR = *ON
Programmer Analyst IV
Direct: 877.309.9176 | Mobile: 207.227.1355 | Fax: 207.760.1002
Most likely, the binary data would need to be base64-encoded. If you have a WSDL for the SOAP service, it should provide the details of what needs to be done.
I'm guessing that your document is larger than 16mb based on your concern about it being too large. If that's the case, you can generate it into a stream file, and send the file. That way it doesn't all need to be in memory at the same time.
On 12/30/2019 10:12 AM, Bob Long wrote:
This message is intended for the use of the addressee only and may contain information that is privileged and confidential. If you are not the intended recipient of this message, be advised that any dissemination or use of this message is strictly prohibited. If you have received this message in error, please delete all copies of the message and its attachments and notify the sender immediately. Thank you. MMG Insurance
-- _______________________________________________ Ftpapi mailing list Ftpapi@xxxxxxxxxxxxxxxxxxxxxx http://scottklement.com/mailman/listinfo/ftpapi