infoRouter Document Management System - Web Services API Documentation Version 7.0
GetLocalGroups
Gets local usergroups in the specifed Domain
Syntax
[Visual Basic]
Public Shared Function GetLocalGroups(ByVal AuthenticationTicket As String, _
ByVal DomainName As String _
) As System.Xml.XmlDocument
Parameters

AuthenticationTicket

infoRouter Authentication Ticket

DomainName

The Domain Name of the local user groups you wish to get.


Return Value
Returns xml fragment. Response elements has two attributes ("Success" and "Error").
if success = "true" then the sub xml element returns a list of "User groups"
if success = "false" the error attribute returns the error message.

<response success="true" error="">
<usergroups>
<usergroup groupname="abc"/>
<usergroups/>
Remarks
The caller must be the system administrator or a domain manager of the specified domain.
Example
Public Sub GetLocalGroups_Sample()
Const IRAuthenticationTicket As String = "sid-xxxxxxxxxxxxx"
Const IR_DomainName As String = "Public"

Dim IR_Obj As InfoRouter.srv
Dim xmlResponse As System.Xml.XmlElement

Try

IR_Obj = New InfoRouter.srv

xmlResponse = IR_Obj.GetLocalGroups(IRAuthenticationTicket, _
IR_DomainName)

If xmlResponse.GetAttribute("success") = "true" Then

Console.WriteLine("-- " & IR_DomainName & " [Local groups] --")
Dim xmlGroups As System.Xml.XmlElement = xmlResponse.FirstChild
Dim xmlgroup As System.Xml.XmlElement

For Each xmlgroup In xmlGroups.ChildNodes
Console.WriteLine(xmlgroup.GetAttribute("GroupName"))
Next

Console.WriteLine("-----------")
xmlGroups = Nothing
Else
Console.WriteLine("The local groups cannot be listed.")
Console.WriteLine("server response:" & xmlResponse.GetAttribute("error"))
End If
xmlResponse = Nothing

Catch ex As Exception
Console.WriteLine("error:" & ex.Message)
Finally
IR_Obj = Nothing
End Try
End Sub
See Also
Get Local Users |
Get Global Groups |
Get All Users
Web Services API Syntax based on infoRouter Document Management System Version 7.0
Copyright() 1998-2008 Active Innovations, Inc.
infoRouter DMS