- C#
- Java
Lead Validation International C# Code Snippet
string primaryURL = "https://trial.serviceobjects.com/lvi/api.svc/XML/ValidateLeadInternational?FullName=" + FullName.Text + "&Salutation=" + Salutation.Text + "&FirstName=" + FirstName.Text + "&LastName=" + LastName.Text + "&BusinessName=" + BusinessName.Text + "&BusinessDomain=" + BusinessDomain.Text + "&BusinessEIN=" + BusinessEIN.Text + "&Address1=" + Address1.Text + "&Address2=" + Address2.Text + "&Address3=" + Address3.Text + "&Address4=" + Address4.Text + "&Address5=" + Address5 + "&Locality=" + Locality.Text + "&AdminArea=" + AdminArea.Text + "&PostalCode=" + PostalCode.Text + "&Country=" + Country.Text + "&Phone1=" + Phone1.Text + "&Phone2=" + Phone2.Text + "&Email=" + Email.Text + "&IPAddress=" + IPAddress.Text + "&Gender=" + Gender.Text + "&DateOfBirth=" + DateOfBirth.Text + "&UTCCaptureTime=" + UTCCaptureTime.Text + "&OutputLanguage=" + OutputLanguage.Text + "&TestType=" + TestType.Text + "&LicenseKey=" + LicenseKey.Text; string backupURL = "https://trial.serviceobjects.com/lvi/api.svc/XML/ValidateLeadInternational?FullName=" + FullName.Text + "&Salutation=" + Salutation.Text + "&FirstName=" + FirstName.Text + "&LastName=" + LastName.Text + "&BusinessName=" + BusinessName.Text + "&BusinessDomain=" + BusinessDomain.Text + "&BusinessEIN=" + BusinessEIN.Text + "&Address1=" + Address1.Text + "&Address2=" + Address2.Text + "&Address3=" + Address3.Text + "&Address4=" + Address4.Text + "&Address5=" + Address5 + "&Locality=" + Locality.Text + "&AdminArea=" + AdminArea.Text + "&PostalCode=" + PostalCode.Text + "&Country=" + Country.Text + "&Phone1=" + Phone1.Text + "&Phone2=" + Phone2.Text + "&Email=" + Email.Text + "&IPAddress=" + IPAddress.Text + "&Gender=" + Gender.Text + "&DateOfBirth=" + DateOfBirth.Text + "&UTCCaptureTime=" + UTCCaptureTime.Text + "&OutputLanguage=" + OutputLanguage.Text + "&TestType=" + TestType.Text + "&LicenseKey=" + LicenseKey.Text; try { //Make Call to primary URL response = httpGet(primaryURL); if (response == null || (response.Error != null && response.Error.TypeCode == "3")) { throw new Exception(); } } catch { response = httpGet(backupURL); }
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; LVIClient Client = new LVIClient(); 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. LVIClient backupClient = new LVIClient(); 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); }