Document doc = method.getResponseBodyAsDocument();
descriptors = new HashMap<String, QValue[]>();
if (doc != null) {
Element rootElement = doc.getDocumentElement();
ElementIterator nsElems = DomUtil.getChildren(rootElement, JcrRemotingConstants.XML_DESCRIPTOR, ItemResourceConstants.NAMESPACE);
while (nsElems.hasNext()) {
Element elem = nsElems.nextElement();
String key = DomUtil.getChildText(elem, JcrRemotingConstants.XML_DESCRIPTORKEY, ItemResourceConstants.NAMESPACE);
ElementIterator it = DomUtil.getChildren(elem, JcrRemotingConstants.XML_DESCRIPTORVALUE, ItemResourceConstants.NAMESPACE);
List<QValue> vs = new ArrayList<QValue>();
while (it.hasNext()) {
Element dv = it.nextElement();
String descriptor = DomUtil.getText(dv);
if (key != null && descriptor != null) {
String typeStr = (DomUtil.getAttribute(dv, JcrRemotingConstants.ATTR_VALUE_TYPE, null));
int type = (typeStr == null) ? PropertyType.STRING : PropertyType.valueFromName(typeStr);
vs.add(getQValueFactory().create(descriptor, type));