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

Re: Server Program?



Sender: Scott Klement <klemscot@xxxxxxxxxxxx>


> I have used HTTPAPIs in several program to contact a URL and receive
> information back. I now have a need for a program that will receive a
> request from another system and send data back to it. The data sent back
> could be as little as a couple of words to as much as data in a file.
> How is the program setup to get the question.

Will the other system be using the HTTP protocol to do this?  Or is this
something else entirely?

Unless you have a compelling reason to do otherwise, I think that the HTTP
protocol is a good way to do it -- it's becoming something of a "standard"
for distributed APIs.

Though, there are still good reasons to use other methods...

> I have looked at the documentation on the Socket Tutorial and setup all
> the examples. I am not sure if that is the way to go or not. Some
> examples of a program like this would help. Any help will be greatly
> appreciated.

Assuming that you want to use HTTP for this, the web server that comes
with OS/400 can help you out.  You can have that web server call an RPG
program (or any other language that runs on the iSeries!) and send you the
information that the remote computer has requested.

You can then take that information, process it, and spit out a report or
whatever you need to spit out.

There are various utilities available that can assist in this task.  The
most popular one is called CGIDEV2 and is available from IBM at no charge.
You can find it here:
http://www-922.ibm.com

Brad Stone also has a toolkit for this type of programming, and he has
written a book on the subject called "e-RPG."  I haven't read it, but I've
heard good things about it.  There's more information about it on his web
site:
http://www.bvstools.com

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