// If the node has "type" and "maxOccurs" then the type is really
// a collection. There is no qname in the wsdl which we can use to represent
// the collection, so we need to invent one.
// The local part of the qname is changed to <local>[minOccurs, maxOccurs]
// The namespace uri is changed to the targetNamespace of this node
QName qName= getNodeTypeRefQName(node, "type");
if (qName != null) {
String maxOccursValue = getAttribute(node, "maxOccurs");
String minOccursValue = getAttribute(node, "minOccurs");
if (maxOccursValue == null) {
maxOccursValue = "1";
}
if (minOccursValue == null) {
minOccursValue = "1";
}
if (minOccursValue.equals("0") && maxOccursValue.equals("1")) {
// If we have a minoccurs="0"/maxoccurs="1", this is just
// like a nillable single value, so treat it as such.
qName = getNillableQName(qName);
} else if (!maxOccursValue.equals("1") || !minOccursValue.equals("1")) {
String localPart = qName.getLocalPart();
// localPart += "[" + minOccursValue + "," + maxOccursValue + "]";
// qName.setLocalPart(localPart);
// String namespace = getScopedAttribute(node, "targetNamespace");
// if (namespace != null)
// qName.setNamespaceURI(namespace);
localPart += "[" + maxOccursValue + "]";
qName.setLocalPart(localPart);
}
}
// Both "ref" and "element" reference elements
if (qName == null) {