SearchQuery
| Article:HOWTO76894 | | | Created: 2012-05-08 | | | Updated: 2012-05-08 | | | Article URL http://www.symantec.com/docs/HOWTO76894 |
Syntax
Query[] SearchQuery(string name, string platform, string dataSource, string containerPath, bool searchSubtree);
Service URLs
Use the following URLs to access the IQueriesService:
http://<localhost>/CCS/Services/Applications/Queries/IQueriesService/WS/WindowsSecurity
https://<localhost>:<portnumber>/CCS/Services/Applications/Queries/IQueriesService/WS/WindowsSecurity
https://<localhost>:<portnumber>/CCS/Services/Applications/Queries/IQueriesService/WS/UsernameSecurity
https://<localhost>:<portnumber>/CCS/Services/Applications/Queries/IQueriesService/Basic/UsernameSecurity
Input parameters
The SearchQuery API requires the following input parameters:
Table: IQueriesService- SearchQuery- input parameters
Return value
The SearchQuery API returns the Query Object in the return value:
Table: IQueriesService- Query Object- return value
Sample: C#
// SearchQuery
QueriesServiceClient client = new QueriesServiceClient();
client.ClientCredentials.UserName.UserName = "e2edom\\administrator";
client.ClientCredentials.UserName.Password = "password@123";
System.Net.ServicePointManager.ServerCertificateValidationCallback = ((sender, certificate, chain, sslPolicyErrors) => true);
try
{
// Search for sepcific query.
string queryName = "Query1";
string platform = "Windows";
string entity = null;
string containerPath = null;
bool searchSubTree = true;
Query[] queries = client.SearchQuery(queryName, platform, entity, containerPath, searchSubTree);
}
catch (Exception exp)
{
Console.WriteLine(exp.Message);
}
Sample: Java client
try
{
// Call Web Service Operation
QueriesService service = new QueriesService();
IQueriesService port = service.getBasicHttpBindingIQueriesService();
// TODO initialize WS operation arguments here
java.lang.String name = "";
java.lang.String platform = "";
java.lang.String dataSource = "";
java.lang.String containerPath = "";
java.lang.Boolean searchSubtree = Boolean.TRUE;
// TODO process result here
ArrayOfQuery result = port.searchQuery(name, platform, dataSource, containerPath, searchSubtree);
List<Query> queries = result.getQuery();
Query query = result.getQuery().get(0);
String id = query.getQueryID();
System.out.println("Result = "+result);
}
catch (Exception exception)
{
System.out.println(exception.getMessage());
}
|
|
Legacy ID
v71889592_v74603629
Article URL http://www.symantec.com/docs/HOWTO76894
Terms of use for this information are found in Legal Notices









Thank you.