SlideShare a Scribd company logo
1 of 19
Download to read offline
REST - Basics
Srividhya Umashanker
We are talking about ……   1.   Introduction
                                 •   Webservices, SOAP,vs REST
                          2.   Spring – Rest, JSON
                                 •   REST using Spring
                                 •   Annotations
                                 •   REST example with Spring
Introduction
               1.   Webservices
               2.   SOAP
               3.   What is REST?
               4.   SOAP vs REST
               5.   REST in Detail
                    •   Frameworks,
                    •   HTTP Methods,
                    •   HTTP Headers
                    •   Status Code
Web Services!!
•   Exposing existing software over the web (HTTP)
•   Deployed independent of the OS and Programming Languages
•   Standardized Protocol
•   Easily connecting Different Applications i.e., Interoperability
•   Low Cost of communication

                                        Service request
                                       validateCreditCard
                                    Number-1828282828282828   Server
                                                                        ICICI Bank
                    ebay.com                                           Credit Card
                                                                       Web Service
                                      Service Response
                                    “Name does not match”
SOAP?
Simple Object Access Protocol




• A simple XML-based protocol to let applications exchange information
  over HTTP.
• WSDL defines endpoint, i/o format, security etc

• Example : getUser(userName);
What is REST? - Rest Triangle
• REST is a new and improved form of web             Nouns :
  services.                                          http://localhost/rest/user/123
• Introduced as SOAP is complex                      4

• There isn’t a standard for REST architectures
• Expose directory structure-like URIs
• Used to expose a public API over the internet
  to handle CRUD operations on data.
• Works on Nouns, Verbs, Content Types
                                                Content Types                 Verbs
                                                   JSON, XML, HTML….        GET, POST
                                                                            ….
GET /server/1234
POST /server?name=SERVER-1&id=1234
SOA vs REST – The right webservice




                GET /user/Robert
                GET /adduser?name=Robert   getUser(userName);
Rest Frameworks – List


 Apache CXF
 Jersey
 Rest Easy
 Restlet
 Spring MVC
HTTP METHODS – CRUD in REST

Methods   CRUD                Example
          Fetch all or any    GET /user/ - Fetch all
GET
          resource            GET /user/1 – Fetch User 1
POST      Create a Resource   POST /user?name=user1&age=20
                              PUT /user/1? name=changed-
PUT       Update a Resource
                              user1&age=22
DELETE    Delete a Resource   DELETE /user/1
          Fetch Metainfo as
HEAD                          HEAD /user
          header
          Fetch all VERBS
OPTIONS                       OPTIONS /user
          allowed
HTTP Headers - To remember


  Headers                Example
  Auth:<session-token>   Auth:1ajkdsdajsd922j-w8eis0-jssjss
                         Session token by logging in to Atlas
  Accept:<media Type>    accept: application/json – Default
  Content-Type           content-type:application/json
  Allow:                 Which method requests are allowed by the server
HTTP Status Codes    To Remember - Status
                           Codes

                    200 – OK                  Successful Return for sync call

                    307 – Temporarily Moved   Redirection

                    400 – Bad Request         Invalid URI, header, request param

                    401 – Un authorized       User not authorized for operation

                    403 – Forbidden           User not allowed to update

                    404 – Not Found           URI Path not available

                    405 – Method not
                                              Method not valid for the path
                    allowed
                    500 – Internal Server
                                              Server Errors
                    Error
                    503 – Service
                                              Server not accessible
                    unavailable
Spring 3 - REST

             •    Spring Framework - Introduction
             •    Dispatcher Servlet
             •    Flow - Rest calls in Spring
             •    Annotations for REST
             •    REST Example with Spring
Spring Framework

• The Spring Framework is an opensource, lightweight, Aspect based
  Inversion of Control container for the Java platform

• helps "wire" different components together.

• Spring's REST support is based upon Spring's annotation-based MVC
  framework

• configure your servlet container as you would for a Spring MVC application
  using Spring's DispatcherServlet.
http://static.springsource.org/spring/docs/3.0.0.M3/reference/html/ch18.html
Dispatcher Servlet
                     <web-app>
                          <servlet>
                                  <servlet-name>rest</servlet-name>
                                  <servlet-class>
                                       org.springframework.web.servlet.DispatcherServlet
                                  </servlet-class>
                                  <load-on-startup>1</load-on-startup>
                          </servlet>
                          <servlet-mapping>
                                  <servlet-name>rest</servlet-name>
                                  <url-pattern>/rest/*</url-pattern>
                          </servlet-mapping>
                     </web-app>
Flow – REST calls in Spring
                    HTTP Request
    Rest Template
                                    Dispatcher
                                      Servlet
                                         @ResponseBody
     Client Calls   HTTP Response
                                                  Jackson
                                                  Converter
                                    @Controller




                                     @Service                 DB
Rest Template

     Spring Framework’s RestTemplate provides simple ways to make requests to
     RESTful services.

     Allows all REST METHODS – GET, POST, DELETE, PUT, HEAD, OPTIONS
Spring Annotations for REST
 Annotations     Usage
                                              Example showing Annotations

                 mark the class as a MVC
@Controller                                   @Controller
                 controller
                                              @RequestMapping(value = “/ilo”)
@RequestMappi
                 Maps the request with path   public class iLOController
ng
                                              {
                                                  @RequestMapping(value = “/server/{id}”, method = RequestMethod.GET)
@PathVariable    Map variable from the path
                                                  public @ResponseBody Book getServer(@PathVariable String id) {
                                                       System.out.println(“------Gettting Server ------”+id);
                 unmarshalls the HTTP
                 response body into a Java        }
@RequestBody
                 object injected in the               ……
                 method.                              ……..
                                              }
                 marshalls return value as
@ResponseBody
                 HTTP Response

@Configuration   Spring Config as a class
JSON
Javascript Object Notation

  •   Lightweight Data Interchange Format – No tags
  •   Easy to parse and create
  •   Supports objects and Arrays
  •   We use Jackson Framework for JSON conversions

                            JSON Example:
                                       {
                                         “servers": [
                                             { “name":“server1" , “category":“Blade" },




                                                               A
                               Array    A { “name":“Server2" , “category":“DL360" },
                                             { “name":“Server3" , “category":“DL480" }
                                          ]
                                       }                    Object
We are Done!

More Related Content

What's hot

Introduction to the Web API
Introduction to the Web APIIntroduction to the Web API
Introduction to the Web APIBrad Genereaux
 
Understanding REST
Understanding RESTUnderstanding REST
Understanding RESTNitin Pande
 
Spring Boot and REST API
Spring Boot and REST APISpring Boot and REST API
Spring Boot and REST API07.pallav
 
Node.js Express
Node.js  ExpressNode.js  Express
Node.js ExpressEyal Vardi
 
ES6 presentation
ES6 presentationES6 presentation
ES6 presentationritika1
 
RESTful API 설계
RESTful API 설계RESTful API 설계
RESTful API 설계Jinho Yoo
 
REST API Design & Development
REST API Design & DevelopmentREST API Design & Development
REST API Design & DevelopmentAshok Pundit
 
Rest api standards and best practices
Rest api standards and best practicesRest api standards and best practices
Rest api standards and best practicesAnkita Mahajan
 
Java concurrency - Thread pools
Java concurrency - Thread poolsJava concurrency - Thread pools
Java concurrency - Thread poolsmaksym220889
 
What is REST API? REST API Concepts and Examples | Edureka
What is REST API? REST API Concepts and Examples | EdurekaWhat is REST API? REST API Concepts and Examples | Edureka
What is REST API? REST API Concepts and Examples | EdurekaEdureka!
 
Introduction to Spring Boot
Introduction to Spring BootIntroduction to Spring Boot
Introduction to Spring BootTrey Howard
 
Asynchronous JavaScript & XML (AJAX)
Asynchronous JavaScript & XML (AJAX)Asynchronous JavaScript & XML (AJAX)
Asynchronous JavaScript & XML (AJAX)Adnan Sohail
 
Design Beautiful REST + JSON APIs
Design Beautiful REST + JSON APIsDesign Beautiful REST + JSON APIs
Design Beautiful REST + JSON APIsStormpath
 

What's hot (20)

Introduction to the Web API
Introduction to the Web APIIntroduction to the Web API
Introduction to the Web API
 
An Introduction To REST API
An Introduction To REST APIAn Introduction To REST API
An Introduction To REST API
 
Understanding REST
Understanding RESTUnderstanding REST
Understanding REST
 
Express js
Express jsExpress js
Express js
 
Spring Boot and REST API
Spring Boot and REST APISpring Boot and REST API
Spring Boot and REST API
 
Node.js Express
Node.js  ExpressNode.js  Express
Node.js Express
 
ES6 presentation
ES6 presentationES6 presentation
ES6 presentation
 
Spring data jpa
Spring data jpaSpring data jpa
Spring data jpa
 
REST API
REST APIREST API
REST API
 
Api presentation
Api presentationApi presentation
Api presentation
 
RESTful API 설계
RESTful API 설계RESTful API 설계
RESTful API 설계
 
REST API Design & Development
REST API Design & DevelopmentREST API Design & Development
REST API Design & Development
 
Rest api standards and best practices
Rest api standards and best practicesRest api standards and best practices
Rest api standards and best practices
 
Introduction to Spring Boot
Introduction to Spring BootIntroduction to Spring Boot
Introduction to Spring Boot
 
API for Beginners
API for BeginnersAPI for Beginners
API for Beginners
 
Java concurrency - Thread pools
Java concurrency - Thread poolsJava concurrency - Thread pools
Java concurrency - Thread pools
 
What is REST API? REST API Concepts and Examples | Edureka
What is REST API? REST API Concepts and Examples | EdurekaWhat is REST API? REST API Concepts and Examples | Edureka
What is REST API? REST API Concepts and Examples | Edureka
 
Introduction to Spring Boot
Introduction to Spring BootIntroduction to Spring Boot
Introduction to Spring Boot
 
Asynchronous JavaScript & XML (AJAX)
Asynchronous JavaScript & XML (AJAX)Asynchronous JavaScript & XML (AJAX)
Asynchronous JavaScript & XML (AJAX)
 
Design Beautiful REST + JSON APIs
Design Beautiful REST + JSON APIsDesign Beautiful REST + JSON APIs
Design Beautiful REST + JSON APIs
 

Viewers also liked

Impact of Restful Web Architecture on Performance and Scalability
Impact of Restful Web Architecture on Performance and ScalabilityImpact of Restful Web Architecture on Performance and Scalability
Impact of Restful Web Architecture on Performance and ScalabilitySanchit Gera
 
Modularizing RESTful Web Service Management with Aspect Oriented Programming
Modularizing RESTful Web Service Management with Aspect Oriented ProgrammingModularizing RESTful Web Service Management with Aspect Oriented Programming
Modularizing RESTful Web Service Management with Aspect Oriented ProgrammingWidhian Bramantya
 
Testing RESTful web services with REST Assured
Testing RESTful web services with REST AssuredTesting RESTful web services with REST Assured
Testing RESTful web services with REST AssuredBas Dijkstra
 
Restful web services by Sreeni Inturi
Restful web services by Sreeni InturiRestful web services by Sreeni Inturi
Restful web services by Sreeni InturiSreeni I
 
Introduction to Restful Web Services
Introduction to Restful Web ServicesIntroduction to Restful Web Services
Introduction to Restful Web Servicesweili_at_slideshare
 
Eternal sunshine
Eternal sunshineEternal sunshine
Eternal sunshineGreg Brown
 
Restful Web Service
Restful Web ServiceRestful Web Service
Restful Web ServiceBin Cai
 
Rest with java (jax rs) and jersey and swagger
Rest with java (jax rs) and jersey and swaggerRest with java (jax rs) and jersey and swagger
Rest with java (jax rs) and jersey and swaggerKumaraswamy M
 
Introduction to RESTful Web Services
Introduction to RESTful Web ServicesIntroduction to RESTful Web Services
Introduction to RESTful Web ServicesFelipe Dornelas
 
HTTP, JSON, REST e AJAX com AngularJS
HTTP, JSON, REST e AJAX com AngularJSHTTP, JSON, REST e AJAX com AngularJS
HTTP, JSON, REST e AJAX com AngularJSRodrigo Branas
 
Automate WebServices Rest API (testing) using Java
Automate WebServices Rest API (testing) using JavaAutomate WebServices Rest API (testing) using Java
Automate WebServices Rest API (testing) using Javaayman diab
 

Viewers also liked (20)

REST Presentation
REST PresentationREST Presentation
REST Presentation
 
Impact of Restful Web Architecture on Performance and Scalability
Impact of Restful Web Architecture on Performance and ScalabilityImpact of Restful Web Architecture on Performance and Scalability
Impact of Restful Web Architecture on Performance and Scalability
 
Rest application
Rest applicationRest application
Rest application
 
Modularizing RESTful Web Service Management with Aspect Oriented Programming
Modularizing RESTful Web Service Management with Aspect Oriented ProgrammingModularizing RESTful Web Service Management with Aspect Oriented Programming
Modularizing RESTful Web Service Management with Aspect Oriented Programming
 
Testing RESTful web services with REST Assured
Testing RESTful web services with REST AssuredTesting RESTful web services with REST Assured
Testing RESTful web services with REST Assured
 
Restful web services by Sreeni Inturi
Restful web services by Sreeni InturiRestful web services by Sreeni Inturi
Restful web services by Sreeni Inturi
 
RESTful API Design, Second Edition
RESTful API Design, Second EditionRESTful API Design, Second Edition
RESTful API Design, Second Edition
 
JSON and REST
JSON and RESTJSON and REST
JSON and REST
 
Introduction to Restful Web Services
Introduction to Restful Web ServicesIntroduction to Restful Web Services
Introduction to Restful Web Services
 
Eternal sunshine
Eternal sunshineEternal sunshine
Eternal sunshine
 
Restful Web Service
Restful Web ServiceRestful Web Service
Restful Web Service
 
Rest with java (jax rs) and jersey and swagger
Rest with java (jax rs) and jersey and swaggerRest with java (jax rs) and jersey and swagger
Rest with java (jax rs) and jersey and swagger
 
REST presentation
REST presentationREST presentation
REST presentation
 
RAML
RAMLRAML
RAML
 
Implementation advantages of rest
Implementation advantages of restImplementation advantages of rest
Implementation advantages of rest
 
Introduction to RESTful Web Services
Introduction to RESTful Web ServicesIntroduction to RESTful Web Services
Introduction to RESTful Web Services
 
Rest Vs Soap Yawn2289
Rest Vs Soap Yawn2289Rest Vs Soap Yawn2289
Rest Vs Soap Yawn2289
 
RESTful Web Services
RESTful Web ServicesRESTful Web Services
RESTful Web Services
 
HTTP, JSON, REST e AJAX com AngularJS
HTTP, JSON, REST e AJAX com AngularJSHTTP, JSON, REST e AJAX com AngularJS
HTTP, JSON, REST e AJAX com AngularJS
 
Automate WebServices Rest API (testing) using Java
Automate WebServices Rest API (testing) using JavaAutomate WebServices Rest API (testing) using Java
Automate WebServices Rest API (testing) using Java
 

Similar to Rest presentation

JAX-RS 2.0 and OData
JAX-RS 2.0 and ODataJAX-RS 2.0 and OData
JAX-RS 2.0 and ODataAnil Allewar
 
Building RESTful applications using Spring MVC
Building RESTful applications using Spring MVCBuilding RESTful applications using Spring MVC
Building RESTful applications using Spring MVCIndicThreads
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiTiago Knoch
 
Rest WebAPI with OData
Rest WebAPI with ODataRest WebAPI with OData
Rest WebAPI with ODataMahek Merchant
 
RESTful for opentravel.org by HP
RESTful for opentravel.org by HPRESTful for opentravel.org by HP
RESTful for opentravel.org by HPRoni Schuetz
 
Network Device Database Management with REST using Jersey
Network Device Database Management with REST using JerseyNetwork Device Database Management with REST using Jersey
Network Device Database Management with REST using JerseyPayal Jain
 
REST API Recommendations
REST API RecommendationsREST API Recommendations
REST API RecommendationsJeelani Shaik
 
An Introduction To Java Web Technology
An Introduction To Java Web TechnologyAn Introduction To Java Web Technology
An Introduction To Java Web Technologyvikram singh
 
Webservices Testing PPT.pdf
Webservices Testing PPT.pdfWebservices Testing PPT.pdf
Webservices Testing PPT.pdfAbhishekDhotre4
 
Android App Development 06 : Network &amp; Web Services
Android App Development 06 : Network &amp; Web ServicesAndroid App Development 06 : Network &amp; Web Services
Android App Development 06 : Network &amp; Web ServicesAnuchit Chalothorn
 
Web Tech Java Servlet Update1
Web Tech   Java Servlet Update1Web Tech   Java Servlet Update1
Web Tech Java Servlet Update1vikram singh
 
OpenTravel Advisory Forum 2012 REST XML Resources
OpenTravel Advisory Forum 2012 REST XML ResourcesOpenTravel Advisory Forum 2012 REST XML Resources
OpenTravel Advisory Forum 2012 REST XML ResourcesOpenTravel Alliance
 
Automated testing web services - part 1
Automated testing web services - part 1Automated testing web services - part 1
Automated testing web services - part 1Aleh Struneuski
 
REST & RESTful Web Service
REST & RESTful Web ServiceREST & RESTful Web Service
REST & RESTful Web ServiceHoan Vu Tran
 

Similar to Rest presentation (20)

JAX-RS 2.0 and OData
JAX-RS 2.0 and ODataJAX-RS 2.0 and OData
JAX-RS 2.0 and OData
 
Building RESTful applications using Spring MVC
Building RESTful applications using Spring MVCBuilding RESTful applications using Spring MVC
Building RESTful applications using Spring MVC
 
Soap and Rest
Soap and RestSoap and Rest
Soap and Rest
 
Rest with Spring
Rest with SpringRest with Spring
Rest with Spring
 
Basics Of Servlet
Basics Of ServletBasics Of Servlet
Basics Of Servlet
 
RESTful Web Services
RESTful Web ServicesRESTful Web Services
RESTful Web Services
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web api
 
Rest WebAPI with OData
Rest WebAPI with ODataRest WebAPI with OData
Rest WebAPI with OData
 
RESTful for opentravel.org by HP
RESTful for opentravel.org by HPRESTful for opentravel.org by HP
RESTful for opentravel.org by HP
 
Network Device Database Management with REST using Jersey
Network Device Database Management with REST using JerseyNetwork Device Database Management with REST using Jersey
Network Device Database Management with REST using Jersey
 
REST API Recommendations
REST API RecommendationsREST API Recommendations
REST API Recommendations
 
An Introduction To Java Web Technology
An Introduction To Java Web TechnologyAn Introduction To Java Web Technology
An Introduction To Java Web Technology
 
Webservices Testing PPT.pdf
Webservices Testing PPT.pdfWebservices Testing PPT.pdf
Webservices Testing PPT.pdf
 
Android App Development 06 : Network &amp; Web Services
Android App Development 06 : Network &amp; Web ServicesAndroid App Development 06 : Network &amp; Web Services
Android App Development 06 : Network &amp; Web Services
 
Web Tech Java Servlet Update1
Web Tech   Java Servlet Update1Web Tech   Java Servlet Update1
Web Tech Java Servlet Update1
 
OpenTravel Advisory Forum 2012 REST XML Resources
OpenTravel Advisory Forum 2012 REST XML ResourcesOpenTravel Advisory Forum 2012 REST XML Resources
OpenTravel Advisory Forum 2012 REST XML Resources
 
Automated testing web services - part 1
Automated testing web services - part 1Automated testing web services - part 1
Automated testing web services - part 1
 
Servlet
Servlet Servlet
Servlet
 
RESTful Web Services
RESTful Web ServicesRESTful Web Services
RESTful Web Services
 
REST & RESTful Web Service
REST & RESTful Web ServiceREST & RESTful Web Service
REST & RESTful Web Service
 

Rest presentation

  • 2. We are talking about …… 1. Introduction • Webservices, SOAP,vs REST 2. Spring – Rest, JSON • REST using Spring • Annotations • REST example with Spring
  • 3. Introduction 1. Webservices 2. SOAP 3. What is REST? 4. SOAP vs REST 5. REST in Detail • Frameworks, • HTTP Methods, • HTTP Headers • Status Code
  • 4. Web Services!! • Exposing existing software over the web (HTTP) • Deployed independent of the OS and Programming Languages • Standardized Protocol • Easily connecting Different Applications i.e., Interoperability • Low Cost of communication Service request validateCreditCard Number-1828282828282828 Server ICICI Bank ebay.com Credit Card Web Service Service Response “Name does not match”
  • 5. SOAP? Simple Object Access Protocol • A simple XML-based protocol to let applications exchange information over HTTP. • WSDL defines endpoint, i/o format, security etc • Example : getUser(userName);
  • 6. What is REST? - Rest Triangle • REST is a new and improved form of web Nouns : services. http://localhost/rest/user/123 • Introduced as SOAP is complex 4 • There isn’t a standard for REST architectures • Expose directory structure-like URIs • Used to expose a public API over the internet to handle CRUD operations on data. • Works on Nouns, Verbs, Content Types Content Types Verbs JSON, XML, HTML…. GET, POST …. GET /server/1234 POST /server?name=SERVER-1&id=1234
  • 7. SOA vs REST – The right webservice GET /user/Robert GET /adduser?name=Robert getUser(userName);
  • 8. Rest Frameworks – List Apache CXF Jersey Rest Easy Restlet Spring MVC
  • 9. HTTP METHODS – CRUD in REST Methods CRUD Example Fetch all or any GET /user/ - Fetch all GET resource GET /user/1 – Fetch User 1 POST Create a Resource POST /user?name=user1&age=20 PUT /user/1? name=changed- PUT Update a Resource user1&age=22 DELETE Delete a Resource DELETE /user/1 Fetch Metainfo as HEAD HEAD /user header Fetch all VERBS OPTIONS OPTIONS /user allowed
  • 10. HTTP Headers - To remember Headers Example Auth:<session-token> Auth:1ajkdsdajsd922j-w8eis0-jssjss Session token by logging in to Atlas Accept:<media Type> accept: application/json – Default Content-Type content-type:application/json Allow: Which method requests are allowed by the server
  • 11. HTTP Status Codes To Remember - Status Codes 200 – OK Successful Return for sync call 307 – Temporarily Moved Redirection 400 – Bad Request Invalid URI, header, request param 401 – Un authorized User not authorized for operation 403 – Forbidden User not allowed to update 404 – Not Found URI Path not available 405 – Method not Method not valid for the path allowed 500 – Internal Server Server Errors Error 503 – Service Server not accessible unavailable
  • 12. Spring 3 - REST • Spring Framework - Introduction • Dispatcher Servlet • Flow - Rest calls in Spring • Annotations for REST • REST Example with Spring
  • 13. Spring Framework • The Spring Framework is an opensource, lightweight, Aspect based Inversion of Control container for the Java platform • helps "wire" different components together. • Spring's REST support is based upon Spring's annotation-based MVC framework • configure your servlet container as you would for a Spring MVC application using Spring's DispatcherServlet. http://static.springsource.org/spring/docs/3.0.0.M3/reference/html/ch18.html
  • 14. Dispatcher Servlet <web-app> <servlet> <servlet-name>rest</servlet-name> <servlet-class> org.springframework.web.servlet.DispatcherServlet </servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>rest</servlet-name> <url-pattern>/rest/*</url-pattern> </servlet-mapping> </web-app>
  • 15. Flow – REST calls in Spring HTTP Request Rest Template Dispatcher Servlet @ResponseBody Client Calls HTTP Response Jackson Converter @Controller @Service DB
  • 16. Rest Template Spring Framework’s RestTemplate provides simple ways to make requests to RESTful services. Allows all REST METHODS – GET, POST, DELETE, PUT, HEAD, OPTIONS
  • 17. Spring Annotations for REST Annotations Usage Example showing Annotations mark the class as a MVC @Controller @Controller controller @RequestMapping(value = “/ilo”) @RequestMappi Maps the request with path public class iLOController ng { @RequestMapping(value = “/server/{id}”, method = RequestMethod.GET) @PathVariable Map variable from the path public @ResponseBody Book getServer(@PathVariable String id) { System.out.println(“------Gettting Server ------”+id); unmarshalls the HTTP response body into a Java } @RequestBody object injected in the …… method. …….. } marshalls return value as @ResponseBody HTTP Response @Configuration Spring Config as a class
  • 18. JSON Javascript Object Notation • Lightweight Data Interchange Format – No tags • Easy to parse and create • Supports objects and Arrays • We use Jackson Framework for JSON conversions JSON Example: { “servers": [ { “name":“server1" , “category":“Blade" }, A Array A { “name":“Server2" , “category":“DL360" }, { “name":“Server3" , “category":“DL480" } ] } Object

Editor's Notes

  1. Webservices running on Linux and jbosscan be consumed from Windows .NET based applicationWebervices makes it easy to talk to each other
  2. Jersey is the JAX-RS Implementation
  3. A HEAD request is just like a GET request, except it asks the server to return the response headers only, The response to a HEAD request must never contain a message body, just the status line and headers.
  4. &quot;Dependency injection is where you design your classes so that they expect an outside actor to directly give them the sub-tools they need to do their jobs before anybody starts asking them to do something.“Annotations – adding metadata to the java elements like class, interfaces, methodsSpring uses annotations as an alternative to XML for declarative configuration
  5. The DispatcherServlet consults the HandleMapping component to dispatch a request to a Controller.The BeanFactory interface provides an advanced configuration mechanism capable of managing objects of any nature. The ApplicationContext interface builds on top of theBeanFactory (it is a sub-interface) and adds other functionality such as easier integration with Spring&apos;s AOP features, message resource handling (for use in internationalization), event propagation, and application-layer specific contexts such as the WebApplicationContext for use in web applications.
  6. What is Jackson,
  7. TODO - What are annotations?