uCosminexus Application Server, Web Service Development Guide
A client API for RESTful Web Services wraps the HttpURLConnection/HttpsURLConnection class and the JDK executes the actual HTTP communication. Hereafter, unless clearly specified, HttpURLConnection/HttpsURLConnection is collectively called HttpURLConnection.
The following figure shows the mechanism.
The following processes are executed in point 1. and point 2. in the figure:
A client API for RESTful Web Services mutually marshals and unmarshals a Java object and an HTTP request by using the entity body reader and entity body writer. A user program, therefore, need not directly use an input stream and output stream.
The client APIs for RESTful Web Services delegate the processing of a transport layer to HttpURLConnection. The various built-in methods necessary for setting properties and HTTP headers are available; however, set the same values specified in the built-in methods to HttpURLConnection. For this reason, the JDK executes the processing that uses values specified in the actual HTTP communication and built-in methods.
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.