I have been reading through the WADL docs and I was wondering if the
following scenario is covered by the current spec:
I have a RESTful service is responsible for assigning unique identifiers to
a given resource. In a nutshell, persistence is done via Hibernate 3 and XML
marshaling is handled by JAXB2. When my code issues a POST or a PUT to
create a new contact at the following URL:
http://mydomain/contacts
Since identifier is unknown by the client at this point, the service will
assign a new ID to the contact and persist the contact. In order for the
client get the new resource, the code issues a redirect to the new location:
http://mydomain/contacts/33127
I'm issuing a 301 (Moved Permanently) since this is the new permenant
location of the resource.
With all of that said, I have not seen anything in the WADL spec that would
represent this kind of behavior. I'm curious to know if following a redirect
would be implicit if a there is a representation value on a PUT or POST
call? Thanks.
Ryan-
--
Ryan J. McDonough
http://www.damnhandy.com