REST-Based Web Services
REST-based web services are implemented using HTTP. They offer a light-weight alternative to the original SOAP and WSDL-based web services.
REST works with resources that are identified with a Uniform Resource Identifier (URI). A resource represents a static or dynamically‑generated web page. REST resources are named with nouns as part of the URI rather than verbs; for example, /customers rather than /getCustomers.
To use REST services, a client sends an HTTP request using the GET, POST, PUT, or DELETE verb.
The traditional HTTP error messages (for example, 200 ‑ OK and 404 ‑ Not found) can be used to indicate whether a request is successful. If a request is successful, information can be returned in Extensible Markup Language (XML), Microsoft JavaScript Object Notation (JSON), NewtonSoft JavaScript Object Notation (JSONN)
-
URL is empty
-
JSON or XML syntax is invalid
-
Called method is not found
-
Called method is protected or it is a type method
-
Data for a method parameter is invalid for its type
-
Data does not match the method signature
-
Type of the object passed does not match the method parameter object type
A server error is returned for other failures such as a logic exception.
Session handling is not performed, so there is no timeout of connections. Additionally, information is not retained between requests from a client. If that is required, it must be provided by the application developer.
For details about the