/**
* @see org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition#getXmlSchemaElement(javax.xml.namespace.QName)
*/
public XmlSchemaElement getXmlSchemaElement(QName name) {
XmlSchemaCollection schemaCollection = null;
for (XSDefinition xsd : schemas) {
if (schemaCollection == null && xsd.getSchemaCollection() != null) {
schemaCollection = xsd.getSchemaCollection();
}
XmlSchema schema = xsd.getSchema();
XmlSchemaElement element = getXmlSchemaObject(schema, name, XmlSchemaElement.class);
if (element != null) {
return element;
}
}
if (schemaCollection != null) {
return schemaCollection.getElementByQName(name);
}
return null;
}