|
Spring Web Services Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.ws.transport.AbstractWebServiceConnection
org.springframework.ws.transport.AbstractReceiverConnection
org.springframework.ws.transport.http.HttpServletConnection
public class HttpServletConnection
Implementation of WebServiceConnection
that is based on the Servlet API.
Constructor Summary | |
---|---|
protected |
HttpServletConnection(HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse)
Constructs a new servlet connection with the given HttpServletRequest and
HttpServletResponse . |
Method Summary | |
---|---|
protected void |
addResponseHeader(String name,
String value)
Adds a response header with the given name and value. |
void |
endpointNotFound()
Called when an endpoint is not found. |
String |
getErrorMessage()
Returns the error message. |
HttpServletRequest |
getHttpServletRequest()
Returns the HttpServletRequest for this connection. |
HttpServletResponse |
getHttpServletResponse()
Returns the HttpServletResponse for this connection. |
protected Iterator |
getRequestHeaderNames()
Returns an iteration over all the header names this request contains. |
protected Iterator |
getRequestHeaders(String name)
Returns an iteration over all the string values of the specified header. |
protected InputStream |
getRequestInputStream()
Returns the input stream to read the response from. |
protected OutputStream |
getResponseOutputStream()
Returns the output stream to write the request to. |
boolean |
hasError()
Indicates whether this connection has an error. |
boolean |
hasFault()
Indicates whether this connection received a fault. |
void |
onClose()
Template method invoked from AbstractReceiverConnection.close() . |
protected void |
onSendAfterWrite(WebServiceMessage message)
Called after the given message has been written to the TransportOutputStream . |
void |
setFault(boolean fault)
Sets whether this connection will send a fault. |
Methods inherited from class org.springframework.ws.transport.AbstractReceiverConnection |
---|
close, createTransportInputStream, createTransportOutputStream |
Methods inherited from class org.springframework.ws.transport.AbstractWebServiceConnection |
---|
onReceiveAfterRead, onReceiveBeforeRead, onSendBeforeWrite, receive, send |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.springframework.ws.transport.WebServiceConnection |
---|
close, receive, send |
Methods inherited from interface org.springframework.ws.transport.WebServiceConnection |
---|
close, receive, send |
Constructor Detail |
---|
protected HttpServletConnection(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
HttpServletRequest
and
HttpServletResponse
.
Method Detail |
---|
public HttpServletRequest getHttpServletRequest()
HttpServletRequest
for this connection.
public HttpServletResponse getHttpServletResponse()
HttpServletResponse
for this connection.
public void endpointNotFound()
EndpointAwareWebServiceConnection
endpointNotFound
in interface EndpointAwareWebServiceConnection
public boolean hasError() throws IOException
WebServiceConnection
hasError
in interface WebServiceConnection
true
if this connection has an error; false
otherwise.
IOException
public String getErrorMessage() throws IOException
WebServiceConnection
getErrorMessage
in interface WebServiceConnection
null
when no error is present
IOException
WebServiceConnection.hasError()
protected Iterator getRequestHeaderNames() throws IOException
AbstractReceiverConnection
Iterator
if
there areno headers.
getRequestHeaderNames
in class AbstractReceiverConnection
IOException
protected Iterator getRequestHeaders(String name) throws IOException
AbstractReceiverConnection
Iterator
if there are no headers of the specified name.
getRequestHeaders
in class AbstractReceiverConnection
IOException
protected InputStream getRequestInputStream() throws IOException
AbstractReceiverConnection
getRequestInputStream
in class AbstractReceiverConnection
IOException
protected void addResponseHeader(String name, String value) throws IOException
AbstractReceiverConnection
addResponseHeader
in class AbstractReceiverConnection
name
- the name of the headervalue
- the value of the header
IOException
protected OutputStream getResponseOutputStream() throws IOException
AbstractReceiverConnection
getResponseOutputStream
in class AbstractReceiverConnection
IOException
protected void onSendAfterWrite(WebServiceMessage message) throws IOException
AbstractWebServiceConnection
TransportOutputStream
. Called from AbstractWebServiceConnection.send(WebServiceMessage)
.
Default implementation does nothing.
onSendAfterWrite
in class AbstractWebServiceConnection
message
- the message
IOException
- when an I/O exception occurspublic void onClose() throws IOException
AbstractReceiverConnection
AbstractReceiverConnection.close()
. Default implementation is empty.
onClose
in class AbstractReceiverConnection
IOException
- if an I/O error occurs when closing this connectionpublic boolean hasFault() throws IOException
FaultAwareWebServiceConnection
hasFault
in interface FaultAwareWebServiceConnection
true
if this connection received a fault; false
otherwise.
IOException
- in case of I/O errorspublic void setFault(boolean fault) throws IOException
FaultAwareWebServiceConnection
setFault
in interface FaultAwareWebServiceConnection
fault
- true
if this will send a fault; false
otherwise.
IOException
- in case of I/O errors
|
Spring Web Services Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |