I have an object that contains another object:
Public class Node {
public String id;
public Map map;
// more stuff...
}
Public class Map {
public string id;
// more stuff...
}
Lets say I have Node {id=1111; Map map {id=xxxx}}
That is, the embedded Map is {id=xxxx}
I have top-level resources for each independent entity:
/nodes/{nodeId}
/maps/{mapId}
I have extended the /nodes URI:
/nodes/{nodeId}/map
Which I currently have returning a response with status code 300 (Multiple Choices) that puts the addressable URI for the map in the Location header:
/nodes/1111 // returns the Node
/maps/xxxx // returns the Map
/nodes/1111/map
Returns:
Status: 300
Location: /maps/xxxx
It basically gives me the URI of the Map for a given Node. I was just looking at the HTTP/1.1 spec and found
303 See Other
I think this is the better status because I only have 1 choice. It's basically a redirect. 303/See Other is not available in
javax.ws.rs.core.Response.Status
or
Com.sun.jersey.api.Responses
Questions:
1. Is See Other the best option to use for my redirect situation?
2. Any reason all HTTP/1.1 status codes are not included in the enums?
---mark
_______________________________________________
Mark A. Rabick
Software Engineer
Northrop Grumman - Integrated Mission Systems (IS/DSD/IMS)
3200 Samson Way
Bellevue, NE 68123
Ph: (402) 293-7091
Em: mark.rabick_at_ngc.com
Remember PFC Ross A. McGinnis...
http://www.army.mil/medalofhonor/McGinnis/index.html
... MA2 Michael A. Monsoor, Lt. Michael P. Murphy, Cpl. Jason Dunham, SFC Paul Ray Smith and the rest...
http://www.cmohs.org/recipients/most_recent.htm