public InstitutionUserResponse GetUsers(string peopleGroupId) { // Add the proper XML to the Call node XmlDocument newRequest = new XmlDocument(); newRequest.LoadXml(RequestBase.InnerXml); // Parameter 1 XmlNode argNode = newRequest.CreateElement("arg"); XmlAttribute nameAttribute = newRequest.CreateAttribute("name"); nameAttribute.Value = "groupid"; // ReSharper disable once PossibleNullReferenceException argNode.Attributes.Append(nameAttribute); argNode.AppendChild(newRequest.CreateTextNode(peopleGroupId)); // Get the call node var callNode = newRequest.GetElementsByTagName("call")[0]; // Assumption this is here. It is built in the constructor callNode.AppendChild(argNode); // Parameter 2 XmlNode argNode2 = newRequest.CreateElement("arg"); XmlAttribute nameAttribute2 = newRequest.CreateAttribute("name"); nameAttribute2.Value = "subunitid"; // ReSharper disable once PossibleNullReferenceException argNode2.Attributes.Append(nameAttribute2); argNode2.AppendChild(newRequest.CreateTextNode(SubUnitId)); // Get the call node callNode.AppendChild(argNode2); var eValueApiService = new EValuePeopleGroupApi.PeopleGroup_1_0Service() { Url = _url }; XmlDocument responseXml = new XmlDocument(); responseXml.LoadXml(eValueApiService.getUsersByGroup(newRequest.InnerXml)); return(ExtractGroupUserResponseFromXml(responseXml)); }
/// <summary> /// Gets all of the personal records for a given user. /// </summary> /// <returns></returns> public PeopleGroupsResponse GetAll() { // Add the proper XML to the Call node XmlDocument newRequest = new XmlDocument(); newRequest.LoadXml(RequestBase.InnerXml); var eValueApiService = new EValuePeopleGroupApi.PeopleGroup_1_0Service() { Url = _url }; XmlDocument responseXml = new XmlDocument(); responseXml.LoadXml(eValueApiService.getAll(newRequest.InnerXml)); return(ExtractResponseFromXml(responseXml)); }