|
Spring Web Services Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.GenericServlet javax.servlet.http.HttpServlet org.springframework.web.servlet.HttpServletBean org.springframework.web.servlet.FrameworkServlet org.springframework.ws.transport.http.MessageDispatcherServlet
public class MessageDispatcherServlet
Servlet for simplified dispatching of Web service messages.
This servlet is a convenient alternative to the standard Spring-MVCDispatcherServlet
with separate WebServiceMessageReceiverHandlerAdapter
, MessageDispatcher
, and WsdlDefinitionHandlerAdapter
instances.
This servlet automatically detects EndpointAdapters
, EndpointMappings
, and EndpointExceptionResolvers
by type.
This servlet also automatically detects any WsdlDefinition
defined in its application context. This WSDL is
exposed under the bean name: for example, a WsdlDefinition
bean named 'echo
' will be
exposed as echo.wsdl
in this servlet's context: http://localhost:8080/spring-ws/echo.wsdl
.
When the transformWsdlLocations
init-param is set to true
in this servlet's configuration
in web.xml
, all location
attributes in the WSDL definitions will reflect the URL of the
incoming request.
DispatcherServlet
,
MessageDispatcher
,
WebServiceMessageReceiverHandlerAdapter
,
Serialized FormField Summary | |
---|---|
static String |
DEFAULT_MESSAGE_FACTORY_BEAN_NAME
Well-known name for the WebServiceMessageFactory bean in the bean factory for this namespace. |
static String |
DEFAULT_MESSAGE_RECEIVER_BEAN_NAME
Well-known name for the WebServiceMessageReceiver object in the bean factory for this namespace. |
static String |
DEFAULT_MESSAGE_RECEIVER_HANDLER_ADAPTER_BEAN_NAME
Well-known name for the WebServiceMessageReceiverHandlerAdapter object in the bean factory for this
namespace. |
static String |
DEFAULT_WSDL_DEFINITION_HANDLER_ADAPTER_BEAN_NAME
Well-known name for the WsdlDefinitionHandlerAdapter object in the bean factory for this namespace. |
static String |
DEFAULT_XSD_SCHEMA_HANDLER_ADAPTER_BEAN_NAME
Well-known name for the XsdSchemaHandlerAdapter object in the bean factory for this namespace. |
Fields inherited from class org.springframework.web.servlet.FrameworkServlet |
---|
DEFAULT_CONTEXT_CLASS, DEFAULT_NAMESPACE_SUFFIX, SERVLET_CONTEXT_PREFIX |
Fields inherited from class org.springframework.web.servlet.HttpServletBean |
---|
logger |
Constructor Summary | |
---|---|
MessageDispatcherServlet()
Public constructor, necessary for some Web application servers. |
Method Summary | |
---|---|
protected void |
doService(HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse)
|
protected long |
getLastModified(HttpServletRequest httpServletRequest)
|
String |
getMessageFactoryBeanName()
Returns the bean name used to lookup a WebServiceMessageFactory . |
protected WebServiceMessageReceiver |
getMessageReceiver()
Returns the WebServiceMessageReceiver used by this servlet. |
String |
getMessageReceiverBeanName()
Returns the bean name used to lookup a WebServiceMessageReceiver . |
String |
getMessageReceiverHandlerAdapterBeanName()
Returns the bean name used to lookup a WebServiceMessageReceiverHandlerAdapter . |
protected WsdlDefinition |
getWsdlDefinition(HttpServletRequest request)
Determines the WsdlDefinition for a given request, or null if none is found. |
String |
getWsdlDefinitionHandlerAdapterBeanName()
Returns the bean name used to lookup a WsdlDefinitionHandlerAdapter . |
protected XsdSchema |
getXsdSchema(HttpServletRequest request)
Determines the XsdSchema for a given request, or null if none is found. |
String |
getXsdSchemaHandlerAdapterBeanName()
Returns the bean name used to lookup a XsdSchemaHandlerAdapter . |
protected void |
initFrameworkServlet()
|
boolean |
isTransformWsdlLocations()
Indicates whether relative address locations in the WSDL are to be transformed using the request URI of the incoming HttpServletRequest . |
void |
setMessageFactoryBeanName(String messageFactoryBeanName)
Sets the bean name used to lookup a WebServiceMessageFactory . |
void |
setMessageReceiverBeanName(String messageReceiverBeanName)
Sets the bean name used to lookup a WebServiceMessageReceiver . |
void |
setMessageReceiverHandlerAdapterBeanName(String messageReceiverHandlerAdapterBeanName)
Sets the bean name used to lookup a WebServiceMessageReceiverHandlerAdapter . |
void |
setTransformWsdlLocations(boolean transformWsdlLocations)
Sets whether relative address locations in the WSDL are to be transformed using the request URI of the incoming HttpServletRequest . |
void |
setWsdlDefinitionHandlerAdapterBeanName(String wsdlDefinitionHandlerAdapterBeanName)
Sets the bean name used to lookup a WsdlDefinitionHandlerAdapter . |
void |
setXsdSchemaHandlerAdapterBeanName(String xsdSchemaHandlerAdapterBeanName)
Sets the bean name used to lookup a XsdSchemaHandlerAdapter . |
Methods inherited from class org.springframework.web.servlet.HttpServletBean |
---|
addRequiredProperty, getServletContext, getServletName, init, initBeanWrapper |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doHead, service, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
getInitParameter, getInitParameterNames, getServletConfig, getServletInfo, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_MESSAGE_FACTORY_BEAN_NAME
WebServiceMessageFactory
bean in the bean factory for this namespace.
public static final String DEFAULT_MESSAGE_RECEIVER_BEAN_NAME
WebServiceMessageReceiver
object in the bean factory for this namespace.
public static final String DEFAULT_MESSAGE_RECEIVER_HANDLER_ADAPTER_BEAN_NAME
WebServiceMessageReceiverHandlerAdapter
object in the bean factory for this
namespace.
public static final String DEFAULT_WSDL_DEFINITION_HANDLER_ADAPTER_BEAN_NAME
WsdlDefinitionHandlerAdapter
object in the bean factory for this namespace.
public static final String DEFAULT_XSD_SCHEMA_HANDLER_ADAPTER_BEAN_NAME
XsdSchemaHandlerAdapter
object in the bean factory for this namespace.
Constructor Detail |
---|
public MessageDispatcherServlet()
Method Detail |
---|
public String getMessageFactoryBeanName()
WebServiceMessageFactory
.
public void setMessageFactoryBeanName(String messageFactoryBeanName)
WebServiceMessageFactory
. Defaults to DEFAULT_MESSAGE_FACTORY_BEAN_NAME
.
public String getMessageReceiverBeanName()
WebServiceMessageReceiver
.
public void setMessageReceiverBeanName(String messageReceiverBeanName)
WebServiceMessageReceiver
. Defaults to DEFAULT_MESSAGE_RECEIVER_BEAN_NAME
.
public boolean isTransformWsdlLocations()
HttpServletRequest
.
public String getMessageReceiverHandlerAdapterBeanName()
WebServiceMessageReceiverHandlerAdapter
.
public void setMessageReceiverHandlerAdapterBeanName(String messageReceiverHandlerAdapterBeanName)
WebServiceMessageReceiverHandlerAdapter
. Defaults to DEFAULT_MESSAGE_RECEIVER_HANDLER_ADAPTER_BEAN_NAME
.
public String getWsdlDefinitionHandlerAdapterBeanName()
WsdlDefinitionHandlerAdapter
.
public void setWsdlDefinitionHandlerAdapterBeanName(String wsdlDefinitionHandlerAdapterBeanName)
WsdlDefinitionHandlerAdapter
. Defaults to DEFAULT_WSDL_DEFINITION_HANDLER_ADAPTER_BEAN_NAME
.
public String getXsdSchemaHandlerAdapterBeanName()
XsdSchemaHandlerAdapter
.
public void setXsdSchemaHandlerAdapterBeanName(String xsdSchemaHandlerAdapterBeanName)
XsdSchemaHandlerAdapter
. Defaults to DEFAULT_XSD_SCHEMA_HANDLER_ADAPTER_BEAN_NAME
.
public void setTransformWsdlLocations(boolean transformWsdlLocations)
HttpServletRequest
. Defaults to false
.
protected void doService(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception
doService
in class FrameworkServlet
Exception
protected void initFrameworkServlet() throws ServletException, BeansException
initFrameworkServlet
in class FrameworkServlet
ServletException
BeansException
protected long getLastModified(HttpServletRequest httpServletRequest)
getLastModified
in class HttpServlet
protected WebServiceMessageReceiver getMessageReceiver()
WebServiceMessageReceiver
used by this servlet.
protected WsdlDefinition getWsdlDefinition(HttpServletRequest request)
WsdlDefinition
for a given request, or null
if none is found.
Default implementation checks whether the request method is GET
, whether the request uri ends with
".wsdl"
, and if there is a WsdlDefinition
with the same name as the filename in the
request uri.
request
- the HttpServletRequest
null
protected XsdSchema getXsdSchema(HttpServletRequest request)
XsdSchema
for a given request, or null
if none is found.
Default implementation checks whether the request method is GET
, whether the request uri ends with
".xsd"
, and if there is a XsdSchema
with the same name as the filename in the request
uri.
request
- the HttpServletRequest
null
|
Spring Web Services Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |