private void ProfileUpdateRequest_Click(object sender, EventArgs e) { //ProfileUpdateRequest // setup EMsgAPI object - EM EMsgAPI_Demo.EMsgAPI_ProfileUpdate_201101.ProfileUpdateService EM = new EMsgAPI_Demo.EMsgAPI_ProfileUpdate_201101.ProfileUpdateService(); // setup Authentication objects EMsgAPI_ProfileUpdate_201101.RequestAuthentication reqAuth = new EMsgAPI_ProfileUpdate_201101.RequestAuthentication(); EMsgAPI_ProfileUpdate_201101.XDDSAuthType XDDSAuth = new EMsgAPI_ProfileUpdate_201101.XDDSAuthType(); EMsgAPI_ProfileUpdate_201101.UIDType uid = new EMsgAPI_ProfileUpdate_201101.UIDType(); // init Authentication objects XDDSAuth.Password = txtAccessCode.Text; uid.Value = txtUserId.Text; XDDSAuth.RequesterID = uid; reqAuth.Item = XDDSAuth; // Setup Request and JobSummaryRequest / JobSummaryResult object EMsgAPI_Demo.EMsgAPI_ProfileUpdate_201101.Request Request = new EMsgAPI_Demo.EMsgAPI_ProfileUpdate_201101.Request(); EMsgAPI_Demo.EMsgAPI_ProfileUpdate_201101.Response Response = new EMsgAPI_Demo.EMsgAPI_ProfileUpdate_201101.Response(); EMsgAPI_Demo.EMsgAPI_ProfileUpdate_201101.ProfileUpdateRequest ProfileUpdate_Request = new EMsgAPI_Demo.EMsgAPI_ProfileUpdate_201101.ProfileUpdateRequest(); EMsgAPI_Demo.EMsgAPI_ProfileUpdate_201101.ProfileUpdateResult ProfileUpdate_Result = new EMsgAPI_Demo.EMsgAPI_ProfileUpdate_201101.ProfileUpdateResult(); // Setup Proxy server and EMsgAPIConnect URL for posting data Set_Server_and_Proxy(EM); // Setup Reqeust Object if (cmbServer.Text.Contains("Async")) { Request.SenderKey = "http://www.bdrsoftware.com/Service1.asmx"; } // Setup Reqeust Object Request.ReceiverKey = EM.Url; Request.Authentication = reqAuth; EMsgAPI_Demo.EMsgAPI_ProfileUpdate_201101.ProfileUpdateSpecType[] ProfileItems = new EMsgAPI_Demo.EMsgAPI_ProfileUpdate_201101.ProfileUpdateSpecType[1]; ProfileItems[0] = new EMsgAPI_Demo.EMsgAPI_ProfileUpdate_201101.ProfileUpdateSpecType(); ProfileItems[0].ProfileLevel = EMsgAPI_Demo.EMsgAPI_ProfileUpdate_201101.ProfileLevelType.user; //Set int depending on AN Level ProfileItems[0].Item = "ANintQuoted"; ProfileItems[0].ProfileItemName = txtProfileKey1.Text; ProfileItems[0].NewItemValue = txtProfileValue1.Text; ProfileUpdate_Request.ProfileUpdateItem = ProfileItems; // Set Request / Response values on Premiere Connect Object EM.RequestValue = Request; EM.ResponseValue = Response; try { if (cmbServer.Text.Contains("Async")) { EM.ProfileUpdate(ProfileUpdate_Request); ProfileUpdate_Result = null; } else ProfileUpdate_Result = EM.ProfileUpdate(ProfileUpdate_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, ProfileUpdate_Result); //serializeResult(reqfilename, ProfileUpdate_Request); } } catch (IOException io_error) { MessageBox.Show("Error - " + io_error, "Error", MessageBoxButtons.OK); } }