public ArrayTypeInfo(MessageReader reader, TypeMapping tm) { this( reader.getXMLStreamReader().getNamespaceContext(), readAttributeValue(reader, SOAP_ARRAY_TYPE), readAttributeValue(reader, SOAP_ARRAY_OFFSET)); // if type is xsd:ur-type replace it with xsd:anyType String namespace = reader.getNamespaceForPrefix(typeName.getPrefix()); if (!StringUtils.isEmpty(namespace)) { if (SOAPConstants.XSD.equals(namespace) && "ur-type".equals(typeName.getLocalPart())) { typeName = new QName(namespace, "anyType", typeName.getPrefix()); } else { typeName = new QName(namespace, typeName.getLocalPart(), typeName.getPrefix()); } } if (tm != null) { type = tm.getType(typeName); if (ranks > 0) { Class<?> componentType = type.getTypeClass(); for (int i = 1; i < ranks + dimensions.size(); i++) { componentType = Array.newInstance(componentType, 0).getClass(); } SoapArrayType arrayType = new SoapArrayType(); arrayType.setTypeClass(componentType); arrayType.setTypeMapping(type.getTypeMapping()); type = arrayType; } } }
@Override public Object readObject(MessageReader reader, Context context) { return Long.valueOf(reader.getValueAsLong()); }