I require to write a simple java webservice that could show its output in the form of a XML/JSON file.
For example the user will click a link or a button, and a simple SQL statement would get executed SELECT * FROM PERSON
and the result of the above SQL query should be displayed in the form a XML/JSON file.
I have googled this several times but failed to find a suitable tutorial or a sample code. Can some one help me by providing a sample code or a tutorial that would help me.