protected void generateElement(QName xmlName, QName xmlType)
{
WSDLTypes types = wsdl.getWsdlTypes();
String namespaceURI = xmlType.getNamespaceURI();
JBossXSModel schemaModel = WSDLUtils.getSchemaModel(types);
XSTypeDefinition type;
if (Constants.NS_SCHEMA_XSD.equals(namespaceURI))
type = SchemaUtils.getInstance().getSchemaBasicType(xmlType.getLocalPart());
else
type = schemaModel.getTypeDefinition(xmlType.getLocalPart(), namespaceURI);
WSSchemaUtils utils = WSSchemaUtils.getInstance(schemaModel.getNamespaceRegistry(), null);
JBossXSElementDeclaration element =
utils.createGlobalXSElementDeclaration(xmlName.getLocalPart(), type, xmlName.getNamespaceURI());
schemaModel.addXSElementDeclaration(element);
wsdl.registerNamespaceURI(xmlName.getNamespaceURI(), null);
}