I completed the RESTful web service tutorial …
Developing JAX-RS / REST Web Services
… and it worked just fine… as far as it went. Is the intent that you communicate with RESTful WS’s with http requests from Javascript? Such as…
Microsoft: xmlhttp=new ActiveXObject(“Microsoft.XMLHTTP”);
Other browsers: xmlhttp=new XMLHttpRequest();
????
With the JAX-WS tutorial, there was also a WS client that was built. Not so with this RESTful tutorial.
In particular, I’m wondering how you would send an “add” request to the tutorial example. A listing of customers was…
http://localhost:8080/services/customers
…to list all customers and…
http://localhost:8080/services/customers/<int>
… to list a specific customer. It appears from the annotations…
@POST
@Path(“add”)
@Produces(“text/plain”)
@Consumes(“application/xml”)
…that it should be something like…
http://localhost:8080/services/customers/add/< customer xml>
… an example of which seems like it ought to look like…
http://localhost:8080/services/customers/add/<customer><name>Bill Adama</name><address>Vancouver, Canada</address></customer>
… but I was not able to get this to work. I guess in all cases you need to have a listener in your Javascript to receive the output?
Thanks