I have a client program in which i make a HTTPURLConnection to a RESTful web service. I am passing all XML data in the http request object. Everything seems to work fine for the HTTP POST/PUT method but not for the DELETE method.
-----------------ADD record via POST Request method ------------------
What would that XML data be for? The resource is indicated by the URL, and the operation is to delete it. There's no need for further data.
Joined: Jan 31, 2005
The xml data has details like which record (record's id, name, etc) to delete etc.,
This is what i am doing ....
In RESTful web service when i get the xml data in the http request object, i insert the data into a load table first & then call the stored proc to insert the data into the main table which updates the status flag in the load table as successful insert/update/delete/error etc., Then, i fetch the status flag info and send the response back to the client as record was inserted/updated/deleted.
Inserts and updates are working fine but not the delete part. Any further suggestions on this?
Thanks and appreciate your response.
Joined: Mar 22, 2005
That's not how HTTP DELETE -and by extension, a purely RESTful design- works. It sounds as if you'd be better off using a POST.