private void UserUpdateRequest_Click(object sender, EventArgs e) { //UserUpdateRequest // setup EMsgAPI object - EM EMsgAPI_Demo.EMsgAPI_UserUpdate_201101.UserUpdateService EM = new EMsgAPI_Demo.EMsgAPI_UserUpdate_201101.UserUpdateService(); // setup Authentication objects EMsgAPI_UserUpdate_201101.RequestAuthentication reqAuth = new EMsgAPI_UserUpdate_201101.RequestAuthentication(); EMsgAPI_UserUpdate_201101.XDDSAuthType XDDSAuth = new EMsgAPI_UserUpdate_201101.XDDSAuthType(); EMsgAPI_UserUpdate_201101.UIDType uid = new EMsgAPI_UserUpdate_201101.UIDType(); // init Authentication objects XDDSAuth.Password = txtAccessCode.Text; //user id = email address for Fax2Mail uid.Value = txtUserId.Text; //have to set the alias type when not using regular user id uid.aliasType = "M2F"; XDDSAuth.RequesterID = uid; reqAuth.Item = XDDSAuth; // Setup Request and UserCreate Request / UserCreate Result object EMsgAPI_Demo.EMsgAPI_UserUpdate_201101.Request Request = new EMsgAPI_Demo.EMsgAPI_UserUpdate_201101.Request(); EMsgAPI_Demo.EMsgAPI_UserUpdate_201101.Response Response = new EMsgAPI_Demo.EMsgAPI_UserUpdate_201101.Response(); EMsgAPI_Demo.EMsgAPI_UserUpdate_201101.UserUpdateRequest UserUpdate_Request = new EMsgAPI_Demo.EMsgAPI_UserUpdate_201101.UserUpdateRequest(); EMsgAPI_Demo.EMsgAPI_UserUpdate_201101.UserUpdateResult UserUpdate_Result = new EMsgAPI_Demo.EMsgAPI_UserUpdate_201101.UserUpdateResult(); // Setup Proxy server and EMsgAPIConnect URL for posting data Set_Server_and_Proxy(EM); // Setup Reqeust Object Request.ReceiverKey = EM.Url; Request.Authentication = reqAuth; // Set Request / Response values on Premiere Connect Object EM.RequestValue = Request; EM.ResponseValue = Response; // Setup UserCreate Request EMsgAPI_Demo.EMsgAPI_UserUpdate_201101.UserAliasType UserAlias = new EMsgAPI_Demo.EMsgAPI_UserUpdate_201101.UserAliasType(); UserAlias.Item = txtUserId2.Text; UserUpdate_Request.UserAlias = UserAlias; EMsgAPI_Demo.EMsgAPI_UserUpdate_201101.DestinationType UserReportAddress = new EMsgAPI_Demo.EMsgAPI_UserUpdate_201101.DestinationType(); UserReportAddress.type = EMsgAPI_Demo.EMsgAPI_UserUpdate_201101.ReportAddressType.internet; UserReportAddress.Value = "thuneke@easylink.com"; UserUpdate_Request.ReportAddress = UserReportAddress; UserUpdate_Request.DefaultProfileSpecified = false; UserUpdate_Request.Password = "welcome"; try { UserUpdate_Result = EM.UserUpdate(UserUpdate_Request); } catch (Exception ex) { System.Console.WriteLine(ex.Message); System.Console.Read(); return; } string emfilename = "emresponse.xml"; string resfilename = "result.xml"; //string reqfilename = "request.xml"; try { //This will output the response, result and request(if uncommented) to XML files in the //installed directory. This can be very usefull for debugging or ir help is requested from //the EMAPI support team if (chkResult) { serializeResult(emfilename, EM.ResponseValue); serializeResult(resfilename, UserUpdate_Result); //serializeResult(reqfilename, UserUpdate_Request); } } catch (IOException io_error) { MessageBox.Show("Error - " + io_error, "Error", MessageBoxButtons.OK); } }