Network Deployment (Distributed operating systems), v8.0 > End-to-end paths
End-to-end paths for web services - RESTful services
We can use Java™ API for RESTful Web Services (JAX-RS) to develop services that follow Representational State Transfer (REST) principles. RESTful services are based on manipulating resources. Resources can contain static or dynamically updated data. By identifying the resources in the application, you can make the service more useful and easier to develop.
- Implement JAX-RS web applications
We can use Java API for RESTful Web Services (JAX-RS) to develop services that follow Representational State Transfer (REST) principles. Using JAX-RS, development of RESTful services is simplified.
- Use XML content in JAX-RS application requests and responses
XML is a common media format that RESTful services consume and produce. To deserialize and serialize XML, you can represent requests and responses by Java Architecture for XML Binding (JAXB) annotated objects.
- Use JSON content in JAX-RS application requests and responses
JavaScript Object Notation (JSON) is a common media format that RESTful services consume and produce. We can use this lightweight data-interchange format that is based on the object-literal notation of JavaScript to exchange data.
- Use Atom content in JAX-RS application requests and responses
We can use the Atom Syndication Format (Atom) to format web feeds, which communicate news and updates of episodic information about websites. Using Atom content in JAX-RS applications, you can take advantage of web content syndication that provides the same decentralized, dynamic mechanisms for adding new metadata and content supported by RSS, but does so in a way that helps protect core interoperability between implementations.
- Use custom entity formats
Even though the Java API for RESTful Web Services (JAX-RS) runtime environment includes several entity providers for handling serialization from and deserialization to Java types, it does not support all possible media types. We can develop a custom entity provider to handle binding Java types to message bodies.
- Use content negotiation to serve multiple content types in JAX-RS applications
One of the advantages of RESTful applications is the ability to return different representations of resources. With Representational State Transfer (REST), clients and servers can exchange resources of the same media type or use differing media types. Content negotiation enables clients and servers to agree on the content format used to exchange data.
- Use JAX-RS context objects to obtain more information about requests
Java API for RESTful Web Services (JAX-RS) provides different types of context to resource classes and providers. We can use context objects to access request information such as discovering the HTTP headers that are sent as part of the request. Context objects also provide convenience methods for evaluating a request and building an appropriate response.
- Implement RESTful views of EJB applications using JAX-RS
If we have enterprise JavaBeans (EJB) applications, you can expose a RESTful interface to the enterprise bean using Java API for RESTful Web Services (JAX-RS). By implementing JAX-RS annotated enterprise beans, you keep the EJB functionality including transaction support, injection of Java EE components and resources, and other EJB session bean capabilities.
- Use Java contexts and dependency injection with JAX-RS
Java API for RESTful Web Services (JAX-RS) root resources and providers can be used in a Java Contexts and Dependency Injection (JCDI) enabled WAR. Simply add a valid WEB-INF/beans.xml file to your WAR file and any JAX-RS root resources and providers that are valid JCDI beans can use JCDI functionality.
- Use handlers to enhance request and response processing
We can implement handlers on the server-side of a Java API for RESTful Web Services (JAX-RS) application to enhance request and response processing.
- Use multipart content in JAX-RS application requests and responses
Use multipart messages, servers and clients can transmit multiple messages using a single message. Multipart messages are useful when both the client and server need to send multiple requests but want to save the cost of sending and receiving entire HTTP request and responses for each part.
- Use multipart/form-data content in JAX-RS application requests and responses
A frequently used content type for submitting files through an HTML form is multipart/form-data. The IBM Java API for RESTful Web Services (JAX-RS) implementation greatly simplifies the processing of such data by automatically splitting the parts and automatically decoding them. If such automatic processing is not desired, the resource may instead receive the parts in an object so processing of the parts is under the complete control of the resource method.
- Implement secure JAX-RS applications
The IBM Java API for RESTful Web Services (JAX-RS) runtime environment is driven a servlet derived from the Apache Wink project. Within the WAS environment, the lifecycle of servlets is managed in the web container. Therefore, the security services offered by the web container are applicable to REST resources that are deployed in WAS.
- Use WADL to generate service documentation
Web Application Description Language (WADL) is a description language for HTTP-based applications. It is currently a World Wide Web Consortium (W3C) Member Submission. WADL can be used by programs to give information about the service in a machine-processable method. For instance, you can use an Extensible Stylesheet Transformation (XSLT) document to transform the WADL documentation by using a custom XSLT and a XSLT processor.
- Use the Apache Wink REST client inside server applications to issue requests
We can use the Apache Wink REST client as a client that can be run to send requests to your JAX-RS application.
- Use the Apache Wink REST client as a stand-alone thin client
Instead of using the Apache Wink REST client inside a server application, you can use the Thin Client for JAX-RS provided with WAS as a stand-alone thin client to send requests to your RESTful service. The Thin Client for JAX-RS is a stand-alone Java SE 6 client environment that enables running unmanaged JAX-RS RESTful web services client applications in a non-WebSphere environment to invoke JAX-RS RESTful web services that are hosted by the application server.
End-to-end paths for web services
End-to-end paths for web services - Addressing (WS-Addressing)
End-to-end paths for web services - Reliable messaging (WS-ReliableMessaging)
End-to-end paths for web services - Policy (WS-Policy)
End-to-end paths for web services - UDDI registry
End-to-end paths for web services - Resource framework (WSRF)
End-to-end paths for web services - Security (WS-Security)
End-to-end paths for web services - Transaction support (WS-Transaction)
End-to-end paths for web services - Transports