Clarity Client Automation

Expand all | Collapse all

WebService - how does the method getGroupMemberListValue work?

Jump to Best Answer
  • 1.  WebService - how does the method getGroupMemberListValue work?

    Posted 03-27-2018 12:04 PM

    Hello everybody, someone can help me? I have this query using the WS method getGroupMemberListValue():

     

    <ser:getGroupMemberListValues>
    <sid>sidValue</sid>
    <whereClause>id = F23053CBDD77D244A29225E9C7D1DA83</whereClause>
    <numToFetch>1</numToFetch>
    <attributes>
    <!--1 or more repetitions:-->
    <string>member</string>
    </attributes>
    </ser:getGroupMemberListValues>

     

    and it returns me:

     

    <soapenv:Fault>
    <faultcode>soapenv:Client</faultcode>
    <faultstring>Error fetching: AHD03053:Bad where clause: Parse error at : "id = F23053CBDD77D244A29225E9C7D1DA83" (Bad where clause)</faultstring>
    <faultactor/>
    <detail>
    <ErrorMessage>Error fetching: AHD03053:Bad where clause: Parse error at : "id = F23053CBDD77D244A29225E9C7D1DA83" (Bad where clause)</ErrorMessage>
    <ErrorCode>103</ErrorCode>
    </detail>
    </soapenv:Fault>

     

    How can I know the member of a Group? There are others ways? or How can I use that method?

     

    Forwards Thanks!



  • 2.  Re: WebService - how does the method getGroupMemberListValue work?
    Best Answer

    Posted 05-07-2018 10:49 AM

    If all you need to do is list members of a computer group, try the OpenUnitGroupComputerMembersList2 method, followed by the GetUnitGroupComputerMembers3 method.

     

    Here's an example:

    (best viewed on the community site, since I'm adding as a screenshot)

     

    - This example is in C#

     

    - It makes use of a ComputerPropertiesRequired2 object to set the properties I want to see for each computer I'm about to list.  In this example, the only property I'm retrieving is the "label" for each computer.

     

    GetSystemGroupUUID is called for obtaining the UUID for the "All Computers" group.

     

    OpenUnitGroupComputerMembersList2  is called with the UUID from the above method, to open the built-in system group for all computers.  Reference: Unit Groups - CA Client Automation - 14.0 - CA Technologies Documentation.  This returns a handle to the list of computers in memory, along with a variable that tells me the count of computers in the list.

     

    - GetUnitGroupComputerMembers3 is then called from a loop, to request the properties from each computer that I requested, which in this example is only the label.