本文整理汇总了C++中Owned::addServiceUrl方法的典型用法代码示例。如果您正苦于以下问题:C++ Owned::addServiceUrl方法的具体用法?C++ Owned::addServiceUrl怎么用?C++ Owned::addServiceUrl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Owned
的用法示例。
在下文中一共展示了Owned::addServiceUrl方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MakeStringException
IClientWsWorkunits * createWorkunitsClient(IProperties * _globals)
{
Owned<IClientWsWorkunits> wuclient = createWsWorkunitsClient();
const char* eclwatch = _globals->queryProp("server");
if(eclwatch == NULL)
throw MakeStringException(0, "Server url not defined");
StringBuffer url;
if(Utils::strncasecmp(eclwatch, "http://", 7) != 0 && Utils::strncasecmp(eclwatch, "https://", 8) != 0)
url.append("http://");
url.append(eclwatch);
if(strchr(url.str() + 7, ':') == NULL)
url.append(":8010/");
if(url.charAt(url.length() - 1) != '/')
url.append("/");
url.append("WsWorkUnits");
wuclient->addServiceUrl(url.str());
const char* username = _globals->queryProp("user");
if (!username)
username = _globals->queryProp("owner");
const char* password = _globals->queryProp("password");
if(username != NULL)
wuclient->setUsernameToken(username, password, NULL);
return LINK(wuclient.get());
}
示例2: processCMD
virtual int processCMD()
{
Owned<IClientWsWorkunits> client = createWsWorkunitsClient();
VStringBuffer url("http://%s:%s/WsWorkunits", optServer.sget(), optPort.sget());
client->addServiceUrl(url.str());
if (optUsername.length())
client->setUsernameToken(optUsername.get(), optPassword.sget(), NULL);
StringBuffer wuid;
if (optObj.type==eclObjWuid)
wuid.set(optObj.value.get());
else if (!doDeploy(client, optObj, optCluster.get(), optName.get(), &wuid))
return 1;
StringBuffer descr;
fprintf(stdout, "\nPublishing %s\n", wuid.str());
Owned<IClientWUPublishWorkunitRequest> req = client->createWUPublishWorkunitRequest();
req->setWuid(wuid.str());
req->setActivate(optActivate);
if (optName.length())
req->setJobName(optName.get());
if (optCluster.length())
req->setCluster(optCluster.get());
Owned<IClientWUPublishWorkunitResponse> resp = client->WUPublishWorkunit(req);
if (resp->getExceptions().ordinality())
outputMultiExceptions(resp->getExceptions());
const char *id = resp->getQueryId();
if (id && *id)
fprintf(stdout, "\nPublished\nQuerySet: %s\nQueryName: %s\nQueryId: %s\n", resp->getQuerySet(), resp->getQueryName(), resp->getQueryId());
return 0;
}