public void setSchemaResolver(URIResolver schemaResolver) { schemaCollection.setSchemaResolver(schemaResolver); }
public void setSchemaResolver(URIResolver schemaResolver) { schemaCollection.setSchemaResolver(schemaResolver); }
public void setSchemaResolver(URIResolver schemaResolver) { schemaCollection.setSchemaResolver(schemaResolver); }
public void setSchemaResolver(URIResolver schemaResolver) { schemaCollection.setSchemaResolver(schemaResolver); }
public void setSchemaResolver(URIResolver schemaResolver) { schemaCollection.setSchemaResolver(schemaResolver); }
public WSDLServiceBuilder(Definition definition) { this.definition = definition; definitions.add(definition); this.systemId = definition.getDocumentBaseURI(); // this is best we have, so use it. bindingAnnotators.add(new SoapBindingAnnotator()); schemas.setSchemaResolver(new XmlSchemaURIResolver()); }
schemaCollection.setSchemaResolver(new CatalogURIResolver(catalogManager)); schemaCollection.setBaseUri(new File(localOutputDirectory).getAbsolutePath());
schemaCollection.setSchemaResolver(new CatalogURIResolver(catalogManager)); schemaCollection.setBaseUri(new File(localOutputDirectory).getAbsolutePath());
@Override public void afterPropertiesSet() throws IOException { Assert.notEmpty(xsdResources, "'xsds' must not be empty"); schemaCollection.setSchemaResolver(uriResolver); Set<XmlSchema> processedIncludes = new HashSet<XmlSchema>(); Set<XmlSchema> processedImports = new HashSet<XmlSchema>(); for (Resource xsdResource : xsdResources) { Assert.isTrue(xsdResource.exists(), xsdResource + " does not exist"); try { XmlSchema xmlSchema = schemaCollection.read(SaxUtils.createInputSource(xsdResource)); xmlSchemas.add(xmlSchema); if (inline) { inlineIncludes(xmlSchema, processedIncludes, processedImports); findImports(xmlSchema, processedImports, processedIncludes); } } catch (Exception ex) { throw new CommonsXsdSchemaException("Schema [" + xsdResource + "] could not be loaded", ex); } } if (logger.isInfoEnabled()) { logger.info("Loaded " + StringUtils.arrayToCommaDelimitedString(xsdResources)); } }
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); }
@Override public void afterPropertiesSet() throws IOException { Assert.notEmpty(xsdResources, "'xsds' must not be empty"); schemaCollection.setSchemaResolver(uriResolver); Set<XmlSchema> processedIncludes = new HashSet<XmlSchema>(); Set<XmlSchema> processedImports = new HashSet<XmlSchema>(); for (Resource xsdResource : xsdResources) { Assert.isTrue(xsdResource.exists(), xsdResource + " does not exist"); try { XmlSchema xmlSchema = schemaCollection.read(SaxUtils.createInputSource(xsdResource)); xmlSchemas.add(xmlSchema); if (inline) { inlineIncludes(xmlSchema, processedIncludes, processedImports); findImports(xmlSchema, processedImports, processedIncludes); } } catch (Exception ex) { throw new CommonsXsdSchemaException("Schema [" + xsdResource + "] could not be loaded", ex); } } if (logger.isInfoEnabled()) { logger.info("Loaded " + StringUtils.arrayToCommaDelimitedString(xsdResources)); } }
public void afterPropertiesSet() throws IOException { Assert.notEmpty(xsdResources, "'xsds' must not be empty"); schemaCollection.setSchemaResolver(uriResolver); Set<XmlSchema> processedIncludes = new HashSet<XmlSchema>(); Set<XmlSchema> processedImports = new HashSet<XmlSchema>(); for (Resource xsdResource : xsdResources) { Assert.isTrue(xsdResource.exists(), xsdResource + " does not exit"); try { XmlSchema xmlSchema = schemaCollection.read(SaxUtils.createInputSource(xsdResource), validationEventHandler); xmlSchemas.add(xmlSchema); if (inline) { inlineIncludes(xmlSchema, processedIncludes, processedImports); findImports(xmlSchema, processedImports, processedIncludes); } } catch (Exception ex) { throw new CommonsXsdSchemaException("Schema [" + xsdResource + "] could not be loaded", ex); } } if (logger.isInfoEnabled()) { logger.info("Loaded " + StringUtils.arrayToCommaDelimitedString(xsdResources)); } }
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); }
public <T> T resolveModel(Class<T> modelClass, T unresolved, ProcessorContext context) { schemaCollection.setSchemaResolver(new URIResolverImpl(contribution, context)); XSDefinition definition = (XSDefinition)unresolved; String namespace = definition.getNamespace();
public <T> T resolveModel(Class<T> modelClass, T unresolved, ProcessorContext context) { schemaCollection.setSchemaResolver(new URIResolverImpl(contribution, context)); XSDefinition definition = (XSDefinition)unresolved; String namespace = definition.getNamespace();
collection.setSchemaResolver(createResolvers(collection)); try { Types types = definition.getTypes();
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; }
schemas.getXmlSchemaCollection().setSchemaResolver(new XMLSchemaResolver(sts)); String sourceName = st.getSourceName(); XmlSchema schema = getSchema(sts, sourceName);
xsc.setSchemaResolver(new DOMSchemaResolverAdapter(getURIResolver(), schemaEl)); schemaDef = xsc.read(domSchemaEl, baseURI);
xsc.setSchemaResolver(new DOMSchemaResolverAdapter(getURIResolver(), schemaEl)); schemaDef = xsc.read(domSchemaEl, baseURI);