public void setBaseUri(String baseUri) { schemaCollection.setBaseUri(baseUri); }
public void setBaseUri(String baseUri) { schemaCollection.setBaseUri(baseUri); }
public void setBaseUri(String baseUri) { schemaCollection.setBaseUri(baseUri); }
public void setBaseUri(String baseUri) { schemaCollection.setBaseUri(baseUri); }
public void setBaseUri(String baseUri) { schemaCollection.setBaseUri(baseUri); }
protected XmlSchema getXMLSchema(Element element, String baseUri) { XmlSchemaCollection schemaCollection = new XmlSchemaCollection(); if (baseUri != null) { schemaCollection.setBaseUri(baseUri); } return schemaCollection.read(element, baseUri); } }
if (catalogManager != null) schemaCollection.setSchemaResolver(new CatalogURIResolver(catalogManager)); schemaCollection.setBaseUri(new File(localOutputDirectory).getAbsolutePath());
if (catalogManager != null) schemaCollection.setSchemaResolver(new CatalogURIResolver(catalogManager)); schemaCollection.setBaseUri(new File(localOutputDirectory).getAbsolutePath());
protected XmlSchema getXMLSchema(Element element, String baseUri) { XmlSchemaCollection schemaCollection = new XmlSchemaCollection(); if (baseUri != null) { schemaCollection.setBaseUri(baseUri); } if (customResolver != null) { schemaCollection.setSchemaResolver(customResolver); } return schemaCollection.read(element); }
protected XmlSchema getXMLSchema(Element element, String baseUri) { XmlSchemaCollection schemaCollection = new XmlSchemaCollection(); if (baseUri != null) { schemaCollection.setBaseUri(baseUri); } if (customResolver != null) { schemaCollection.setSchemaResolver(customResolver); } return schemaCollection.read(element); }
schemas.setBaseUri(definition.getDocumentBaseURI()); XmlSchema schema = schemas.read(el, schemaSystemId);
public String importSchemaToRegistry(RequestContext requestContext, String resourcePath, String commonLocation, String sourceURL) throws RegistryException { resourceName = resourcePath.substring(resourcePath.lastIndexOf(RegistryConstants.PATH_SEPARATOR) + 1); XmlSchemaCollection xmlSchemaCollection = new XmlSchemaCollection(); xmlSchemaCollection.setBaseUri(sourceURL); baseURI = sourceURL; InputSource inputSource = new InputSource(sourceURL); try { // Here we assue schema is correct. Schema validation is beyond our scope, so we don't // bother with a ValidationEventHandler. XmlSchema xmlSchema = xmlSchemaCollection.read(inputSource, null); evaluateSchemasRecursively(xmlSchema, null, false, true); } catch (RuntimeException re) { String msg = "Could not read the XML Schema Definition file. "; if (re.getCause() instanceof org.apache.ws.commons.schema.XmlSchemaException) { msg += re.getCause().getMessage(); log.error(msg, re); throw new RegistryException(msg); } throw new RegistryException(msg, re); } updateSchemaPaths(commonLocation); updateSchemaInternalsAndAssociations(); Resource metaResource = requestContext.getResource(); String path = saveSchemaToRegistry(resourcePath, metaResource); // should depend on the central location / relative location flag persistAssociations(path); return path; }
xmlSchemaCollection.setBaseUri(wsdlDocumentBaseURI); xmlSchema = xmlSchemaCollection.read(schema.getElement()); evaluateSchemasRecursively(xmlSchema, dependencies, true, false);
xmlSchemaCollection.setBaseUri(wsdlDocumentBaseURI); xmlSchema = xmlSchemaCollection.read(schema.getElement()); try {
xmlSchemaCollection.setBaseUri(url); baseURI = url; InputSource inputSource = new InputSource(url);
Schema schema = (Schema) obj; Element element = schema.getElement(); collection.setBaseUri(schema.getDocumentBaseURI());
private XmlSchemaCollection getXmlSchema(Definition definition) { XmlSchemaCollection collection = new XmlSchemaCollection(); Types types = definition.getTypes(); collection.setSchemaResolver(new URIResolver( ) { @Override public InputSource resolveEntity(String targetNamespace, String schemaLocation, String baseUri) { return new InputSource(getClass().getClassLoader().getResourceAsStream(schemaLocation)); } }); if (types != null) { for(Object obj : types.getExtensibilityElements()) { if(obj instanceof Schema) { Schema schema = (Schema) obj; Element element = schema.getElement(); collection.setBaseUri(schema.getDocumentBaseURI()); collection.read(element); } } } return collection; }
xsc.setBaseUri(baseURI);
Element domSchemaEl = (Element)schemaEl.getSource(); XmlSchemaCollection xsc = new XmlSchemaCollection(); xsc.setBaseUri(baseURI);
Element domSchemaEl = (Element)schemaEl.getSource(); XmlSchemaCollection xsc = new XmlSchemaCollection(); xsc.setBaseUri(baseURI);