public class CommonsXsdSchemaCollection extends Object implements XsdSchemaCollection, InitializingBean, 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(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(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(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(Resource... resources)
CommonsXsdSchemaCollection based on the given resources.resources - the schema resources to loadpublic void setXsds(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(ResourceLoader resourceLoader)
setResourceLoader in interface ResourceLoaderAwarepublic void afterPropertiesSet()
throws IOException
afterPropertiesSet in interface InitializingBeanIOExceptionpublic XsdSchema[] getXsdSchemas()
XsdSchemaCollectiongetXsdSchemas in interface XsdSchemaCollectionpublic XmlValidator createValidator()
XsdSchemaCollectionXmlValidator based on the schemas contained in this collection.createValidator in interface XsdSchemaCollection