Class HttpExchangeConnection

java.lang.Object
org.springframework.ws.transport.AbstractWebServiceConnection
org.springframework.ws.transport.AbstractReceiverConnection
org.springframework.ws.transport.http.HttpExchangeConnection
All Implemented Interfaces:
AutoCloseable, org.springframework.ws.transport.EndpointAwareWebServiceConnection, org.springframework.ws.transport.FaultAwareWebServiceConnection, org.springframework.ws.transport.HeadersAwareReceiverWebServiceConnection, org.springframework.ws.transport.WebServiceConnection

public class HttpExchangeConnection extends org.springframework.ws.transport.AbstractReceiverConnection implements org.springframework.ws.transport.EndpointAwareWebServiceConnection, org.springframework.ws.transport.FaultAwareWebServiceConnection
Implementation of WebServiceConnection that is based on the Java 6 HttpServer HttpExchange.
Since:
1.5.0
Author:
Arjen Poutsma, Greg Turnquist
  • Constructor Details

    • HttpExchangeConnection

      protected HttpExchangeConnection(com.sun.net.httpserver.HttpExchange httpExchange)
      Constructs a new exchange connection with the given HttpExchange.
  • Method Details

    • getHttpExchange

      public com.sun.net.httpserver.HttpExchange getHttpExchange()
      Returns the HttpExchange for this connection.
    • getUri

      public URI getUri() throws URISyntaxException
      Specified by:
      getUri in interface org.springframework.ws.transport.WebServiceConnection
      Throws:
      URISyntaxException
    • endpointNotFound

      public void endpointNotFound()
      Specified by:
      endpointNotFound in interface org.springframework.ws.transport.EndpointAwareWebServiceConnection
    • hasError

      public boolean hasError() throws IOException
      Specified by:
      hasError in interface org.springframework.ws.transport.WebServiceConnection
      Throws:
      IOException
    • getErrorMessage

      public String getErrorMessage() throws IOException
      Specified by:
      getErrorMessage in interface org.springframework.ws.transport.WebServiceConnection
      Throws:
      IOException
    • getRequestHeaderNames

      public Iterator<String> getRequestHeaderNames() throws IOException
      Specified by:
      getRequestHeaderNames in interface org.springframework.ws.transport.HeadersAwareReceiverWebServiceConnection
      Throws:
      IOException
    • getRequestHeaders

      public Iterator<String> getRequestHeaders(String name) throws IOException
      Specified by:
      getRequestHeaders in interface org.springframework.ws.transport.HeadersAwareReceiverWebServiceConnection
      Throws:
      IOException
    • getRequestInputStream

      protected InputStream getRequestInputStream() throws IOException
      Specified by:
      getRequestInputStream in class org.springframework.ws.transport.AbstractReceiverConnection
      Throws:
      IOException
    • addResponseHeader

      public void addResponseHeader(String name, String value) throws IOException
      Specified by:
      addResponseHeader in interface org.springframework.ws.transport.HeadersAwareReceiverWebServiceConnection
      Throws:
      IOException
    • getResponseOutputStream

      protected OutputStream getResponseOutputStream() throws IOException
      Specified by:
      getResponseOutputStream in class org.springframework.ws.transport.AbstractReceiverConnection
      Throws:
      IOException
    • onSendAfterWrite

      protected void onSendAfterWrite(org.springframework.ws.WebServiceMessage message) throws IOException
      Overrides:
      onSendAfterWrite in class org.springframework.ws.transport.AbstractWebServiceConnection
      Throws:
      IOException
    • onClose

      public void onClose() throws IOException
      Overrides:
      onClose in class org.springframework.ws.transport.AbstractReceiverConnection
      Throws:
      IOException
    • hasFault

      public boolean hasFault() throws IOException
      Specified by:
      hasFault in interface org.springframework.ws.transport.FaultAwareWebServiceConnection
      Throws:
      IOException
    • setFault

      @Deprecated public void setFault(boolean fault) throws IOException
      Deprecated.
      Specified by:
      setFault in interface org.springframework.ws.transport.FaultAwareWebServiceConnection
      Throws:
      IOException
    • setFaultCode

      public void setFaultCode(QName faultCode) throws IOException
      Specified by:
      setFaultCode in interface org.springframework.ws.transport.FaultAwareWebServiceConnection
      Throws:
      IOException