4.2 Search for a Client Computer
This example demonstrates how to search for a client computer named "WSUSAR-CL1.example.com" by using the ExecuteSPSearchComputers (section 3.1.4.38) WSDL operation.

Figure 6: Searching for a client computer
The client protocol implementation constructs the following WSDL message:
-
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <ExecuteSPSearchComputers xmlns="http://www.microsoft.com/SoftwareDistribution/Server/ApiRemotingWebService"> <computerTargetScopeXml><?xml version="1.0" encoding="utf-16"?><ComputerTargetScope NameIncludes="%WSUSAR-CL1%" FromLastSyncTime="01-01-1753 00:00:00.000" ToLastSyncTime="12-31-9999 23:59:59.997" FromLastReportedStatusTime="01-01-1753 00:00:00.000" ToLastReportedStatusTime="12-31-9999 23:59:59.997" IncludedInstallationStates="-1" ExcludedInstallationStates="0" IncludeDownstreamComputerTargets="0" /></computerTargetScopeXml> </ExecuteSPSearchComputers> </soap:Body> </soap:Envelope>
The message ExecuteSPSearchComputers (section 3.1.4.38.1) is used to search for a registered client computer that has a name which includes the string "WSUSAR-CL1". In this example, there is exactly one client computer that matches the search string. The protocol server implementation responds with the following WSDL message:
-
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <ExecuteSPSearchComputersResponse xmlns="http://www.microsoft.com/SoftwareDistribution/Server/ApiRemotingWebService"> <ExecuteSPSearchComputersResult> <ArrayOfGenericReadableRow> <GenericReadableRow> <Values> <anyType xsi:type="xsd:string">06d109ef-f86b-4b17-bb36-956730cb2eaa</anyType> <anyType xsi:type="xsd:dateTime">2013-09-14T00:03:02.867</anyType> <anyType xsi:type="xsd:dateTime">2013-09-14T00:03:04.187</anyType> <anyType xsi:type="xsd:string">2001:4898:d8:f222:352d:697d:eda6:3f6c</anyType> <anyType xsi:type="xsd:string">WSUSAR-CL1.example.com</anyType> <anyType xsi:type="xsd:int">6</anyType> <anyType xsi:type="xsd:int">3</anyType> <anyType xsi:type="xsd:int">9600</anyType> <anyType xsi:type="xsd:int">0</anyType> <anyType xsi:type="xsd:int">0</anyType> <anyType xsi:type="xsd:string">en-US</anyType> <anyType xsi:type="xsd:string">Microsoft Corporation</anyType> <anyType xsi:type="xsd:string">Virtual Machine</anyType> <anyType xsi:type="xsd:string">090006 </anyType> <anyType xsi:type="xsd:string">BIOS Date: 05/23/12 17:15:53 Ver: 09.00.06</anyType> <anyType xsi:type="xsd:dateTime">2012-05-23T00:00:00</anyType> <anyType xsi:type="xsd:string">AMD64</anyType> <anyType xsi:nil="true" /> <anyType xsi:nil="true" /> <anyType xsi:nil="true" /> <anyType xsi:type="xsd:int">1</anyType> <anyType xsi:type="xsd:short">400</anyType> <anyType xsi:type="xsd:unsignedByte">3</anyType> <anyType xsi:type="xsd:int">8</anyType> <anyType xsi:type="xsd:int">0</anyType> <anyType xsi:type="xsd:string">7.9.9600.16384</anyType> <anyType xsi:type="xsd:string">Windows</anyType> <anyType xsi:nil="true" /> </Values> </GenericReadableRow> </ArrayOfGenericReadableRow> <ArrayOfGenericReadableRow /> <ArrayOfGenericReadableRow> <GenericReadableRow> <Values> <anyType xsi:type="xsd:string">06d109ef-f86b-4b17-bb36-956730cb2eaa</anyType> <anyType xmlns:q1="http://microsoft.com/wsdl/types/" xsi:type="q1:guid">b73ca6ed-5727-47f3-84de-015e03f6a88a</anyType> </Values> </GenericReadableRow> <GenericReadableRow> <Values> <anyType xsi:type="xsd:string">06d109ef-f86b-4b17-bb36-956730cb2eaa</anyType> <anyType xmlns:q2="http://microsoft.com/wsdl/types/" xsi:type="q2:guid">a0a08746-4dbe-4a37-9adf-9e7652c0b421</anyType> </Values> </GenericReadableRow> </ArrayOfGenericReadableRow> </ExecuteSPSearchComputersResult> </ExecuteSPSearchComputersResponse> </soap:Body> </soap:Envelope>