public static Request Create(User User) { Request Req = new Request(); Req.Payload = String.Format(@"<?xml version=""1.0"" encoding=""utf-16""?><GetDDFields xmlns=""http://tempuri.org/""><clientID>{0}</clientID></GetDDFields>", User.InitData.Descendants(User.d2p1 + "ClientID").First().Value); Req.SoapAction = "http://tempuri.org/IMediusService/GetDDFields"; Req.Service = "Medius"; return Req; }
public static byte[] EncryptRequest(Request Req, string Key = null) { Key = Key ?? ZipKey; byte[] ReqData = Encoding.Unicode.GetBytes(Req.Payload); byte[] KeyData = Encoding.UTF8.GetBytes(Key); return ZipCrypto.Encrypt(ReqData, KeyData); }
public static Request Create() { Request Req = new Request(); Req.Payload = String.Format( @"<?xml version=""1.0"" ?><GetInitData xmlns=""http://tempuri.org/""><browserStats>{0}</browserStats></GetInitData>", GetStats()); Req.Service = "Data"; Req.SoapAction = "http://tempuri.org/IDataService/GetInitData"; return Req; }
public static Request Create(DateTime Start, DateTime End, User User, string Stamnummer) { Request Req = new Request(); Req.Payload = String.Format( @"<?xml version=""1.0"" encoding=""utf-16""?><VulAgendaCDS xmlns=""http://tempuri.org/""><clientID>{0}</clientID><isPersAgenda>false</isPersAgenda><pers></pers><stamnr>{1}</stamnr><gebr></gebr><dStart>{2:o}</dStart><dFinish>{3:o}</dFinish><bPersoonlijk>true</bPersoonlijk><bSchool>true</bSchool><bRooster>true</bRooster><bVerborgen>false</bVerborgen><bTaken>true</bTaken><useAgenda20>false</useAgenda20></VulAgendaCDS>", User.InitData.Descendants(User.d2p1 + "ClientID").First().Value, Stamnummer, Start, End); Req.Service = "Agenda"; XDocument D; Req.SoapAction = "http://tempuri.org/IAgendaService/VulAgendaCDS"; return Req; }
public static Request Create(string Username, string Password) { Request Req = new Request(); Req.SoapAction = "http://tempuri.org/ILoginService/Login"; Req.Service = "Login"; var ConvertedUsername = Crypto.CryptPass(Username); var ConvertedPassword = Crypto.CryptPass(Password); Req.Payload = String.Format( "<?xml version=\"1.0\" encoding=\"utf-16\"?><Login xmlns=\"http://tempuri.org/\"><userName>{0}</userName><password>{1}</password><language>NL</language><debugMode>false</debugMode></Login>", ConvertedUsername, ConvertedPassword ); return Req; }
public static Request Create(User User, IEnumerable<int> Ids) { string SThing = ""; foreach (var i in Ids) { SThing += "<d2p1:int>" + i + "</d2p1:int>"; } Request Req = new Request(); Req.Payload = String.Format("<?xml version=\"1.0\" encoding=\"utf-16\"?><GetLeerlingenData xmlns=\"http://tempuri.org/\">"+ "<clientID>{0}</clientID>"+ "<ids xmlns:d2p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\" "+ "xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\">{1}</ids>"+ "<getData>true</getData><getDescription>true</getDescription><getPicture>true</getPicture><getOndSoort>true</getOndSoort></GetLeerlingenData>", User.InitData.Descendants(User.d2p1 + "ClientID").First().Value, SThing); Req.Service = "Data"; Req.SoapAction = "http://tempuri.org/IDataService/GetLeerlingenData"; return Req; }