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), or NewtonSoft JavaScript Object Notation (JSONN) format. REST services exception handling identifies which part of the service is responsible for an unsuccessful request and returns to the client an HTTP error 400 (bad request from the user) or 500 (server error). A 400 error is returned, for example, if the:

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 JadeJson class, which is a transient‑only Object subclass that provides standalone JSON functionality that is independent of the Representational State Transfer (REST) Application Programming Interface (API), see Volume 1 of the JADE Encyclopaedia of Classes. The JadeJson class enables you to create, load, unload, and parse JSON in the same way you can with XML.