private void addImport(XmlSchema schema, String ns) { if (!ns.equals(schema.getTargetNamespace()) && !ns.equals(WSDLConstants.NS_SCHEMA_XSD) && !isExistImport(schema, ns)) { XmlSchemaImport is = new XmlSchemaImport(schema); is.setNamespace(ns); if (this.schemaLocationMapping.get(ns) != null) { is.setSchemaLocation(this.schemaLocationMapping.get(ns)); } if (!schema.getItems().contains(is)) { schema.getItems().add(is); } } }
private void addImport(XmlSchema schema, String ns) { if (!ns.equals(schema.getTargetNamespace()) && !ns.equals(WSDLConstants.NS_SCHEMA_XSD) && !isExistImport(schema, ns)) { XmlSchemaImport is = new XmlSchemaImport(schema); is.setNamespace(ns); if (this.schemaLocationMapping.get(ns) != null) { is.setSchemaLocation(this.schemaLocationMapping.get(ns)); } if (!schema.getItems().contains(is)) { schema.getItems().add(is); } } }
private void addImport(XmlSchema schema, String ns) { if (!ns.equals(schema.getTargetNamespace()) && !ns.equals(WSDLConstants.NS_SCHEMA_XSD) && !isExistImport(schema, ns)) { XmlSchemaImport is = new XmlSchemaImport(schema); is.setNamespace(ns); if (this.schemaLocationMapping.get(ns) != null) { is.setSchemaLocation(this.schemaLocationMapping.get(ns)); } if (!schema.getItems().contains(is)) { schema.getItems().add(is); } } }
public void addXmlSchemaImport(XmlSchema rootSchema, XmlSchema schema, File file) { // Make sure we haven't already imported the schema. String importNamespace = schema.getTargetNamespace(); boolean included = false; for (XmlSchemaExternal ext : rootSchema.getExternals()) { if (ext instanceof XmlSchemaImport) { XmlSchemaImport imp = (XmlSchemaImport)ext; if (imp.getNamespace().equals(importNamespace)) { included = true; break; } } } if (!included) { XmlSchemaImport importSchema = new XmlSchemaImport(rootSchema); if (!ignoreImports) { importSchema.setSchemaLocation(file.toURI().toString()); } importSchema.setNamespace(schema.getTargetNamespace()); } if (!importedSchemas.containsKey(file)) { importedSchemas.put(file, schema); } }
wsaImport.setSchemaLocation(ReferenceConstants.WSADDRESSING_LOCATION);
wsaImport.setSchemaLocation(ReferenceConstants.WSADDRESSING_LOCATION);