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

RE: HTTP API question



Hi Wes, 

Let's see if I read your question correctly. You would like a server program
to accept requests from clients and pass the data (a pointer to the data) to
some other program.

It would work like this.

You'd start a RPG based server listening on port 80 (or some other port of
your choosing). Then, any number of clients will connect to the server. They
will send a packet of XML and wait for a response. The server will then pass
the data (via a pointer) to another program and receive a response from that
program. The server will then respond to the client with the response. The
client will close the connection (lather, rinse and repeat).

If that is what you want...you are close...HTTP API is designed more from
the client side than the server side.

HTTP is not very sophisticated (run wireshark, start your browser and look
at the data. Not really much there). You should be able to replicate the
server application relatively easy. I'd look at Scott's socket tutorials for
code and examples of how to write servers. Of course, you may be able to
build off the work of LIBHTTP. And we'd love to see some more open source
derivitives!!

But, considering who you work for, maybe you just want to hire Scott for a
consult. ;)  My guess is that he could get you started with some code and
some tutoring within a couple of days.

Mike Krebs


-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Wes Breinich
Sent: Tuesday, September 18, 2007 11:42 AM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: HTTP API question

The HTTP API may very helpful to us.  I'm not very knowledgeable about HTTP.
In reading through the documentation and source code I come to this
conclusion.  You get responses from the HTTP posts via output to a file -or-
through a parsing mechanism.
 
We have a reasonably sophisticated HTTP servlet application (SystemLink)
written in Java that processes database and application transactions.
It has no user interface.  It accepts XML headless tranasactions and hands
back any necessary feedback through a response.  This servlet can basically
process any transaction available in our java GUI interfaces. 
 
I've been given the assignment of developing a RPG local program interface
into the servlet.  We already have a RPG/java LPI.  An RPG process starts up
java and calls classes to send requests/receive responses to/from the
servlet.  We now want a RPG POST LPI to do the same thing without having to
startup java (performance).
 
The current RPG/Java LPI receives the XML response as one chunk of memory.
The servlet is sophisticated and has request methods to be instructed to
return data in manageable XML memory chunks.  We'd like the POST LPI to have
the same structure.  The LPI function has no reason to do parsing.  It
simply wants to hand back POST responses in memory chunks to the caller.
I'd like to hand the POST API a pointer to memory for the response.  Is
there a current way to do that -or- could anyone advise me if this would be
feasible for us to make a change in this
area?    
 

Wes Breinich | Infor | office: 843-681-9575 | mobile: 843-298-4618  |
wes.breinich@xxxxxxxxx

Save the Date | Inforum 2007 | The Sands Expo | Las Vegas, September
9-12 | where it all comes together for you

 

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