Presentation is loading. Please wait.

Presentation is loading. Please wait.

Or, Hey can’t we just do it using HTTP for the envelope?

Similar presentations


Presentation on theme: "Or, Hey can’t we just do it using HTTP for the envelope?"— Presentation transcript:

1 Or, Hey can’t we just do it using HTTP for the envelope?

2 jaxen@jaxen.net jaxen@jaxen.net I write code and do other stuff

3 Real quick, let’s go over what REST is and a couple background technologies. Stay away from rabbit holes!

4 * EDI * Internet – HTTP * Web Services * SOAP – S? Object Access Protocol * REST – REpresentational State Transfer * Stateless * Maps CRUD to HTTP Methods * Multiple data formats (Most Popular - XML, JSON) * No RPC * WADL

5 * HTTP 1.1 (http 2.0, it does matter for this subject) * STATELESS – Request / Response * Text Protocol * Requests * URI – protocol://server.domain.tld/path/resource?query=string&name=value * Methods * No Data in request body – GET, DELETE, head, option, connect * Data in request body – POST, PUT, patch * Headers – Host is required * Content-type – application/xml, application/json * Authentication * JSessionId – don’t care

6 * Response * Status Codes * 200 – Success * 300 – Redirect * 400 – Client Issue * 500 – Server Issue * Header * Body

7 * XML- EXtensible Markup Language * around Tags * </ end Tag * Nesting * Elements * Attributes

8 * JSON - JavaScript Object Notation * Lightweight * {Name : Value } * [ array ]

9 * The Server Really Doesn’t Care!

10 The way to learn code is to write code!

11 * Eclipse Netbeans * Jersey – JAX-RS reference implementation * Tomcat 8.0 * JDK 8 * Chrome – With JSON plugin * MariaDB * SoapUI – SmartBear * This is not the only tool set available!

12 * Java Architecture for XML Binding * Turn Objects into XML and vise-versa * Marshall and Unmarshall * Annotation Based * Can generate classes from a Schema

13 * JAXBContext –jaxb.index / ObjectFactory * Marshaller – marshal to SAX, DOM, OutputStream, Writer * Annontations * XMLRootElement * XmlAccessorType * XmlElementWrapper * XmlElement * XmlList * XmlAttribute

14 * Java API for RESTful Web Services * Uses JAXB * Application / ResourceConfig * Resources * Client * Filters / Interceptors * Web Application Description Language (WADL)

15 * Annotations * Path * Method GET, POST, PUT, DELETE, HEAD * Param, PathParam, QueryParam * Consumes, Produces * Provider

16 * Client or Server Side * Inbound or Outbound * Filters modify Header, Entity, Request/Response Parameters * Interceptors modify input / output Streams


Download ppt "Or, Hey can’t we just do it using HTTP for the envelope?"

Similar presentations


Ads by Google