public class CommonsXsdSchemaCollection extends Object implements XsdSchemaCollection, org.springframework.beans.factory.InitializingBean, org.springframework.context.ResourceLoaderAware
XsdSchemaCollection that uses Apache WS-Commons XML Schema.
Setting the inline flag to true will result in all referenced schemas (included
and imported) being merged into the referred schema. When including the schemas into a WSDL, this greatly simplifies
the deployment of the schemas.
| Constructor and Description |
|---|
CommonsXsdSchemaCollection()
Constructs a new, empty instance of the
CommonsXsdSchemaCollection. |
CommonsXsdSchemaCollection(org.springframework.core.io.Resource... resources)
Constructs a new instance of the
CommonsXsdSchemaCollection based on the given resources. |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
XmlValidator |
createValidator()
Creates a
XmlValidator based on the schemas contained in this collection. |
XsdSchema[] |
getXsdSchemas()
Returns all schemas contained in this collection.
|
void |
setInline(boolean inline)
Defines whether included schemas should be inlined into the including schema.
|
void |
setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader) |
void |
setUriResolver(org.apache.ws.commons.schema.resolver.URIResolver uriResolver)
Sets the WS-Commons uri resolver to use when resolving (relative) schemas.
|
void |
setXsds(org.springframework.core.io.Resource... xsdResources)
Sets the schema resources to be loaded.
|
String |
toString() |
public CommonsXsdSchemaCollection()
CommonsXsdSchemaCollection.
A subsequent call to the setXsds(Resource[]) is required.
public CommonsXsdSchemaCollection(org.springframework.core.io.Resource... resources)
CommonsXsdSchemaCollection based on the given resources.resources - the schema resources to loadpublic void setXsds(org.springframework.core.io.Resource... xsdResources)
xsdResources - the schema resources to be loadedpublic void setInline(boolean inline)
Defaults to false.
public void setUriResolver(org.apache.ws.commons.schema.resolver.URIResolver uriResolver)
Default is an internal subclass of DefaultURIResolver which correctly handles schemas on the classpath.
public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
setResourceLoader in interface org.springframework.context.ResourceLoaderAwarepublic void afterPropertiesSet()
throws IOException
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanIOExceptionpublic XsdSchema[] getXsdSchemas()
XsdSchemaCollectiongetXsdSchemas in interface XsdSchemaCollectionpublic XmlValidator createValidator()
XsdSchemaCollectionXmlValidator based on the schemas contained in this collection.createValidator in interface XsdSchemaCollectionCopyright © 2023 VMware, Inc.. All rights reserved.