Skip to content

Commit f3ca62b

Browse files
committed
Merge branch '4.0.x'
Closes gh-1515
2 parents e5f7871 + 3d8bb53 commit f3ca62b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

spring-ws-docs/src/docs/asciidoc/server.adoc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,22 @@ For instance, if our `Orders.xsd` schema defines the `GetOrdersRequest` and `Get
240240

241241
To use multiple schemas, either by includes or imports, you can put Commons XMLSchema on the class path.
242242
If Commons XMLSchema is on the class path, the `<dynamic-wsdl>` element follows all XSD imports and includes and inlines them in the WSDL as a single XSD.
243+
With Java config, you can use `CommonsXsdSchemaCollection` as shown in the following example:
244+
245+
[source,java]
246+
----
247+
@Bean
248+
public DefaultWsdl11Definition ordersWsdlDefinition() throws Exception {
249+
DefaultWsdl11Definition wsdl11Definition = new DefaultWsdl11Definition();
250+
// ... configuration
251+
CommonsXsdSchemaCollection schemas = new CommonsXsdSchemaCollection(
252+
new ClassPathResource("xsd/order/main.xsd"));
253+
schemas.setInline(true);
254+
wsdl11Definition.setSchemaCollection(schemas);
255+
return wsdl11Definition;
256+
}
257+
----
258+
243259
This greatly simplifies the deployment of the schemas, while still making it possible to edit them separately.
244260

245261
[WARNING]

0 commit comments

Comments
 (0)