-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLearning_WebServices.txt
59 lines (39 loc) · 2 KB
/
Learning_WebServices.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
REST - REpresentational State Transfer - No rules to be followed while creating.
SOAP - Set of rules which is needs to follow to create them - WSDL - Contract.
HTTP - Hyper Text Transfer Protocol
REST - Resource based URI - https://localhost:8080/employees/123 - URI /employees/{employeeID}
ContentTypes - text/xml, application/json
REST URI Types -
Instance Resource URI - /employees/{employeeID} - identify specific type of resource
Collections Resource URI - /employees - collecttion type URI - to create employee
Paging - /emplooyees?offset=30&limit10 - Offset - StratingPoint
REST METHODS : GET, POST, DELETE, PUT
PUT - update the message
POST - create new resource
Method IDEMPOTENCE
IDEMPOTENT - GET, DELETE, PUT - these are safe when we call mutiple times
NON - IDEMPOTENT - POST (Duplicate requests)
HTTP Codes : 200 - OK ,201 - Created ,204 - No Content
302 - Found , 304 - Not modified 307 - Temporary
400 - Bad Request , 401 - Unauthorized , 403 - Forbidden , 404 - Not Found
500 - Internal Server Error
HATEOAS - HyperMedia As The Engine Of Application State - providing the concurrent URL's in the main/first request like employeeAddress details like addressuri: "/employees/2/addresses"
"links" : [
{
"href" : "/employees/1",
"rel" : "self"
}
{
"href" : "/employees/1",
"rel" : "addresses"
}
{
"href" : "/employees/1",
"rel" : "worklocations"
}
]
Richardson Maturity Model - There are 3 level
Level One - Swap of POX (Plain Old XML) - SOAP - individual URI for resource
Level Two - Usage of HTTP methods and status codes
Level Three - Response have links that clients can use
REST Library - "JAX-RS" - javax.ws.rs* - Jersey library - Reference Implementation