QName elementTypeQName = this.outputParameter.getElement().getType().getQname();
if (!xmlSchema.containsNamespace(elementTypeQName.getNamespaceURI())) {
// if the element namespace does not exists we have to add it
if (!elementTypeQName.getNamespaceURI().equals(Constants.URI_2001_SCHEMA_XSD)) {
XmlImport xmlImport = new XmlImport(elementTypeQName.getNamespaceURI());
xmlSchema.addImport(xmlImport);
}
xmlSchema.addNamespace(elementTypeQName.getNamespaceURI());
}
}
this.outPutElement.setType(xmlType);