RESTful HTTP Binding Demo
=========================

This demo shows how to create RESTful services using $SUBSTITUTE_NAME$'s HTTP binding.
The server in the demo creates three different endpoints: a RESTful XML
endpoint, a RESTful JSON endpoint, and a SOAP endpoint.

Running the demo
----------------

The demo has a class called com.acme.customer.Main which starts up various
endpoints. To start this server run the command:

$ ant server

Once the server is running, try going to the following URLs:

http://localhost:8080/xml/customers
http://localhost:8080/json/customers
http://localhost:8080/xml/customers/123
http://localhost:8080/json/customers/123

These will serve out XML and JSON representation of the resources.

The following HTML page is served by $SUBSTITUTE_NAME$ so you can try using the
JSON service via JavaScript:

   http://localhost:8080/test.html

Included are some example JSON and XML files so you can add or update
customers using wget. Try the following commands and look at the results:

wget --post-file add.json http://localhost:8080/json/customers
wget --post-file add.xml http://localhost:8080/xml/customers
wget --post-file update.xml http://localhost:8080/xml/customers/123

And if you are interested in SOAP you can try the SOAP endpoint:

   http://localhost:8080/soap?wsdl

Running the client
------------------

The demo also includes a Client class which accesses data using HTTP. Run the 
client with the following command:

  ant client