// Anonymous strings do not need an equivalent write - the primitive handler write is sufficuent.
public CorbaObjectHandler readArrayFromStax(XMLEventReader reader, QName idlType, TypeCode tc)
throws CorbaBindingException {
CorbaArrayHandler obj = null;
CorbaTypeImpl typeDefinition = CorbaUtils.getCorbaType(idlType, typeMaps);
try {
QName arrayElemType = null;
long arrayBound = 0;
// Arrays and anonymous arrays can be handled by the same method
if (typeDefinition instanceof Anonarray) {
Anonarray anonArrayType = (Anonarray)typeDefinition;
arrayElemType = anonArrayType.getElemtype();
arrayBound = anonArrayType.getBound();
} else {
Array arrayType = (Array)typeDefinition;
arrayElemType = arrayType.getElemtype();
arrayBound = arrayType.getBound();
}
StartElement arrayStartEl = reader.nextEvent().asStartElement();
obj = new CorbaArrayHandler(arrayStartEl.getName(), idlType, tc, typeDefinition);
for (int i = 0; i < arrayBound; ++i) {
CorbaObjectHandler element = readObjectFromStax(reader, arrayElemType, true);
obj.addElement(element);
}
reader.nextEvent().asEndElement();
} catch (java.lang.Exception ex) {
LOG.log(Level.SEVERE, "Received exception while reading object of type " + idlType);
throw new CorbaBindingException("Error while reading array corba type", ex);