org.springframework.ws.transport.http
Class WebServiceMessageReceiverHandlerAdapter
java.lang.Object
org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport
org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter
- All Implemented Interfaces:
- InitializingBean, HandlerAdapter
public class WebServiceMessageReceiverHandlerAdapter
- extends WebServiceMessageReceiverObjectSupport
- implements 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:
WebServiceMessageReceiverObjectSupport.setMessageFactory(org.springframework.ws.WebServiceMessageFactory)
,
WebServiceMessageReceiver
,
WebServiceMessageFactory
,
MessageDispatcher
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WebServiceMessageReceiverHandlerAdapter
public WebServiceMessageReceiverHandlerAdapter()
getLastModified
public long getLastModified(HttpServletRequest request,
Object handler)
- Specified by:
getLastModified
in interface HandlerAdapter
handle
public ModelAndView handle(HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse,
Object handler)
throws Exception
- Specified by:
handle
in interface HandlerAdapter
- Throws:
Exception
supports
public boolean supports(Object handler)
- Specified by:
supports
in interface HandlerAdapter
handleNonPostMethod
protected void handleNonPostMethod(HttpServletRequest httpServletRequest,
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 requesthttpServletResponse
- current HTTP responsehandler
- current handler
- Throws:
Exception
handleInvalidXmlException
protected void handleInvalidXmlException(HttpServletRequest httpServletRequest,
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 requesthttpServletResponse
- current HTTP responsehandler
- current handlerex
- the invalid XML exception that resulted in this method being called
- Throws:
Exception
Copyright © 2005-2013 The Spring Web Services Framework. All Rights Reserved.