Lead Validation International C# Code Snippet

try
{
    wsClient = new LVISoapServiceClient("Primary");
    response = wsClient.ValidateLeadInternational(FullName.Text, Salutation.Text, FirstName.Text, LastName.Text, BusinessName.Text, BusinessDomain.Text, BusinessEIN.Text, Address1.Text, Address2.Text, Address3.Text, Address4.Text, Address5.Text, Locality.Text, AdminArea.Text, PostalCode.Text, Country.Text, Phone1.Text, Phone2.Text, Email.Text, IPAddress.Text, Gender.Text, DateOfBirth.Text, UTCCaptureTime.Text, OutputLanguage.Text, TestType.Text, LicenseKey.Text);
     
    if (response == null || (response.Error != null && response.Error.TypeCode == "3"))
    {
        throw new Exception();
    }
     
}
catch
{
     
    wsClient = new LVISoapServiceClient("Backup");
    response = wsClient.ValidateLeadInternational(FullName.Text, Salutation.Text, FirstName.Text, LastName.Text, BusinessName.Text, BusinessDomain.Text, BusinessEIN.Text, Address1.Text, Address2.Text, Address3.Text, Address4.Text, Address5.Text, Locality.Text, AdminArea.Text, PostalCode.Text, Country.Text, Phone1.Text, Phone2.Text, Email.Text, IPAddress.Text, Gender.Text, DateOfBirth.Text, UTCCaptureTime.Text, OutputLanguage.Text, TestType.Text, LicenseKey.Text);
}
 
if (response?.Error != null)
{
 
    processErrorResponse(response);
 
}
else if (response != null)
{
 
    processSuccessfulResponse(response);
 
}

Lead Validation International Java Code Snippet

String FullName,Salutation,FirstName,LastName,
        BusinessName,BusinessDomain,BusinessEIN,
        Address1,Address2,Address3,Address4,Address5,
        Locality,AdminArea,PostalCode,Country,Phone1,
        Phone2,Email,IPAddress,Gender,DateOfBirth,
        UTCCaptureTime,OutputLanguage,TestType,LicenseKey;
 
FullName = request.getParameter("iFullName");
Salutation = request.getParameter("iSalutation");
FirstName = request.getParameter("iFirstName");
LastName = request.getParameter("iLastName");
BusinessName = request.getParameter("iBusinessName");
BusinessDomain = request.getParameter("iBusinessDomain");
BusinessEIN = request.getParameter("iBusinessEIN");
Address1 = request.getParameter("iAddress1");
Address2 = request.getParameter("iAddress2");
Address3 = request.getParameter("iAddress3");
Address4 = request.getParameter("iAddress4");
Address5 = request.getParameter("iAddress5");
Locality = request.getParameter("iLocality");
AdminArea = request.getParameter("iAdminArea");
PostalCode = request.getParameter("iPostalCode");
Country = request.getParameter("iCountry");
Phone1 = request.getParameter("iPhone1");
Phone2 = request.getParameter("iPhone2");
Email = request.getParameter("iEmail");
IPAddress = request.getParameter("iIPAddress");
Gender = request.getParameter("iGender");
DateOfBirth = request.getParameter("iDateOfBirth");
UTCCaptureTime = request.getParameter("iUTCCaptureTime");
OutputLanguage = request.getParameter("iOutputLanguage");
TestType = request.getParameter("iTestType");
LicenseKey = request.getParameter("iLicenseKey");
 
ContactInternational Response = null;
ILVISoapService Client = new LVISoapService(TrialURL).getDOTSLeadValidationInternational();
try{
    Response = Client.validateLeadInternational(FullName,Salutation,FirstName,LastName,BusinessName,BusinessDomain,BusinessEIN,Address1,Address2,Address3,Address4,Address5,Locality,AdminArea,PostalCode,Country,Phone1,Phone2,Email,IPAddress,Gender,DateOfBirth,UTCCaptureTime,OutputLanguage,TestType,LicenseKey);
}
catch(Exception r)
{
    // Implementing failover logic below as an example.
    ILVISoapService backupClient = new LVISoapService(FailoverURL).getDOTSLeadValidationInternational();
    Response = backupClient.validateLeadInternational(FullName,Salutation,FirstName,LastName,BusinessName,BusinessDomain,BusinessEIN,Address1,Address2,Address3,Address4,Address5,Locality,AdminArea,PostalCode,Country,Phone1,Phone2,Email,IPAddress,Gender,DateOfBirth,UTCCaptureTime,OutputLanguage,TestType,LicenseKey);
}