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:
-
Field Summary
Fields inherited from class org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
getLastModified
(jakarta.servlet.http.HttpServletRequest request, Object handler) org.springframework.web.servlet.ModelAndView
handle
(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse, Object handler) protected void
handleInvalidXmlException
(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse, Object handler, InvalidXmlException ex) Template method that is invoked when parsing the request results in aInvalidXmlException
.protected void
handleNonPostMethod
(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse, Object handler) Template method that is invoked when the request method is notPOST
.boolean
Methods inherited from class org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport
afterPropertiesSet, getMessageFactory, handleConnection, handleNoEndpointFoundException, setMessageFactory
-
Constructor Details
-
WebServiceMessageReceiverHandlerAdapter
public WebServiceMessageReceiverHandlerAdapter()
-
-
Method Details
-
getLastModified
- Specified by:
getLastModified
in interfaceorg.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 interfaceorg.springframework.web.servlet.HandlerAdapter
- Throws:
Exception
-
supports
- Specified by:
supports
in interfaceorg.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 notPOST
. Called fromhandle(HttpServletRequest, HttpServletResponse, Object)
.Default implementation set the response status to 405: Method Not Allowed. Can be overridden in subclasses.
- Parameters:
httpServletRequest
- current HTTP requesthttpServletResponse
- current HTTP responsehandler
- 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 aInvalidXmlException
. Called fromhandle(HttpServletRequest, HttpServletResponse, Object)
.Default implementation set the response status to 400: Bad Request. Can be overridden in subclasses.
- Parameters:
httpServletRequest
- current HTTP requesthttpServletResponse
- current HTTP responsehandler
- current handlerex
- the invalid XML exception that resulted in this method being called- Throws:
Exception
-