public class HttpUrlConnectionMessageSender extends AbstractHttpWebServiceMessageSender
WebServiceMessageSender implementation that uses standard J2SE facilities to execute POST requests,
without support for HTTP authentication or advanced configuration options.
Designed for easy subclassing, customizing specific template methods. However, consider CommonsHttpMessageSender for more sophisticated needs: the J2SE HttpURLConnection is rather limited in
its capabilities.HttpURLConnectionlogger| Constructor and Description |
|---|
HttpUrlConnectionMessageSender() |
| Modifier and Type | Method and Description |
|---|---|
WebServiceConnection |
createConnection(URI uri)
Create a new
WebServiceConnection to the specified URI. |
protected void |
prepareConnection(HttpURLConnection connection)
Template method for preparing the given
HttpURLConnection. |
isAcceptGzipEncoding, setAcceptGzipEncoding, supportspublic WebServiceConnection createConnection(URI uri) throws IOException
WebServiceMessageSenderWebServiceConnection to the specified URI.uri - the URI to open a connection toIOException - in case of I/O errorsprotected void prepareConnection(HttpURLConnection connection) throws IOException
HttpURLConnection.
The default implementation prepares the connection for input and output, sets the HTTP method to POST, disables
caching, and sets the Accept-Encoding header to gzip, if applicable.connection - the connection to prepareIOException - in case of I/O errorsCopyright © 2005–2015 The Spring Web Services Framework. All rights reserved.