Package org.springframework.ws.transport
Interface WebServiceConnection
- All Superinterfaces:
 AutoCloseable
- All Known Subinterfaces:
 EndpointAwareWebServiceConnection,FaultAwareWebServiceConnection
- All Known Implementing Classes:
 AbstractHttpSenderConnection,AbstractReceiverConnection,AbstractSenderConnection,AbstractWebServiceConnection,ClientHttpRequestConnection,CommonsHttpConnection,HttpComponents5Connection,HttpComponentsConnection,HttpExchangeConnection,HttpServletConnection,HttpUrlConnection,JdkHttpClientConnection,JmsReceiverConnection,JmsSenderConnection,MailReceiverConnection,MailSenderConnection,XmppReceiverConnection,XmppSenderConnection
Represents a point-to-point connection that a client can use for sending 
WebServiceMessage objects directly
 to a remote party.
 
 A WebServiceConnection can be obtained using a WebServiceMessageSender.
- Since:
 - 1.0.0
 - Author:
 - Arjen Poutsma
 - See Also:
 
- 
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this connection.Returns the error message.getUri()Returns the URI for this connection.booleanhasError()Indicates whether this connection has an error.receive(WebServiceMessageFactory messageFactory) Receives a message using the givenWebServiceMessageFactory.voidsend(WebServiceMessage message) Sends the given message using this connection. 
- 
Method Details
- 
send
Sends the given message using this connection.- Parameters:
 message- the message to be sent- Throws:
 IOException- in case of I/O errors
 - 
receive
Receives a message using the givenWebServiceMessageFactory. This method blocks until it receives, or returnsnullwhen no message is received.- Parameters:
 messageFactory- the message factory used for reading messages- Returns:
 - the read message, or 
nullif no message received - Throws:
 IOException- in case of I/O errors
 - 
getUri
Returns the URI for this connection.- Throws:
 URISyntaxException
 - 
hasError
Indicates whether this connection has an error. Typically, error detection is done by inspecting connection error codes, etc.- Returns:
 trueif this connection has an error;falseotherwise.- Throws:
 IOException
 - 
getErrorMessage
Returns the error message.- Returns:
 - the connection error message, if any; returns 
nullwhen no error is present - Throws:
 IOException- See Also:
 
 - 
close
Closes this connection.Once a connection has been closed, it is not available for further use. A new connection needs to be created.
- Specified by:
 closein interfaceAutoCloseable- Throws:
 IOException- if an I/O error occurs when closing this connection
 
 -