Пример #1
0
bool retrieveWebServicesInfo(IWorkUnit *workunit, HqlLookupContext & ctx)
{
    Owned<IWUWebServicesInfo> webServicesInfo = workunit->updateWebServicesInfo(false);  // if it doesn't exist - don't do anything
    if (!webServicesInfo)
        return false;

    SCMStringBuffer moduleName, attributeName, defaultName;
    webServicesInfo->getModuleName(moduleName);
    webServicesInfo->getAttributeName(attributeName);
    webServicesInfo->getDefaultName(defaultName);

    StringBuffer fullName;
    fullName.append(moduleName).append(".").append(attributeName);

    WebServicesExtractor extractor(ctx);
    extractor.addRootReference(fullName);
    if (defaultName.length())
    {
        const char *lastsep = strrchr(defaultName.str(), '/');
        if (lastsep)
        {
            StringBuffer mappedDefault;
            mappedDefault.append(defaultName.str()).replace('/', '.');
            extractor.addRootReference(mappedDefault);
        }
    }

    extractor.extractWebServiceInfo();

    StringPairArray results;
    extractor.getResults(results);
    ForEachItemIn(i, results)
    {
        StringPairItem & cur = results.item(i);
        webServicesInfo->setInfo(cur.first, cur.second); 
    }
Пример #2
0
void WebServicesExtractor::getResults(StringPairArray & targetResults)
{
    ForEachItemIn(i, results)
        targetResults.append(OLINK(results.item(i)));
}