allSchemaRefs.addAll(schema.getIncludes()); allSchemaRefs.addAll(schema.getRedefines());
/** * Recursively add all included schemas as schema resource. */ protected void addIncludedSchemas(Schema schema) throws WSDLException, IOException, TransformerException, TransformerFactoryConfigurationError { List<SchemaReference> includes = schema.getIncludes(); for (SchemaReference schemaReference : includes) { String schemaLocation; URI locationURI = URI.create(schemaReference.getSchemaLocationURI()); if (locationURI.isAbsolute()) { schemaLocation = schemaReference.getSchemaLocationURI(); } else { schemaLocation = schema.getDocumentBaseURI().substring(0, schema.getDocumentBaseURI().lastIndexOf('/') + 1) + schemaReference.getSchemaLocationURI(); } schemaResources.add(new FileSystemResource(schemaLocation)); } }
Collection<SchemaReference> schemaIncludesCollection = schema.getIncludes();
private void mapSchema(Schema schema, String contextPath) { Map schemaImports = schema.getImports(); for (Iterator iter = schemaImports.values().iterator(); iter.hasNext();) { List imps = (List) iter.next(); for (Iterator iterator = imps.iterator(); iterator.hasNext();) { SchemaImport schemaImport = (SchemaImport) iterator.next(); Schema schemaImp = schemaImport.getReferencedSchema(); String schemaLoc = schemaImport.getSchemaLocationURI(); if (schemaLoc != null && schemaImp != null && schemaImp.getElement() != null && !URI.create(schemaLoc).isAbsolute()) { schemaLoc = resolveRelativeURI(contextPath, schemaLoc); addResource(schemaLoc, schemaImp.getElement()); // recursively map imported schemas mapSchema(schemaImp, getURIParent(schemaLoc)); } } } List schemaIncludes = schema.getIncludes(); for (Iterator iter = schemaIncludes.iterator(); iter.hasNext();) { SchemaReference schemaInclude = (SchemaReference) iter.next(); Schema schemaImp = schemaInclude.getReferencedSchema(); String schemaLoc = schemaInclude.getSchemaLocationURI(); if (schemaLoc != null && schemaImp != null && schemaImp.getElement() != null && !URI.create(schemaLoc).isAbsolute()) { schemaLoc = resolveRelativeURI(contextPath, schemaLoc); addResource(schemaLoc, schemaImp.getElement()); // recursively map included schemas mapSchema(schemaImp, getURIParent(schemaLoc)); } } }
private void processSchema(Definition definition, Schema schema, String fileName, Map<String, String> changedSchemaLocations) { try { if (schema.getIncludes() != null) { for (Object o : schema.getIncludes()) { if (o instanceof SchemaReference) { SchemaReference ref = (SchemaReference) o;
final Element includeElt = (Element) includeNl.item(i); if (includeElt.hasAttribute("schemaLocation")) { for (final SchemaReference schemaReference : (List<SchemaReference>) schema.getIncludes()) { if (schemaReference.getSchemaLocationURI() != null && schemaReference.getSchemaLocationURI().equals(includeElt.getAttribute("schemaLocation"))) {
List<SchemaReference> includes = CastUtils.cast(schema.getIncludes()); if (includes != null && includes.size() > 0) { String includeNamespace = schema.getElement().getAttribute("targetNamespace");
protected void updateSchemaImports(Bus bus, Schema schema, String docBase, Map<String, SchemaReference> doneSchemas, String base, String parentResolved) { Collection<List<?>> imports = CastUtils.cast((Collection<?>)schema.getImports().values()); for (List<?> lst : imports) { List<SchemaImport> impLst = CastUtils.cast(lst); for (SchemaImport imp : impLst) { processSchemaReference(imp, bus, schema, docBase, doneSchemas, base, parentResolved); } } List<SchemaReference> includes = CastUtils.cast(schema.getIncludes()); for (SchemaReference included : includes) { processSchemaReference(included, bus, schema, docBase, doneSchemas, base, parentResolved); } List<SchemaReference> redefines = CastUtils.cast(schema.getRedefines()); for (SchemaReference included : redefines) { processSchemaReference(included, bus, schema, docBase, doneSchemas, base, parentResolved); } }
List<SchemaReference> includes = CastUtils.cast(schema.getIncludes()); if (includes != null && includes.size() > 0) { String includeNamespace = schema.getElement().getAttribute("targetNamespace");
protected void updateSchemaImports(Bus bus, Schema schema, String docBase, Map<String, SchemaReference> doneSchemas, String base, String parentResolved) { Collection<List<?>> imports = CastUtils.cast((Collection<?>)schema.getImports().values()); for (List<?> lst : imports) { List<SchemaImport> impLst = CastUtils.cast(lst); for (SchemaImport imp : impLst) { processSchemaReference(imp, bus, schema, docBase, doneSchemas, base, parentResolved); } } List<SchemaReference> includes = CastUtils.cast(schema.getIncludes()); for (SchemaReference included : includes) { processSchemaReference(included, bus, schema, docBase, doneSchemas, base, parentResolved); } List<SchemaReference> redefines = CastUtils.cast(schema.getRedefines()); for (SchemaReference included : redefines) { processSchemaReference(included, bus, schema, docBase, doneSchemas, base, parentResolved); } }
List<SchemaReference> includes = CastUtils.cast(schema.getIncludes()); for (SchemaReference included : includes) { String start = included.getSchemaLocationURI();
allSchemaRefs.addAll(schema.getIncludes()); allSchemaRefs.addAll(schema.getRedefines());
allSchemaRefs.addAll(schema.getIncludes()); allSchemaRefs.addAll(schema.getRedefines());