public class WebServiceMessageReceiverHandlerAdapter extends WebServiceMessageReceiverObjectSupport implements HandlerAdapter
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.
WebServiceMessageReceiverObjectSupport.setMessageFactory(org.springframework.ws.WebServiceMessageFactory)
,
WebServiceMessageReceiver
,
WebServiceMessageFactory
,
MessageDispatcher
logger
Constructor and Description |
---|
WebServiceMessageReceiverHandlerAdapter() |
Modifier and Type | Method and Description |
---|---|
long |
getLastModified(HttpServletRequest request,
Object handler) |
ModelAndView |
handle(HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse,
Object handler) |
protected void |
handleInvalidXmlException(HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse,
Object handler,
InvalidXmlException ex)
Template method that is invoked when parsing the request results in a
InvalidXmlException . |
protected void |
handleNonPostMethod(HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse,
Object handler)
Template method that is invoked when the request method is not
POST . |
boolean |
supports(Object handler) |
afterPropertiesSet, getMessageFactory, handleConnection, handleNoEndpointFoundException, setMessageFactory
public WebServiceMessageReceiverHandlerAdapter()
public long getLastModified(HttpServletRequest request, Object handler)
getLastModified
in interface HandlerAdapter
public ModelAndView handle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object handler) throws Exception
handle
in interface HandlerAdapter
Exception
public boolean supports(Object handler)
supports
in interface HandlerAdapter
protected void handleNonPostMethod(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object handler) throws Exception
POST
. Called from handle(HttpServletRequest, HttpServletResponse, Object)
.
Default implementation set the response status to 405: Method Not Allowed. Can be overridden in subclasses.
httpServletRequest
- current HTTP requesthttpServletResponse
- current HTTP responsehandler
- current handlerException
protected void handleInvalidXmlException(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object handler, InvalidXmlException ex) throws Exception
InvalidXmlException
. Called from
handle(HttpServletRequest, HttpServletResponse, Object)
.
Default implementation set the response status to 400: Bad Request. Can be overridden in subclasses.
httpServletRequest
- current HTTP requesthttpServletResponse
- current HTTP responsehandler
- current handlerex
- the invalid XML exception that resulted in this method being calledException