Quote:
Originally posted by petey
Forgive me if this question is silly, but we are wanting to B2B transaction with a company that's sending us XML documents.
right now they are FTP'ing the XML documents to our server and we are processing them once they get there.
They want to use HTTPS instead of FTP now so I got my SSL certificate and it's installed on my server. Now they are trying to POST to my server.
Not much help on their end, but it's my understanding that I need to write a CGI or PHP script that accepts their post to our server?
Basically all I want to do is accept the post and place the XML doc in a directory on my FreeBSD server. Is there any examples of code that does this out there or has anyone done this?
OR am I totally off base. Basically they are ready to go and are waiting on me and I'm sitting here scratching my head
I'm Running Apache if it matters
Thanks in advance
|
You are confusing two different things here.
Your clients are ftping XML files to your server in an insecure manner. If you want to make it secure you would need to disable ftp and enable sftp (i.e sshd daemon on 22 port and allow protocol 2 only). The client would need to an secure client in order to connect.
HTTPS is a different protocol. If your client wants to do HTTPS post then you would need a socket interface accepting XML which you can write in python, perl, java, C etc etc. Configure stunnel and set up forward to your socket interface. The client can now open a SSL socket to stunnel and send XML strings there which get forwarded to your socket interface. You can choose to do whatever you like there.
Infact you can just grab something from the internet for your socket interface and hack it. There are so many out there.
Another way is to write a cgi script (in Perl or C or python or a servlet) which can take the XML argument passed in the POST and process it. This CGI script will be run by apache. Again there are thousands of such scripts available which you can hack and customise.
The last option may be the easiest for you.