checkError(resp);
ArrayList A = resp.fget("SERVICE");
Hashtable H;
QueryableFrame Q;
ServiceInterface[] S = new ServiceInterface[A.size()];
for (int i = 0; i < A.size(); i++) {
Q = (QueryableFrame) A.get(i);
// Check if it is a Service or a ServiceAlias and parse accordingly
if (Q.fgetString("TARGET") == null) {
H = new Hashtable();
int total = Q.getKeyValuePairCount();
KeyValuePair P = null;
for (int j = 0; j < total; j++) {
P = Q.getKeyValuePair(j);
if (P.isValueALeaf()) {
H.put(P.getKey(), P.getValueAsString());
} else {
H.put(P.getKey(), P.getValue());
}
}
S[i] = new Service(H);
} else {
S[i] = new ServiceAlias(Q.fgetString("NAME"), Q.fgetString("TARGET"));
}
}
return S;
}