private void CustomerCreateRequest_Click(object sender, EventArgs e) { //CustomerCreateRequest // Setup Premiere Connect Object EMsgAPI_Demo.EMsgAPIADMIN.XOAM EM = new EMsgAPI_Demo.EMsgAPIADMIN.XOAM(); // Setup Authentication objects EMsgAPI_Demo.EMsgAPIADMIN.Authentication EMAuthentication = new EMsgAPI_Demo.EMsgAPIADMIN.Authentication(); EMsgAPI_Demo.EMsgAPIADMIN.XDDSAuthType XDDSAuth = new EMsgAPI_Demo.EMsgAPIADMIN.XDDSAuthType(); // Init Authentication objects XDDSAuth.Password = txtAccessCode.Text; // User ID XDDSAuth.RequesterID = txtUserId.Text; // Passcode EMAuthentication.XDDSAuth = XDDSAuth; // Setup Request and UserInfo Request / UserInfo Result object EMsgAPI_Demo.EMsgAPIADMIN.Request Request = new EMsgAPI_Demo.EMsgAPIADMIN.Request(); EMsgAPI_Demo.EMsgAPIADMIN.Response Response = new EMsgAPI_Demo.EMsgAPIADMIN.Response(); EMsgAPI_Demo.EMsgAPIADMIN.CustomerCreateRequest CustomerCreate_Request = new EMsgAPI_Demo.EMsgAPIADMIN.CustomerCreateRequest(); EMsgAPI_Demo.EMsgAPIADMIN.CustomerCreateResult CustomerCreate_Result = new EMsgAPI_Demo.EMsgAPIADMIN.CustomerCreateResult(); // Setup CustomerCreate Request //PT Model Customer 1090 CustomerCreate_Request.ModelCustomer = 1090; //Test2 Model Customer 591058, t2/jeichers //CustomerCreate_Request.ModelCustomer = 591058; //PT Application 4002 CustomerCreate_Request.Application = 4002; //Test2 Application is not needed CustomerCreate_Request.ApplicationSpecified = true; CustomerCreate_Request.BusinessSpecified = false; CustomerCreate_Request.CustomerAccountStatus = EMsgAPI_Demo.EMsgAPIADMIN.AcctServiceStatusType.active; CustomerCreate_Request.CustomerAccountStatusSpecified = true; EMsgAPI_Demo.EMsgAPIADMIN.EncodableStringType CustomerName = new EMsgAPI_Demo.EMsgAPIADMIN.EncodableStringType(); CustomerName.Value = "BruceRechichar"; CustomerCreate_Request.CustomerName = CustomerName; EMsgAPI_Demo.EMsgAPIADMIN.AcctAddressType UserAddress = new EMsgAPI_Demo.EMsgAPIADMIN.AcctAddressType(); EMsgAPI_Demo.EMsgAPIADMIN.EncodableStringType AddressCity = new EMsgAPI_Demo.EMsgAPIADMIN.EncodableStringType(); AddressCity.Value = "Perris"; UserAddress.AddressCity = AddressCity; EMsgAPI_Demo.EMsgAPIADMIN.EncodableStringType AddressCountry = new EMsgAPI_Demo.EMsgAPIADMIN.EncodableStringType(); AddressCountry.Value = "USA"; UserAddress.AddressCountry = AddressCountry; EMsgAPI_Demo.EMsgAPIADMIN.EncodableStringType AddressZip = new EMsgAPI_Demo.EMsgAPIADMIN.EncodableStringType(); AddressZip.Value = "92571"; UserAddress.AddressZIP = AddressZip; EMsgAPI_Demo.EMsgAPIADMIN.EncodableStringType AddressStreet1 = new EMsgAPI_Demo.EMsgAPIADMIN.EncodableStringType(); AddressStreet1.Value = "1401AvilaDrive"; UserAddress.AddressStreet1 = AddressStreet1; EMsgAPI_Demo.EMsgAPIADMIN.EncodableStringType AddressState = new EMsgAPI_Demo.EMsgAPIADMIN.EncodableStringType(); AddressState.Value = "CA"; UserAddress.AddressState = AddressState; CustomerCreate_Request.CustomerAddress = UserAddress; EMsgAPI_Demo.EMsgAPIADMIN.AcctContactType CustContact = new EMsgAPI_Demo.EMsgAPIADMIN.AcctContactType(); EMsgAPI_Demo.EMsgAPIADMIN.EncodableStringType ContactPhone = new EMsgAPI_Demo.EMsgAPIADMIN.EncodableStringType(); EMsgAPI_Demo.EMsgAPIADMIN.EncodableStringType ContactName = new EMsgAPI_Demo.EMsgAPIADMIN.EncodableStringType(); EMsgAPI_Demo.EMsgAPIADMIN.EncodableStringType ContactEmail = new EMsgAPI_Demo.EMsgAPIADMIN.EncodableStringType(); ContactPhone.Value = "909-266-1830"; ContactName.Value = "BruceRechichar"; ContactEmail.Value = "bruce.rechichar@premeireglobal.com"; CustContact.ContactPhone = ContactPhone; CustContact.ContactName = ContactName; CustContact.ContactEmail = ContactEmail; CustomerCreate_Request.CustomerContact = CustContact; CustomerCreate_Request.AdminContact = CustContact; EMsgAPI_Demo.EMsgAPIADMIN.CustomerCreateRequestInitialUserInfo CustInfo = new EMsgAPI_Demo.EMsgAPIADMIN.CustomerCreateRequestInitialUserInfo(); EMsgAPI_Demo.EMsgAPIADMIN.EncodableStringType UserName = new EMsgAPI_Demo.EMsgAPIADMIN.EncodableStringType(); UserName.Value = "BruceRechichar"; CustInfo.UserName = UserName; CustInfo.UserAccountStatus = EMsgAPI_Demo.EMsgAPIADMIN.AcctServiceStatusType.active; CustInfo.UserAccountStatusSpecified = true; CustInfo.UserAddress = UserAddress; CustInfo.UserId = "pt/bruce3"; CustInfo.UserContact = CustContact; CustInfo.Password = "welcome"; CustInfo.DefaultProfileSpecified = true; CustInfo.DefaultProfile = 0; CustInfo.Mbox = true; CustInfo.MboxSpecified = true; EMsgAPI_Demo.EMsgAPIADMIN.DestinationType ReportInfo = new EMsgAPI_Demo.EMsgAPIADMIN.DestinationType(); ReportInfo.type = EMsgAPI_Demo.EMsgAPIADMIN.ReportAddressType.internet; ReportInfo.Value = "bruce.rechichar@premiereglobal.com"; CustInfo.ReportAddress = ReportInfo; CustomerCreate_Request.InitialUserInfo = CustInfo; // Setup Proxy server and EMsgAPIConnect URL for posting data Set_Server_and_Proxy(EM); // Set Request methods Request.ReceiverKey = EM.Url; Request.Authentication = EMAuthentication; Request.ResultRequired = EMsgAPI_Demo.EMsgAPIADMIN.RequiredType.yes; Request.ResponseRequiredSpecified = true; // Set Request / Response values on Premiere Connect Object EM.RequestValue = Request; EM.ResponseValue = Response; try { CustomerCreate_Result = EM.CustomerCreate(CustomerCreate_Request); } catch (Exception ex) { System.Console.WriteLine(ex.Message); System.Console.Read(); return; } }