create a secure XML API
I need a web application to authenticate other web applications and then allow them to read the MYSQL database contents that available in my end.
for a example http://www.mydomain.com has the MySQL database contents.
http://www.otherdomain1.com,http://www.otherdomain2.com,etc. will read the database contents from my web site.
these otherdomains are made from various languages, so i have to display my database contents in a format that can be understood by any other language.probably it should be a XML API.
any suggestions on creating such a application, might be help full for me.Thanks.
[625 byte] By [
Ajaxranda] at [2007-11-27 3:40:01]

# 1
<Person>
<name>Mike</name>
<email>mike@mail.com</email>
</Person>
<Person>
<name>Donald</name>
<email>donald@mail.com</email>
</Person>
if i generate a xml page like this,will other application can read this data?
# 2
I don't know whether this is not clear so if say it like this.
1. http://www.otherdomain.com is a registered client in my database. and from a web application from that end will try to read the contents from http://www.mydomain.com.
http://www.otherdomain.com >> PHP
http://www.mydomain.com. >> JSP/SERVLET
2. under mydomain i need to authenticate the otherdomain and if it is a registered user mydomain will allow it to read mySQL database contents over a XML file.
# 3
It's not clear at all. You posted some XML-like things. But your post topic mentions security and your last question mentions authentication.
I think you are trying to solve everything all at once simultaneously at the same time.
Authentication has nothing to do with XML. Deal with that separately. Then you can send XML back and forth, or not, whatever you like.
# 4
for the time been I'll forget about the Authentication.Why i need a authentication actually before i let otherdomains Application to read my XML data i need to verify whether they are registered users or not.
If Authenticated here after will generate the XML data.What i need to know first of all we will say otherdomain1 with PHP scripts try to read the XML data generated by my end that uses Servlet technology, in that case should i write a XML file to DIR under my web root or should i execute it in the browser window.
what is the best way of making it, then other applications made from PHP,ASP can read those data and they can display it under their web sites.
# 5
use a webservice for XML data exchanges... on the java side you can quite easily implement it with Axis/SOAP ( http://ws.apache.org/axis/ ) ... and on the php side, well, some kind of soap API that is available for sure...
then if you want your client to authenticate, you can require a login/password in the xml request from the client. You can use SSL for the log/pass to be crypted.
Hope it helps
# 6
Thanks alban.maillere for the suggestions.If you can further explain it highly appreciate.Here there is no way use any third party APIs for the project.If others also have a idea about the methodology that i should follow, please be good enough to Post it here.