Hi Adam,

Thanks for pointing me towards curl. What an infinitely useful little CLI utility for web development. I can see myself using this a lot from now on! I plan communicating throughout the whole REST application in XML.

To test, I am simply using "curl --data-binary @input.xml --request PUT/POST http://localhost..........";
(Please tell me if this is the wrong way to be RESTfully testing)

I have then been investigating how to pull the XML information out of the request. I seem to be able to do a "request.getEntity().getText()". I guess I'll then load the string into a JDOM Document to use it.

I would have done it a different way, but when I performed a " request.getEntityAsDom().getText("//meta") " on the following xml file, it came back as null

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<resourceInput>
   <meta>boosh text</meta>
   <main>Howard Moon</main>
</resourceInput>
sourceInput>

Cheers,
Marcus.


"Adam Rosien" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
1) How can I submit PUT and DELETE HTTP requests to my URIs, to test that my
 various handler methods are working? Obviously GET and POST ones can be
 issued by knocking up a simple form...
2) When I eventually issue PUT and POST requests, how do I pass in data to
 create and update (respectively) the resources?

I test almost exclusively with curl, which has options to do #1 and
#2.  curl is great.  One motto I have is "If I can't do it with curl,
it's probably not REST."

3) After getting all the verb methods firing off for the various resources, I'll be wanting to properly persist and return real data from a database. I noticed that there is a JDBC connector, that you can pass in SQL embedded in
 XML format. Is this the proper way to do this (to keep inline with the
 framework) or would it be better to establish my own JDBC connection and
 get/modify/update/delete the data directly myself.

I would recommend Hibernate among the others recommended.

.. Adam



Reply via email to