private retrieveCustomerAccountMemosRequest CreateRequest(SearchParameters searchParam) { var header = new Header { Source = "SIMPL", Security_T = new CharacteristicSpecification[2] }; header.Security_T[0] = new CharacteristicSpecification { name = "userID", Value = new CharacteristicValue { value = "ESB_REG" } }; header.Security_T[1] = new CharacteristicSpecification { name = "employeeID", Value = new CharacteristicValue { value = "11111" } }; //Create a Payload var environement = new CharacteristicSpecification() { name = "environment", Value = new CharacteristicValue() { value = searchParam.Environment } }; var telePhoneNum = new CharacteristicSpecification() { name = "telephoneNumber", Value = new CharacteristicValue() { value = searchParam.TelephoneNumber } }; var sequenceNum = new CharacteristicSpecification() { name = "sequenceNumber", Value = new CharacteristicValue() { value = string.IsNullOrWhiteSpace(searchParam.SequenceNumber) ? "0" : searchParam.SequenceNumber } }; var returnAllSections = new CharacteristicSpecification() { name = "returnAllSectionTypes", Value = new CharacteristicValue() { value = searchParam.ReturnAllSectionTypes.ToString() }, valueType = "boolean" }; var maxNumRecToReturn = new CharacteristicSpecification() { name = "maxNumberOfMemosToReturn", Value = new CharacteristicValue() { value = string.IsNullOrWhiteSpace(searchParam.MaxNumOfNotesReturned.ToString())?string.Empty:searchParam.MaxNumOfNotesReturned.ToString() }, valueType = "integer" }; var characteristics = new CharacteristicSpecification[] { environement, telePhoneNum, sequenceNum, returnAllSections, maxNumRecToReturn }; var additionalInformation = new Entity() { name = "RequestCriteria", Characteristics = characteristics }; var request = new retrieveCustomerAccountMemosRequest() { retrieveCustomerAccountMemos = new retrieveCustomerAccountMemos() { retrieveCustomerAccountMemosInput = new msg_Memo() { Header = header, Payload = new Memo[] { new Memo() { templateName = string.Empty, templateOccurrence = 0, memoKey = "/-.0", sectionName = string.Empty, AdditionalInformation = additionalInformation } } } } }; return request; }
/// <summary> /// /// </summary> /// <param name="locationId"></param> /// <param name="headerArgs"></param> /// <returns></returns> private static invokeRequest CreateSyncPlantRequest(string locationId, HeaderArgs headerArgs) { // construct header var header = new Header { Source = "SIMPL", Security_T = new CharacteristicSpecification[2], ConsumerInfo = new CharacteristicSpecification[4] }; header.Security_T[0] = new CharacteristicSpecification { name = "employeeID", Value = new CharacteristicValue { value = headerArgs.CrisId } }; header.Security_T[1] = new CharacteristicSpecification { name = "userID", Value = new CharacteristicValue { value = headerArgs.CorpId ?? string.Empty } }; header.ConsumerInfo[0] = new CharacteristicSpecification { name = "DPIEnvironment", Value = new CharacteristicValue { value = headerArgs.DpiRegion ?? string.Empty } }; header.ConsumerInfo[1] = new CharacteristicSpecification { name = "name", Value = new CharacteristicValue { value = headerArgs.Name ?? string.Empty } }; header.ConsumerInfo[2] = new CharacteristicSpecification { name = "email", Value = new CharacteristicValue { value = headerArgs.Email ?? string.Empty } }; header.ConsumerInfo[3] = new CharacteristicSpecification { name = "role", Value = new CharacteristicValue { value = headerArgs.Role ?? string.Empty } }; // construct payload var searchCharacteristic = new CharacteristicSpecification[1]; searchCharacteristic[0] = new CharacteristicSpecification { name = "locationId", Value = new CharacteristicValue {value = locationId} }; var searchCriteria = new Entity[1]; searchCriteria[0] = new Entity { type = "ResourceId", Characteristics = searchCharacteristic }; var esbRequest = new invokeRequest { invoke = new invoke { syncResourceInput = new msg_LookupRequest { Header = header, Payload = new LookupRequest { SearchCriteria = searchCriteria } } } }; return esbRequest; }
/// <summary> /// /// </summary> /// <param name="lineTestId"></param> /// <param name="phoneNumber"></param> /// <param name="headerArgs"></param> public bool InitiateLineTest(string lineTestId, string phoneNumber, HeaderArgs headerArgs) { var securityT = new CharacteristicSpecification[2]; var service = new ScheduleServiceDiagnosticTest.Service[1]; securityT[0] = new CharacteristicSpecification { name = "employeeID", Value = new CharacteristicValue { value = headerArgs.CrisId } }; securityT[1] = new CharacteristicSpecification { name = "userID", Value = new CharacteristicValue { value = headerArgs.CorpId } }; service[0] = new ScheduleServiceDiagnosticTest.Service { ServiceIdentification = new IBMTelecomRootObject { ID = lineTestId }, hasStarted = false, ServiceLocation = new Place { GeographicAddress = new GeographicAddress { GeographicAddressExtension = new GeographicAddressExtension { isInFootprint = false } } } }; var esbRequest = new invokeRequest { scheduleServiceDiagnosticTestInput = new msg_Service { Header = new Header { CorrelationId_T = "CORRELID", Source = "SIMPL", MessageId = lineTestId, Security_T = securityT, Timestamp = DateTime.Now }, Payload = service } }; _lineTestClient.invoke(esbRequest); return true; }
public invokeRequest CreateGetFacilitiesRequest(GetFacilitiesRequestDto request, HeaderArgs headerArgs) { //Null checked in caller var usi = request.USI; // construct header var header = new Header { Source = "SIMPL", Security_T = new CharacteristicSpecification[2], ConsumerInfo = new CharacteristicSpecification[4] }; header.Security_T[0] = new CharacteristicSpecification { name = "employeeID", Value = new CharacteristicValue { value = headerArgs.CrisId } }; header.Security_T[1] = new CharacteristicSpecification { name = "userID", Value = new CharacteristicValue { value = headerArgs.CorpId ?? string.Empty } }; header.ConsumerInfo[0] = new CharacteristicSpecification { name = "DPIEnvironment", Value = new CharacteristicValue { value = headerArgs.DpiRegion ?? string.Empty } }; header.ConsumerInfo[1] = new CharacteristicSpecification { name = "name", Value = new CharacteristicValue { value = headerArgs.Name ?? string.Empty } }; header.ConsumerInfo[2] = new CharacteristicSpecification { name = "email", Value = new CharacteristicValue { value = headerArgs.Email ?? string.Empty } }; header.ConsumerInfo[3] = new CharacteristicSpecification { name = "role", Value = new CharacteristicValue { value = headerArgs.Role ?? string.Empty } }; // construct payload var searchCharacteristic = new CharacteristicSpecification[1]; searchCharacteristic[0] = new CharacteristicSpecification { name = "uniqueServiceIdentifier", Value = new CharacteristicValue { value = usi } }; var searchCriteria = new Entity[1]; searchCriteria[0] = new Entity { type = "accountId", Characteristics = searchCharacteristic }; var esbRequest = new invokeRequest() { retrieveServiceDesignInput = new msg_LookupRequest() { Header = header, Payload = new LookupRequest { SearchCriteria = searchCriteria } } }; return esbRequest; }
public invokeRequest CreateRetrieveCustomerServiceConfigurationRequest(string emailAddress, HeaderArgs headerArgs) { var emailAddressParts = emailAddress.Split('@'); // construct header var header = new Header { Source = "SIMPL", Security_T = new CharacteristicSpecification[2], ConsumerInfo = new CharacteristicSpecification[4] }; header.Security_T[0] = new CharacteristicSpecification { name = "employeeID", Value = new CharacteristicValue { value = headerArgs.CrisId } }; header.Security_T[1] = new CharacteristicSpecification { name = "userID", Value = new CharacteristicValue { value = headerArgs.CorpId ?? string.Empty } }; header.ConsumerInfo[0] = new CharacteristicSpecification { name = "DPIEnvironment", Value = new CharacteristicValue { value = headerArgs.DpiRegion ?? string.Empty } }; header.ConsumerInfo[1] = new CharacteristicSpecification { name = "name", Value = new CharacteristicValue { value = headerArgs.Name ?? string.Empty } }; header.ConsumerInfo[2] = new CharacteristicSpecification { name = "email", Value = new CharacteristicValue { value = headerArgs.Email ?? string.Empty } }; header.ConsumerInfo[3] = new CharacteristicSpecification { name = "role", Value = new CharacteristicValue { value = headerArgs.Role ?? string.Empty } }; // construct payload var searchCharacteristic = new CharacteristicSpecification[3]; searchCharacteristic[0] = new CharacteristicSpecification { name = "localPart", Value = new CharacteristicValue { value = emailAddressParts[0] } }; searchCharacteristic[1] = new CharacteristicSpecification { name = "domain", Value = new CharacteristicValue { value = emailAddressParts[1] } }; searchCharacteristic[2] = new CharacteristicSpecification { name = "password", Value = new CharacteristicValue { value = "whocares" } }; var filterCharacteristicsEmail = new CharacteristicSpecification[1]; filterCharacteristicsEmail[0] = new CharacteristicSpecification() { name = "EmailAddress" }; var filterCharacteristicsIp = new CharacteristicSpecification[1]; filterCharacteristicsIp[0] = new CharacteristicSpecification() { name = "internetProtocolAddress" }; var request = new invokeRequest() { retrieveCustomerServiceConfigurationInput = new msg_LookupRequest { Header = header, Payload = new LookupRequest { SearchCriteria = new Entity[1] { new Entity() { name = "EmailAddress", Characteristics = searchCharacteristic } }, FilterCriteria = new Entity[2] { new Entity() { name = "IncludeItems", Characteristics = filterCharacteristicsEmail }, new Entity() { name = "IncludeItems", Characteristics = filterCharacteristicsIp } } } } }; return request; }