Class WebServiceMessageReceiverHandlerAdapter

java.lang.Object
org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport
org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, org.springframework.web.servlet.HandlerAdapter

public class WebServiceMessageReceiverHandlerAdapter extends WebServiceMessageReceiverObjectSupport implements org.springframework.web.servlet.HandlerAdapter
Adapter to use the WebServiceMessageReceiver interface with the generic DispatcherServlet. Requires a WebServiceMessageFactory which is used to convert the incoming HttpServletRequest into a WebServiceMessage, and passes that context to the mapped WebServiceMessageReceiver. If a response is created, that is sent via the HttpServletResponse.

Note that the MessageDispatcher implements the WebServiceMessageReceiver interface, enabling this adapter to function as a gateway to further message handling logic.

Since:
1.0.0
Author:
Arjen Poutsma
See Also:
  • Constructor Details

    • WebServiceMessageReceiverHandlerAdapter

      public WebServiceMessageReceiverHandlerAdapter()
  • Method Details

    • getLastModified

      public long getLastModified(jakarta.servlet.http.HttpServletRequest request, Object handler)
      Specified by:
      getLastModified in interface org.springframework.web.servlet.HandlerAdapter
    • handle

      public org.springframework.web.servlet.ModelAndView handle(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse, Object handler) throws Exception
      Specified by:
      handle in interface org.springframework.web.servlet.HandlerAdapter
      Throws:
      Exception
    • supports

      public boolean supports(Object handler)
      Specified by:
      supports in interface org.springframework.web.servlet.HandlerAdapter
    • handleNonPostMethod

      protected void handleNonPostMethod(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse, Object handler) throws Exception
      Template method that is invoked when the request method is not POST. Called from handle(HttpServletRequest, HttpServletResponse, Object).

      Default implementation set the response status to 405: Method Not Allowed. Can be overridden in subclasses.

      Parameters:
      httpServletRequest - current HTTP request
      httpServletResponse - current HTTP response
      handler - current handler
      Throws:
      Exception
    • handleInvalidXmlException

      protected void handleInvalidXmlException(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse, Object handler, InvalidXmlException ex) throws Exception
      Template method that is invoked when parsing the request results in a InvalidXmlException. Called from handle(HttpServletRequest, HttpServletResponse, Object).

      Default implementation set the response status to 400: Bad Request. Can be overridden in subclasses.

      Parameters:
      httpServletRequest - current HTTP request
      httpServletResponse - current HTTP response
      handler - current handler
      ex - the invalid XML exception that resulted in this method being called
      Throws:
      Exception