Presentation is loading. Please wait.

Presentation is loading. Please wait.

RESTFul Web Services The Easy Way. What is REST? Representational State Transfer Maps your CRUD actions to HTTP verbs ActionVerb CreatePOST RetrieveGET.

Similar presentations


Presentation on theme: "RESTFul Web Services The Easy Way. What is REST? Representational State Transfer Maps your CRUD actions to HTTP verbs ActionVerb CreatePOST RetrieveGET."— Presentation transcript:

1 RESTFul Web Services The Easy Way

2 What is REST? Representational State Transfer Maps your CRUD actions to HTTP verbs ActionVerb CreatePOST RetrieveGET UpdatePUT DeleteDELETE

3 Why REST? Simple, both conceptually and programmatically Simpler and cleaner than SOAP

4 SOAP Example POST /InStock HTTP/1.1 Host: www.example.org Content-Type: application/soap+xml; charset=utf-8 Content-Length: nnn IBM

5 REST Example GET /stock/IBM HTTP/1.1 Host: www.example.org Accept: application/xml

6 SOAP Example 2 POST /InStock HTTP/1.1 Host: www.example.org Content-Type: application/soap+xml; charset=utf-8 Content-Length: nnn IBM 50

7 REST Example 2 POST /order HTTP/1.1 Host: www.example.org Content-Type: application/xml; charset=utf-8 IBM 50

8 Single Resource Summary Create POST /resourceName Retrieve GET /resourceName/resourceId Update PUT /resourceName/resourceId Delete DELETE /resourceName/resourceId

9 Making it Easy: JSR 311 JAX-RS: The Java API for RESTful Web Services No XML Configuration! Simple annotations to quickly put together some rest based web services. Can do automatic serialization (both XML and JSON + many others)

10 Example Application w/ Jersey

11 Some REST/Jersey/JAXB Gotchas No real security standard for REST. Mostly DIY solutions Hibernate dependencies Use cg-lib-nodeps

12 Questions?

13 The End Sean is reachable at: iam@seanstoppable.com www.crazyorgenius.com @ssmith


Download ppt "RESTFul Web Services The Easy Way. What is REST? Representational State Transfer Maps your CRUD actions to HTTP verbs ActionVerb CreatePOST RetrieveGET."

Similar presentations


Ads by Google