private void ListListsRequest_Click(object sender, EventArgs e) { //ListListsRequest // Setup Premiere Connect Object EMsgAPI_Demo.EMsgAPI_ListLists_200810.XOA EM = new EMsgAPI_Demo.EMsgAPI_ListLists_200810.XOA(); // setup Authentication objects EMsgAPI_Demo.EMsgAPI_ListLists_200810.Authentication EMAuthentication = new EMsgAPI_Demo.EMsgAPI_ListLists_200810.Authentication(); EMsgAPI_Demo.EMsgAPI_ListLists_200810.XDDSAuthType XDDSAuth = new EMsgAPI_Demo.EMsgAPI_ListLists_200810.XDDSAuthType(); // init Authentication objects XDDSAuth.Password = txtAccessCode.Text; XDDSAuth.RequesterID = txtUserId.Text; EMAuthentication.XDDSAuth = XDDSAuth; // Setup Request and JobSummaryRequest / JobSummaryResult object EMsgAPI_Demo.EMsgAPI_ListLists_200810.Request Request = new EMsgAPI_Demo.EMsgAPI_ListLists_200810.Request(); EMsgAPI_Demo.EMsgAPI_ListLists_200810.Response Response = new EMsgAPI_Demo.EMsgAPI_ListLists_200810.Response(); EMsgAPI_Demo.EMsgAPI_ListLists_200810.ListListsRequest ListLists_Request = new EMsgAPI_Demo.EMsgAPI_ListLists_200810.ListListsRequest(); EMsgAPI_Demo.EMsgAPI_ListLists_200810.ListListsResult ListLists_Result = new EMsgAPI_Demo.EMsgAPI_ListLists_200810.ListListsResult(); // Set options of ListListsReqeust // Set the List ownership based on cmbListOwnership value switch (cmbListOwnership.Text) { case "customer": // customer level list ListLists_Request.Ownership = EMsgAPI_Demo.EMsgAPI_ListLists_200810.OwnershipLevelType.customer; break; case "user": // user level list ListLists_Request.Ownership = EMsgAPI_Demo.EMsgAPI_ListLists_200810.OwnershipLevelType.user; break; default: // default to system level list ListLists_Request.Ownership = EMsgAPI_Demo.EMsgAPI_ListLists_200810.OwnershipLevelType.system; break; } // switch // set ownershipSpecified value ListLists_Request.OwnershipSpecified = true; // Set the List store value (MessageREACH or XDDS) switch (cmbDomain.Text) { case "usme": case "flusme": // Email Lists //ListLists_Request.ListStore = EMsgAPI_Demo.EMsgAPI_ListLists_200810.ListStoreType.MR; ListLists_Request.ListStore = "MR"; break; case "xip": case "test2": // Fax or Voice Lists //ListLists_Request.ListStore = EMsgAPI_Demo.EMsgAPI_ListLists_200810.ListStoreType.XDDS; ListLists_Request.ListStore = "XDDS"; break; } // switch // set ListStore Specifieied Value // ListLists_Request.ListStoreSpecified = true; // Set Server URL and Proxy information if needed Set_Server_and_Proxy(EM); // Setup Request object Request.ReceiverKey = EM.Url; Request.Authentication = EMAuthentication; Request.ResultRequired = EMsgAPI_Demo.EMsgAPI_ListLists_200810.RequiredType.yes; Request.ResponseRequiredSpecified = true; // Assign Request and Response objects to EM Object EM.RequestValue = Request; EM.ResponseValue = Response; // Try the ListCreate function call try { ListLists_Result = EM.ListLists(ListLists_Request); } catch (Exception ex) { System.Console.WriteLine(ex.Message); System.Console.Read(); return; } if (ListLists_Result.ListInfo != null) { int n; n = ListLists_Result.ListInfo.GetLength(0); string ListNames = ""; for (int i = 0; i < n; i++) { ListNames += ListLists_Result.ListInfo[i].ListId.Value + "\r\n"; } // for MessageBox.Show(ListNames.ToString(), "Lists"); } }