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

Re: Web Service non Client



Sender: jmajor@xxxxxxxxxxxxxxx

-----owner-ftpapi@xxxxxxxxxxxxx wrote: -----

To: ftpapi@xxxxxxxxxxxxx
From: Scott Klement <sk@xxxxxxxxxxxxxxxx>
Sent by: owner-ftpapi@xxxxxxxxxxxxx
Date: 09/22/2005 05:27PM
Subject: Re: Web Service non Client

Sender: Scott Klement

> 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.

 - Yeah the client we work with will only send the documents via a web service...



> 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.

 - Well from all the documentation in WDSC and on the web you create a java program that actually calls an RPGLE Service program passing the parms which in this case is an actual XML Document.  I even called iSeries support because i did not like the idea however thats what they tell me i have to do...  Thats why i am trying to find out from others if anyone else has had this type of project to do.

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.

 - I totally agree just feel like I am stuck with what I have read and heard from Support.

> 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?

 

 - Yes I have and I have to say great work on that.  I have installed and started playing with it however my real first step is getting this service up and running.  I was also thinking trying to find a way since the web service is just a java program to have the java program place the XML on the IFS then just do a call to the RPGLE Service program stating its on the IFS however not that familiar with Java yet soo... just trying to find a solution...  Thanks for you input and the great articles about Expat!!!!

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


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