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
The example you linked to does not actually make use of a database but uses in-memory Todo's to provide the data. In section 8 the author states
Create the following data model and a Singleton which serves as the data provider for the model. We use the implementation based on an enumeration.
The data model is the Todo class.
The data provider is the TodoDao enum. The purpose of TodoDao, is essentially to store Todo's in memory. In other words, it performs the function that would otherwise be done by a database.
What therefore needs to be done, is to:
Have a look the accepted answer to REST/JSON Web Services Java EE Framework, it should shed some light on what needs to be done. Part 1 covers creating a database, while Part 2 covers creating and annotating JPA entities (Part 3 - JAXB Bindings for xml or json, Part 4 - The RESTFul Service, Part 5 - The Client).
If difficulties are still encountered, have a look at the answer I posted for Need to write a RESTful JSON service in Java, that should be suitable for someone who wants more nitty-gritty to, as a starting point, connect to a single table in a database and create a RESTful Web Service with JSON/XML representations using the following.
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()
Spring MVC makes REST based development very easy. Refer to this blog