// we need an import for every namespace except the main one.
String schemaNamespace = schemaInfo.getNamespaceURI();
Map<String, String> queryPrefixMap = new HashMap<String, String>();
queryPrefixMap.put("xs", WSDLConstants.NU_SCHEMA_XSD);
XPathUtils xpu = new XPathUtils(queryPrefixMap);
NamespacePrefixList schemaPrefixes = schemaInfo.getSchema().getNamespaceContext();
for (String prefix : schemaPrefixes.getDeclaredPrefixes()) {
String namespace = schemaPrefixes.getNamespaceURI(prefix);
if (!namespace.equals(schemaNamespace)
&& !namespace.equals(WSDLConstants.NU_SCHEMA_XSD)
&& !xpu.isExist("xs:import[@namespace='" + namespace + "']",
schemaElement,
XPathConstants.NODE)) {