bool WebServicesExtractor::extractWebServiceInfo(IPropertyTree * attributeTree, const char * section) { if (visited.contains(*attributeTree)) return false; visited.append(*attributeTree); const char * result = attributeTree->queryProp(section); if (result) { if (strcmp(section, "INFO")==0 || strcmp(section, "HELP")==0 || strcmp(section, "DFORM")==0 || *result=='<') { results.append(*new StringPairItem(section, result)); return true; } StringBuffer nextAttribute; if (extractAttributeReference(nextAttribute, result)) { if (extractWebServiceInfo(nextAttribute, section)) return true; } } Owned<IPropertyTreeIterator> iter = attributeTree->getElements("USES"); ForEach(*iter) { StringBuffer nextAttribute; if (extractAttributeReference(nextAttribute, iter->query().queryProp(""))) if (extractWebServiceInfo(nextAttribute, section)) return true; } return false; }
void WebServicesExtractor::getResults(StringPairArray & targetResults) { ForEachItemIn(i, results) targetResults.append(OLINK(results.item(i))); }