The addition of the REST API to ArcGIS Server at 9.3 was quickly embraced by developers as a simple but powerful way to utilize ArcGIS Server output in application development. Furthermore the new ArcGIS API for Flex enabled the development of true Rich Internet Applications (RIAs) on top of ArcGIS Server. But the Flex Framework in its current state imposes significant limitations on RESTful communication via HTTP: there's just no straightforward way to extract the headers from an HTTP-response in ActionScript3. This means you can't read the id of a newly created resource from the 'Location' header, making it impossible to tell the difference between a '500 Internal Server Error', a '404 Not Found' or a '422 Validation Error'. There's also no way to get the response body for anything outside the 2xx status range. And the only HTTP methods accepted are GET and POST, meaning you cannot use PUT or DELETE, at least not without a proxy. This session focuses on how to unleash the full power of REST for your RIA using a BlazeDS proxy on your application backend to circumvent aforementioned limitations. We'll walk you through the creation of a Java based RESTful Web service using Jersey (an open source reference implementation for JSR-311/JAX-RS), and show how to set up the Flex application on the client side to utilize the complete set of RESTful Web Service HTTP methods and status codes.
With the HTTPServiceComponent<br />you can only do a GET or a POST, no PUT or DELETE<br />the HTTP status code returned in the response is not available (so you can’t get the id of a newly created resource from the ‘Location’ header and you can’t tell the difference between a ‘500 Internal Server Error’, a ‘404 Not Found’ or a ‘422 Validation Error’)<br />there’s also no way to get the response body for anything not in the 2xx range (it fires a fault event for any HTTP response that does not have a status code of 200)<br />
Without BlazeDS Flex applications can access back-end data using either the HTTPService or WebService components<br />BlazeDS is a series of data services that provide your Flex applications with additional dataconnectivity options:<br />Remoting Service (directly invoke methods of Java objects deployed in your application server)<br />Message Service (provides a complete publish/subscribe infrastructure allowing Flex clients and the server to exchange messages in real time)<br />HTTP Proxy Service (makecross-domain(!) servicerequests)<br />