private void ProfileReadRequest_Click(object sender, EventArgs e) { //ProfileReadRequest // setup EMsgAPI object - EM EMsgAPI_Demo.EMsgAPI_ProfileRead_201101.ProfileReadService EM = new EMsgAPI_Demo.EMsgAPI_ProfileRead_201101.ProfileReadService(); // setup Authentication objects EMsgAPI_ProfileRead_201101.RequestAuthentication reqAuth = new EMsgAPI_ProfileRead_201101.RequestAuthentication(); EMsgAPI_ProfileRead_201101.XDDSAuthType XDDSAuth = new EMsgAPI_ProfileRead_201101.XDDSAuthType(); EMsgAPI_ProfileRead_201101.UIDType uid = new EMsgAPI_ProfileRead_201101.UIDType(); // init Authentication objects XDDSAuth.Password = txtAccessCode.Text; uid.Value = txtUserId.Text; //have to set the alias type when not using regular user id //Need type when using ProfileEntityName below //uid.aliasType = "M2F"; XDDSAuth.RequesterID = uid; reqAuth.Item = XDDSAuth; // Setup Request and JobSummaryRequest / JobSummaryResult object EMsgAPI_Demo.EMsgAPI_ProfileRead_201101.Request Request = new EMsgAPI_Demo.EMsgAPI_ProfileRead_201101.Request(); EMsgAPI_Demo.EMsgAPI_ProfileRead_201101.Response Response = new EMsgAPI_Demo.EMsgAPI_ProfileRead_201101.Response(); EMsgAPI_Demo.EMsgAPI_ProfileRead_201101.ProfileReadRequest ProfileRead_Request = new EMsgAPI_Demo.EMsgAPI_ProfileRead_201101.ProfileReadRequest(); EMsgAPI_Demo.EMsgAPI_ProfileRead_201101.ProfileReadResult ProfileRead_Result = new EMsgAPI_Demo.EMsgAPI_ProfileRead_201101.ProfileReadResult(); // 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"; } // This uses ProfileEntityId pass the correct AN depending on Level ProfileRead_Request.ProfileLevel = EMsgAPI_Demo.EMsgAPI_ProfileRead_201101.ProfileLevelType.user; ProfileRead_Request.Item = "ANintQuoted"; // This uses ProfileEntityName, need Type and value //EMsgAPI_Demo.EMsgAPI_ProfileRead_201101.ProfileEntityNameType entitynameType = new EMsgAPI_Demo.EMsgAPI_ProfileRead_201101.ProfileEntityNameType(); //UserID should be email address and then set aliastype //entitynameType.Value = txtUserId.Text; //entitynameType.aliasType = "M2F"; //ProfileRead_Request.Item = entitynameType; // Setup Reqeust Object Request.ReceiverKey = EM.Url; Request.Authentication = reqAuth; // Set Request / Response values on Premiere Connect Object EM.RequestValue = Request; EM.ResponseValue = Response; try { if (cmbServer.Text.Contains("Async")) { EM.ProfileRead(ProfileRead_Request); ProfileRead_Result = null; } else ProfileRead_Result = EM.ProfileRead(ProfileRead_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, ProfileRead_Result); //serializeResult(reqfilename, ProfileRead_Request); } } catch (IOException io_error) { MessageBox.Show("Error - " + io_error, "Error", MessageBoxButtons.OK); } }