public RDeviceProfile GetDeviceProfile(string profileName) { XmlDocument xmlDoc = AxlHttpCaller.DoSoapRequestXml("<ns:getDeviceProfile><name>" + profileName + "</name></ns:getDeviceProfile>", "getDeviceProfile", _callManagerIP, _axlUser, _axlPassword, _cucmDbVersion); XmlNodeList profile = xmlDoc.GetElementsByTagName("deviceProfile"); if (profile.Count > 0) { RDeviceProfile pr = new RDeviceProfile(); pr.Name = profile[0].SelectSingleNode("name").InnerText; XmlNode lines = profile[0].SelectSingleNode("lines"); if (lines != null) { XmlNode line = lines.SelectSingleNode("line"); XmlNode label = line.SelectSingleNode("label"); XmlNode displayAscii = line.SelectSingleNode("displayAscii"); XmlNode dirn = line.SelectSingleNode("dirn"); XmlNode uuid = dirn.SelectSingleNode("uuid"); pr.ASCIILabel = displayAscii.InnerText; pr.Label = label.InnerText; pr.Dirn = uuid.InnerText; } return(pr); } return(null); }
public void UpdateDeviceProfile(RDeviceProfile profile) { StringBuilder sb = new StringBuilder(); sb.Append("<ns:updateDeviceProfile>"); sb.AppendFormat("<name>{0}</name>", profile.Name); sb.Append("<lines>"); sb.Append("<line>"); sb.Append("<index>1</index>"); sb.AppendFormat("<label>{0}</label>", profile.Label); sb.Append("</line>"); sb.Append("</lines>"); sb.Append("</ns:updateDeviceProfile>"); AxlHttpCaller.DoSoapRequestXml(sb.ToString(), "updateDeviceProfile", _callManagerIP, _axlUser, _axlPassword, _cucmDbVersion); }