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

RE: HTTPAPI query about HTTP_URL_POST and best approach.



Peter,
 
We have a system here where a small server program on Windows (written by
us) talks interactively and continuously with an RPG program on iSeries to
exchange data.
The iSeries program is written in sockets, using Scott's tutorials. Works
like a dream.
 
The sockets program on Windows needs to be 'listening' on a port used by
both systems. We did not use a standard port, but chose one at random so as
not to get confused with any other TCP traffic.
 
 
Regards
 
Ian Patterson
 

-----Original Message-----
From: Mark Humpage [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf
Of Mark Humpage
Sent: 14 October 2007 21:22
To: HTTPAPI and FTPAPI Projects
Subject: RE: HTTPAPI query about HTTP_URL_POST and best approach.


Hi Peter,
 
I do something very similar with a windows server sending small XML messages
to the iSeries and receiving a small XML message in response.
I personally used the CGIDEV2 tools (though they are really designed for
dynamic HTML and simple query string request URLs) and used the built in
mechanisms to write the XML to the HTTP response. I guess the question is -
can whatever is sending you the XML messages handle an HTTP response and
strip out any XML you might add to it?
If so you might not have to do a seperate HTTP post.
 
Kind Regards
 
Mark

  _____  

From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx on behalf of mullp mullp
Sent: Sat 13/10/2007 12:16 p.m.
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: HTTPAPI query about HTTP_URL_POST and best approach.



Hi all,
  
  I am setting up some basic proof of concept programs. The requirement is
for a remote system to send transaction via XML to an iseries. The iSeries
will send an acknowledge of receipt back once it has them . A subset of
these transactions are cash payments and once the cheque is printed at a
later date on the iSeries, the cheque number and date printed need to be
sent back to the source sytem in XML format. All of this is not over the
internet but over a local network.
  
  I have successfuly set up the acceptance and acknowledgement of
transactions using CGI APIs such as read from(QtmhWrStin) and Write to
Stdout (QtmhWrStout) and so on.
  
  The proof of concept for sending back a cheque number and date printed a
proving a bit more of a challenge. My questions are as follows.
  
  1) Would using the HTTPAPI be the best way to go with this? I was thinking
of doing something similar to example 4. That is, set up the XML transaction
and do a HTTP_URL_POST.
  
  2) I did try and write a simple program myself based on the socket
tutorial but
the connect() fails with a message "ECONNREFUSED - The destination socket
refused an attempted connect operation."  If I key the URL into a web
browser I get a response. For reasons I am have not be able to resolve I
cannot resolve domian name servers on the iSeries even though everything
appears to be configured OK so I am temporarily using an IP address and port
in my url and I suspect I may be using the wrong port number. I need to
chase up with the Java programmer who set up the server appplication but I
wondered though once this is resolved would a browser and a procedure such
as HTTP_URL_POST be treaty by the server in the same manner? Therefore if
multiple connections were attempted from different locations printing cheque
would there be a problem? I noted one of the error options on the connect()
api is "EADDRINUSE - Address already in use" which is why I raised this
question.
  
  Any feedback would be appreciated.
  
  Thanks
 
Peter.


      
---------------------------------
Sick of deleting your inbox? Yahoo!7 Mail has free unlimited storage. Get it
now. 

;

The information contained in this email is privileged and confidential and

intended for the addressee only. If you are not the intended recipient, you

are asked to respect that confidentiality and not disclose, copy or make use

of its contents. If received in error you are asked to destroy this email

and contact the sender immediately. Your assistance is appreciated. to

<<attachment: winmail.dat>>

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