"enter00", "ArrayDeserializer.startElement()"));
}
// Get the qname for the array type=, set it to null if
// the generic type is used.
QName typeQName = context.getTypeFromAttributes(namespace,
localName,
attributes);
if (typeQName != null &&
Constants.equals(Constants.SOAP_ARRAY, typeQName)) {
typeQName = null;
}
// Now get the arrayType value
QName arrayTypeValue = context.getQNameFromString(
Constants.getValue(attributes,
Constants.URIS_SOAP_ENC,
Constants.ATTR_ARRAY_TYPE));
// The first part of the arrayType expression is
// the default item type qname.
// The second part is the dimension information
String dimString = null;
QName innerQName = null;
String innerDimString = "";
if (arrayTypeValue != null) {
String arrayTypeValueNamespaceURI =
arrayTypeValue.getNamespaceURI();
String arrayTypeValueLocalPart =
arrayTypeValue.getLocalPart();
int leftBracketIndex =
arrayTypeValueLocalPart.lastIndexOf('[');
int rightBracketIndex =
arrayTypeValueLocalPart.lastIndexOf(']');
if (leftBracketIndex == -1
|| rightBracketIndex == -1
|| rightBracketIndex < leftBracketIndex)
{
throw new IllegalArgumentException(
JavaUtils.getMessage("badArrayType00",
"" + arrayTypeValue));
}
dimString =
arrayTypeValueLocalPart.substring(leftBracketIndex + 1,
rightBracketIndex);
arrayTypeValueLocalPart =
arrayTypeValueLocalPart.substring(0, leftBracketIndex);
// If multi-dim array set to soapenc:Array
if (arrayTypeValueLocalPart.endsWith("]")) {
defaultItemType =
new QName(Constants.URI_CURRENT_SOAP_ENC, "Array");
innerQName = new QName(
arrayTypeValueNamespaceURI,
arrayTypeValueLocalPart.substring(0,
arrayTypeValueLocalPart.indexOf("[")));
innerDimString = arrayTypeValueLocalPart.substring(
arrayTypeValueLocalPart.indexOf("["));
} else {
defaultItemType = new QName(arrayTypeValueNamespaceURI,
arrayTypeValueLocalPart);
}
}
// If no type QName and no defaultItemType qname, use xsd:anyType
if (defaultItemType == null && typeQName == null) {
defaultItemType =
new QName(Constants.URI_CURRENT_SCHEMA_XSD, "anyType");
}
// Determine the class type for the array.
arrayClass = null;
if (typeQName != null) {
arrayClass = context.getTypeMapping().
getClassForQName(typeQName);
} else {
// type= information is not sufficient.
// Get an array of the default item type.
Class arrayItemClass = null;
QName compQName = defaultItemType;
String dims = "[]";
// Nested array, use the innermost qname
if (innerQName != null) {
compQName = innerQName;
dims += innerDimString;