I need to set up an automated system where a client can download data from our mySQL database to directly update their own database. Although I am an experienced Perl and database programmer, I have no experience whatsoever of this sort of application and I would be grateful for some idea of where to start.
The system would need to run on a daily basis and be entirely automated. I am presuming that this would be done by the client running a Chron job from their site and sending a request to a script on our site to extract the data. I am also presuming that the ideal format for sending the data to the client would be XML. I have no problem in terms of writing a Perl script to output the data in XML format. However, my only experience is with creating script output to a web page rather than to an external program - so I need to know what is the crucial difference in generating this form of output.
For example, when creating output to a web page, one normally sends the header "Content-Type:text/html" before the output. When sending output to an external program, is it simply a matter of using a different header?
I should add that I don't need to worry too much about the client's end - that's their problem. I only need to know how to output the data in a form suitable for the requesting program. Any advice would be much appreciated.
I should add that I don't need to worry too much about the client's end - that's their problem
Take the easy route then and just write your script as if they were connecting with a browser and let them parse it out. The headers or anything else won't be an issue as it should be a script so they can just ignore anything they do not need. It really is that simple.
If you really want to you can use SOAP and publish your WSDL.
JAG