From 465aeac1c533aab2f54c77e0c63d9b71cc5f3398 Mon Sep 17 00:00:00 2001 From: Arjen Poutsma Date: Sun, 9 Sep 2007 22:06:29 +0000 Subject: [PATCH] SWS-185 --- src/docbkx/server.xml | 59 +++++++++++++++++++++++++++++++++---------- 1 file changed, 45 insertions(+), 14 deletions(-) diff --git a/src/docbkx/server.xml b/src/docbkx/server.xml index 6cef09de..8784f095 100644 --- a/src/docbkx/server.xml +++ b/src/docbkx/server.xml @@ -52,7 +52,7 @@ - + When a MessageDispatcher is set up for use and a request comes in for that specific dispatcher, said MessageDispatcher starts processing the request. The list below describes the complete process a request goes through when handled by a @@ -87,7 +87,7 @@ Exceptions that are thrown during handling of the request get picked up by any of the endpoint exception resolvers that are declared in the application context. Using these exception resolvers allows you to define custom behaviors (such as returning a SOAP Fault) in case such exceptions get thrown. - + The MessageDispatcher has several properties, for setting endpoint adapters, mappings, @@ -95,20 +95,21 @@ However, setting these properties is not required, since the dispatcher will automatically detect all of these types that are registered in the application context. Only when detection needs to be overriden, should these properties be set. - - - The message dispatcher operates on a message context, and not - transport-specific input stream and output stream. As a result, transport specific requests need to read - into a MessageContext. For HTTP, this is done with a - WebServiceMessageReceiverHandlerAdapter, which is a Spring Web - HandlerInterceptor, so that the MessageDispatcher - can be wired in a standard DispatcherServlet. There is a more convenient way to do - this, however, which is shown in the next section. - + + + The message dispatcher operates on a message context, and not + transport-specific input stream and output stream. As a result, transport specific requests need to read + into a MessageContext. For HTTP, this is done with a + WebServiceMessageReceiverHandlerAdapter, which is a Spring Web + HandlerInterceptor, so that the MessageDispatcher + can be wired in a standard DispatcherServlet. There is a more convenient way to do + this, however, which is shown in the next section. +
<classname>MessageDispatcherServlet</classname> - The MessageDispatcherServlet is a standard Servlet which + The MessageDispatcherServlet is a standard Servlet + which conveniently extends from the standard Spring Web DispatcherServlet, and wraps a MessageDispatcher. As such, it combines the attributes of these into one: as a MessageDispatcher, it follows the same request handling flow as described @@ -192,7 +193,37 @@ which explains the whole transformation process in more detail.
- +
+ Wiring up Spring-WS in a <classname>DispatcherServlet</classname> + + As an alternative to the MessageDispatcherServlet, you can wire up a + MessageDispatcher in a standard, Spring-Web MVC + DispatcherServlet. + By default, the DispatcherServlet can only delegate to + Controllers, but we can instruct it to delegate to a + MessageDispatcher by adding a + WebServiceMessageReceiverHandlerAdapter to the servlet's web application + context: + + + + + + + + + ... + + ]]> + Note that by explicitely adding the WebServiceMessageReceiverHandlerAdapter, + the dispatcher servlet does not load the default adapters, and is unable to handle standard Spring-MVC + Controllers. Therefore, we add the + SimpleControllerHandlerAdapter at the end. + +
+
Endpoints