public PortInNotificationResponse PortInNotification(PortInNotification Request) { //throw new NotImplementedException(); PortInNotificationResponse portInNotificationResponse = new PortInNotificationResponse(); // Check the Reference Id is not null if (Request.PortingRefernceID.Id == null) { var sdpStatusFault = new SDPStatusFault() { consumerReferenceID = Request.sdpServiceHeaders.consumerReferenceId, sdpStatusLine = new SDPStatusLine() { severity = SDPSeverity.ERROR, statusCode = "500", statusDescription = "Reference Id is null" } }; throw new FaultException <SDPStatusFault>(sdpStatusFault); } portInNotificationResponse.RequestId = Request.PortingRequestID.Id; portInNotificationResponse.ReferenceId = Request.PortingRefernceID.Id; portInNotificationResponse.ResponseDateTime = DateTime.Now; portInNotificationResponse.RequestDateTime = Request.sdpServiceHeaders.consumerReferenceDateTime; portInNotificationResponse.Results = "SUCCESS"; return(portInNotificationResponse); }
public PortInNotificationResponse portInNotification(PortInNotificationRequest Request) { FaultResponse FaultResponse; PortInNotificationResponse PortInNotificationResponse = new PortInNotificationResponse(); // Check the Reference Id is not null if (Request.PortInNotification.referenceID.Id == null) { FaultResponse = new FaultResponse(); FaultResponse.statusCode = "SPD_MandatoryParameterMissing"; FaultResponse.SDPStatusLine.statusCode = "SPD_MandatoryParameterMissing"; FaultResponse.SDPStatusLine.statusDescription = "Missing Reference Id"; FaultResponse.SDPStatusLine.Severity = "CRITICAL"; FaultResponse.statusTime = DateTime.Now; FaultResponse.SDPStatusLine.stepStatusTime = DateTime.Now; FaultResponse.consumerReferenceId = Request.sdpServiceHeaders.consumerReferenceId; throw new FaultException <FaultResponse>(FaultResponse); } // Invalid Reference Id if (Request.PortInNotification.referenceID.Id != "VT40000287_160727") { FaultResponse = new FaultResponse(); FaultResponse.statusCode = "SPD_InputValidationFault"; FaultResponse.SDPStatusLine.statusCode = "SPD_InputValidationFault"; FaultResponse.SDPStatusLine.statusDescription = "Invalid Reference Id"; FaultResponse.SDPStatusLine.Severity = "CRITICAL"; FaultResponse.statusTime = DateTime.Now; FaultResponse.SDPStatusLine.stepStatusTime = DateTime.Now; FaultResponse.consumerReferenceId = Request.sdpServiceHeaders.consumerReferenceId; throw new FaultException <FaultResponse>(FaultResponse); } // Check the MSISDN if (Request.PortInNotification.serviceID.serviceID == null) { FaultResponse = new FaultResponse(); FaultResponse.statusCode = "SPD_MandatoryParameterMissing"; FaultResponse.SDPStatusLine.statusCode = "SPD_MandatoryParameterMissing"; FaultResponse.SDPStatusLine.statusDescription = "Missing Service Number"; FaultResponse.SDPStatusLine.Severity = "CRITICAL"; FaultResponse.statusTime = DateTime.Now; FaultResponse.SDPStatusLine.stepStatusTime = DateTime.Now; FaultResponse.consumerReferenceId = Request.sdpServiceHeaders.consumerReferenceId; throw new FaultException <FaultResponse>(FaultResponse); } // Invalid MSISDN if (Request.PortInNotification.serviceID.serviceID != "98340654") { FaultResponse = new FaultResponse(); FaultResponse.statusCode = "SPD_InputValidationFault"; FaultResponse.SDPStatusLine.statusCode = "SPD_InputValidationFault"; FaultResponse.SDPStatusLine.statusDescription = "Invalid Service Number"; FaultResponse.SDPStatusLine.Severity = "CRITICAL"; FaultResponse.statusTime = DateTime.Now; FaultResponse.SDPStatusLine.stepStatusTime = DateTime.Now; FaultResponse.consumerReferenceId = Request.sdpServiceHeaders.consumerReferenceId; throw new FaultException <FaultResponse>(FaultResponse); } PortInNotificationResponse = new PortInNotificationResponse(); PortInNotificationResponse.RequestId = Request.PortInNotification.requestID.Id; PortInNotificationResponse.ReferenceId = Request.PortInNotification.referenceID.Id; PortInNotificationResponse.ResponseDateTime = DateTime.Now; PortInNotificationResponse.RequestDateTime = Request.sdpServiceHeaders.consumerReferenceDateTime; PortInNotificationResponse.Results = "SUCCESS"; return(PortInNotificationResponse); }