I am not familiar with websrvices and mysql ..i followed this http://www.vogella.com/articles/REST/article.html tutorial and developed a RESTful web service in Java with the JAX
I would start here : http://wiki.restlet.org/docs_2.1/13-restlet/21-restlet.html
You can create a java class/method that encapsulates the Business logic, for example a method like getData(DataFormat xml/html, whatData) which connects to the mysql database and retrieves records and then transforms it into required format, call this method within getXML() and getHTML()