diff --git a/src/docbkx/server.xml b/src/docbkx/server.xml index 6c8d5d80..5620c6b8 100644 --- a/src/docbkx/server.xml +++ b/src/docbkx/server.xml @@ -61,25 +61,22 @@ - An appropriate endpoint is searched for using the configured - EndpointMapping(s). If an endpoint is found, - the invocation chain associated with the endpoint (preprocessors, - postprocessors, and endpoints) will be executed in order to create - a response. + An appropriate endpoint is searched for using the configured EndpointMapping(s). + If an endpoint is found, the invocation chain associated with the endpoint (preprocessors, + postprocessors, and endpoints) will be executed in order to create a response. - An appropriate adapter is searched for the endpoint. The - MessageDispatcher delegates to this adapter - to invoke the endpoint. + An appropriate adapter is searched for the endpoint. The MessageDispatcher + delegates to this adapter to invoke the endpoint. If a response is returned, it is sent on its way. If no response is returned (which could be due to - a pre- or post-processor intercepting the request, for example, for security reasons), no response is - sent. + a pre- or post-processor intercepting the request, for example, for security reasons), no response + is sent. @@ -149,29 +146,39 @@
Automatic WSDL exposure - The MessageDispatcherServlet will automatically detect any - WsdlDefinition beans defined in it's Spring container. All such - WsdlDefinition beans that are detected will also be exposed via - a WsdlDefinitionHandlerAdapter; this is a very convenient way to expose your WSDL - to clients simply by just defining some beans. - By way of an example, consider the following bean definition, defined in the Spring-WS framework's - configuration file ('/WEB-INF/[servlet-name]-servlet.xml'). Take notice of the - value of the bean's 'id' attribute, because this will be used when exposing - the WSDL. + + The MessageDispatcherServlet will automatically detect any + WsdlDefinition beans defined in it's Spring container. All such + WsdlDefinition beans that are detected will also be exposed via + a WsdlDefinitionHandlerAdapter; this is a very convenient way to expose your + WSDL to clients simply by just defining some beans. + + + By way of an example, consider the following bean definition, defined in the Spring-WS framework's + configuration file ('/WEB-INF/[servlet-name]-servlet.xml'). Take notice of the + value of the bean's 'id' attribute, because this will be used when exposing + the WSDL. + ]]> - The WSDL defined in the 'Orders.wsdl' file can then be accessed via - GET requests to a URL of the following form (substitute the host, port and servlet - context path as appropriate). + + The WSDL defined in the 'Orders.wsdl' file can then be accessed via + GET requests to a URL of the following form (substitute the host, port and + servlet context path as appropriate). + - Another cool feature of the MessageDispatcherServlet (or more - correctly the WsdlDefinitionHandlerAdapter) is that it is able to - transform the value of the 'location' of all the WSDL that it exposes to reflect the - URL of the incoming request. - Please note that this 'location' transformation feature is - off by default.To switch this feature on, you just need to specify an - initialization parameter to the MessageDispatcherServlet, like so: + + Another cool feature of the MessageDispatcherServlet (or more correctly the + WsdlDefinitionHandlerAdapter) is that it is able to + transform the value of the 'location' of all the WSDL that it exposes to reflect + the URL of the incoming request. + + + Please note that this 'location' transformation feature is + off by default.To switch this feature on, you just need to specify an + initialization parameter to the MessageDispatcherServlet, like so: + @@ -189,8 +196,58 @@ ]]> - Consult the class-level Javadoc on the WsdlDefinitionHandlerAdapter class - which explains the whole transformation process in more detail. + + Consult the class-level Javadoc on the WsdlDefinitionHandlerAdapter class + which explains the whole transformation process in more detail. + +
+ Exposing a static WSDL + + As indicated above, a static WSDL file can be exposed by using the + SimpleWsdl11Definition. Simply wire it up, and give it a + Resource for the wsdl property, or use the + contructor, as shown in the example above. + +
+
+ Dynamically creating a WSDL from an XSD + + As shown in , Spring Web Services can generate a WSDL + file from a XSD schema, using conventions. The next application context snippet shows how to + create such a dynamic WSDL file: + + + + + + + + + +]]> + + The DynamicWsdl11Definition uses a + Wsdl11DefinitionBuilder implementation + to generate a WSDL the first time it is requested. + Typically, we use a XsdBasedSoap11Wsdl4jDefinitionBuilder, which builds + a WSDL from a XSD schema. This builder iterates over all element elements + found in the schema, and creates a message for elements that end with the + defined request or response suffix. The default request suffix is Request; + the default response suffix is Response, though these can be changed by + setting the requestSuffix and responseSuffix + properties, respectively. + Next, the builder combines the request and response messages into a WSDL + operations, and builds a portType based on the operations. + + + For instance, if our Orders.xsd schema defines the + GetOrdersRequest and GetOrdersResponse elements, the + XsdBasedSoap11Wsdl4jDefinitionBuilder will create a + GetOrdersRequest and GetOrdersResponse message, and a + GetOrders operation, which is put in a Orders port type. + +
diff --git a/src/docbkx/tutorial.xml b/src/docbkx/tutorial.xml index 8e20224f..bd83022c 100644 --- a/src/docbkx/tutorial.xml +++ b/src/docbkx/tutorial.xml @@ -704,7 +704,7 @@ public class HolidayEndpoint extends AbstractJDomPayloadEndpoint {
-
+
Publishing the WSDL Finally, we need to publish the WSDL. As stated in , we don't