Class HttpUrlConnectionMessageSender
java.lang.Object
org.springframework.ws.transport.AbstractWebServiceMessageSender<HttpDestinationDescriptor>
org.springframework.ws.transport.http.AbstractHttpWebServiceMessageSender
org.springframework.ws.transport.http.HttpUrlConnectionMessageSender
- All Implemented Interfaces:
WebServiceMessageSender
- Direct Known Subclasses:
HttpsUrlConnectionMessageSender
WebServiceMessageSender implementation that uses standard J2SE facilities to
execute POST requests, without support for HTTP authentication or advanced
configuration options.
Consider HttpComponents5MessageSender for more sophisticated needs: this class
is rather limited in its capabilities.
- Since:
- 1.0.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface WebServiceMessageSender
WebServiceMessageSender.DestinationDescriptor, WebServiceMessageSender.DestinationPolicy<D>, WebServiceMessageSender.UriSource -
Field Summary
Fields inherited from class AbstractHttpWebServiceMessageSender
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateConnection(URI uri) Create a newWebServiceConnectionto the specified URI.protected voidprepareConnection(HttpURLConnection connection) Template method for preparing the givenHttpURLConnection.voidsetConnectionTimeout(Duration connectTimeout) Sets the timeout until a connection is established.voidsetReadTimeout(Duration readTimeout) Set the socket read timeout.Methods inherited from class AbstractHttpWebServiceMessageSender
createDescriptor, defaultChecks, isAcceptGzipEncoding, remoteDefaultChecks, setAcceptGzipEncoding, setAllowDnsResolution, setAllowSiteLocalIpv4Methods inherited from class AbstractWebServiceMessageSender
getDestinationPolicy, setDestinationPolicy, supportsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface WebServiceMessageSender
supports
-
Constructor Details
-
HttpUrlConnectionMessageSender
public HttpUrlConnectionMessageSender()
-
-
Method Details
-
setConnectionTimeout
Sets the timeout until a connection is established.- Parameters:
connectTimeout- the timeout value- Since:
- 3.0.1
- See Also:
-
setReadTimeout
Set the socket read timeout.- Parameters:
readTimeout- the timeout value- Since:
- 3.0.1
- See Also:
-
createConnection
Description copied from interface:WebServiceMessageSenderCreate a newWebServiceConnectionto the specified URI.- Parameters:
uri- the URI to open a connection to- Returns:
- the new connection
- Throws:
IOException- in case of I/O errors
-
prepareConnection
Template method for preparing the givenHttpURLConnection.The default implementation prepares the connection for input and output, sets the HTTP method to POST, disables caching, and sets the
Accept-Encodingheader to gzip, if applicable.- Parameters:
connection- the connection to prepare- Throws:
IOException- in case of I/O errors
-