Community
Participate
Working Groups
if (!isImportNSExists(schema, namespace))
{
// Create XSD Import element
// Always insert the import element as first element is schema
// NOTE : Fix for Bug 167584 "Fix WSDLs from artifacts so that they pass validation in the generated projects"
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=167584
XSDImport xsdImport = XSDFactory.eINSTANCE.createXSDImport();
xsdImport.setNamespace(namespace);
xsdImport.setSchemaLocation(schemaLocation);
schema.getContents().add(index+1, xsdImport);
schema.getContents().add(0, xsdImport);
}