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

Re: Web Service non Client



Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>

Has anyone created a web service in house for receiving say a soap message
with an XML  document embedded and interact on that XML Doc via RPGLE.

I've never done it with a SOAP document, but I've received large XML documents via the web and processed them with RPG.


Just curious because just starting the project and like everyone knows an
XML document has no set length and with integrating a Web Service with
RPGLE (Service Program) my max length is 65535 for a character parm...

Why would you want to store the whole document in a single parm? Seems like an odd way to go about it.


If you really want to store it in memory, use a pointer to teraspace. Receive the data from your stdin, and save it to memory chunk by chunk. You can allocate up to 1 terabyte of data to a single teraspace pointer.

You just have to work with the data in chunks. Have a 65535 field based on a pointer that works with 64k of the data at a time, then advance to the next 64k of data, etc, until you've processed it all. (or whatever size field you think would be appropriate)

However, I don't think I'd even try to load the whole thing into memory. Either I'd feed it to the XML parser as it comes off the wire, or I'd save it to a stream file in the IFS, and use that file as input to the parser.

There's really no need to try to stuff it all into a single character variable.

Just wondering if anyone else has needed to create a web service in house
for outside clients to access using RPGLE and how they dealt with some of
these issues.

Incidentally, have you seen my articles on using Expat (an open source XML parser) from RPG?


-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------