for (XmlSchemaAttributeOrGroupRef aog : list) {
if (!(aog instanceof XmlSchemaAttribute)) {
LOG.warning(aog.getClass() + " not supported in CORBA binding. Skipping.");
continue;
}
XmlSchemaAttribute attribute = (XmlSchemaAttribute) aog;
QName attrName = attribute.getQName();
if (attrName.getNamespaceURI().equals("")) {
attrName = new QName(uri, attrName.getLocalPart());
}
CorbaTypeImpl membertype = null;
boolean attrQualified = getAttributeQualification(attribute, uri);
if (attribute.getUse() == XmlSchemaUse.NONE
|| attribute.getUse() == XmlSchemaUse.OPTIONAL) {
CorbaTypeImpl attType = null;
if (attribute.getSchemaType() != null) {
// REVISIT, edell bug in XmlSchema 1.2.
// https://issues.apache.org/jira/browse/WSCOMMONS-208
attType = convertSchemaToCorbaType(attribute.getSchemaType(),
checkPrefix(attrName),
attribute.getSchemaType(),
null, true);
if (attType != null) {
QName typeName = attType.getQName();
if (!isDuplicate(attType)) {
typeMappingType.getStructOrExceptionOrUnion().add(attType);
}
QName name = createQNameTargetNamespace(typeName.getLocalPart() + "_nil");
membertype = createNillableUnion(name,
checkPrefix(attrName),
createQNameCorbaNamespace(typeName.getLocalPart()),
attrQualified);
}
} else {
attType = processPrimitiveType(attribute.getSchemaTypeName());
//REVISIT, bravi, attType is null for the wsaddr type
//{http://www.w3.org/2005/08/addressing}RelationshipTypeOpenEnum
if (attType != null) {
QName name = createQNameTargetNamespace(attType.getQName().getLocalPart() + "_nil");
//REVISIT, Edell - bug in Xmlschema 1.2
// https://issues.apache.org/jira/browse/WSCOMMONS-208
membertype = createNillableUnion(name,
checkPrefix(attrName),
attType.getQName(),
attrQualified);
}
}
if (membertype != null) {
memName = createQNameCorbaNamespace(membertype.getQName().getLocalPart());
if (!isDuplicate(membertype)) {
typeMappingType.getStructOrExceptionOrUnion().add(membertype);
}
}
} else {
if (attribute.getSchemaType() != null) {
membertype = convertSchemaToCorbaType(attribute.getSchemaType(), attrName,
attribute.getSchemaType(), null, false);
} else {
membertype = processPrimitiveType(attribute.getSchemaTypeName());
}
}
if (membertype != null) {
MemberType member;