return (type.isArray())
? createArray(l, jaxbElement ? JAXBElement.class : elementType)
: l;
} catch (UnmarshalException ex) {
throw new BadRequestException(ex);
} catch (XMLStreamException ex) {
throw new BadRequestException(ex);
} catch (JAXBException ex) {
throw new InternalServerErrorException(ex);
}
}