XJSONDataSource example?

There are many discussions on using XJSONDataSource to avoid the SOP issue when the smartgwt client tries to access a restful web service on a different machine (even using localhost). There are pieces of information here and there. I just couldn’t piece them together. I am stuck for two days and still struggling before moving to the HttpProxy implementation.

Some developers have claimed it worked for them. I really appreciate if someone can post a very simple restful web service class, and a smartgwt client method that uses XJSONDataSource to retrieve the json data.

Many thanks in advance!!!