Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1075845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T21:19:43+00:00 2026-05-16T21:19:43+00:00

I’m trying to get the sample FedEx Address Verification application to work in C#.

  • 0

I’m trying to get the sample FedEx Address Verification application to work in C#. After contacting my FedEx technical contact and having him activate Address Verification on my test account (apparently it is considered an advanced service that requires additional permissions) I was able to compile and run the example application.

However, I wasn’t getting quite the results I expected given the settings…

request.Options.ConvertToUpperCase = true;
request.Options.CheckResidentialStatus = true;

Based on these flags, I expected to have the address come back in upper case, and to be able to check the Residential or ResidentialStatus properties to determine commercial vs residential. Neither were occuring.

So I installed Fiddler to see the exact SOAP exchange that was taking place and found that the outbound Options tag was not populating except for one property, MaximumNumberOfMatches.

Is there something I should check for in the Reference.cs file that is created by Visual Studio? I didn’t see anything out of the norm, but something is happening that is preventing the serialization of some of the properties.

–Edit–

Updated my code as per the suggestion below. Unfortunately, it still only populates 2 of the options parameters. I’ve included the C# settings code and the outbound/inbound SOAP request below. Can anyone think of a reason the rest of the options are not being sent in the SOAP request?

AddressValidationRequest request = new AddressValidationRequest();
            //
            request.WebAuthenticationDetail = new WebAuthenticationDetail();
            request.WebAuthenticationDetail.UserCredential = new WebAuthenticationCredential();
            request.WebAuthenticationDetail.UserCredential.Key = "XXX-KEY-XXX"; // Replace "XXX" with the Key
            request.WebAuthenticationDetail.UserCredential.Password = "XXX-PWD-XXX"; // Replace "XXX" with the Password
            //
            request.ClientDetail = new ClientDetail();
            request.ClientDetail.AccountNumber = "XXX-ACCT#-XXX"; // Replace "XXX" with client's account number
            request.ClientDetail.MeterNumber = "XXX-MTR#-XXX"; // Replace "XXX" with client's meter number
            //
            request.TransactionDetail = new TransactionDetail();
            request.TransactionDetail.CustomerTransactionId = "***Address Validation v2 Request using VC#***"; // This is just an echo back 
            //
            request.Version = new VersionId(); // Creates the Version element with all child elements populated
            //
            request.RequestTimestamp = DateTime.Now;
            //
            request.Options = new AddressValidationOptions();
            request.Options.CheckResidentialStatus = true;
            request.Options.CheckResidentialStatusSpecified = true;
            request.Options.VerifyAddresses = true;
            request.Options.MaximumNumberOfMatches = "5";
            request.Options.StreetAccuracy = AddressValidationAccuracyType.MEDIUM;
            request.Options.DirectionalAccuracy = AddressValidationAccuracyType.MEDIUM;
            request.Options.CompanyNameAccuracy = AddressValidationAccuracyType.MEDIUM;
            request.Options.ConvertToUpperCase = true;
            request.Options.RecognizeAlternateCityNames = true;
            request.Options.ReturnParsedElements = true;
            //
            request.AddressesToValidate = new AddressToValidate[2];
            request.AddressesToValidate[0] = new AddressToValidate();
            request.AddressesToValidate[0].AddressId = "Kimmel";
            request.AddressesToValidate[0].Address = new Address();
            request.AddressesToValidate[0].Address.StreetLines = new String[1] { "425 Morningside Dr" };
            request.AddressesToValidate[0].Address.City = "Deerfield";
            request.AddressesToValidate[0].Address.PostalCode = "53531";
            request.AddressesToValidate[0].Address.CountryCode = "US";
            //
            request.AddressesToValidate[1] = new AddressToValidate();
            request.AddressesToValidate[1].AddressId = "WD";
            request.AddressesToValidate[1].Address = new Address();
            request.AddressesToValidate[1].Address.StreetLines = new String[1] { "2830 Progress Rd" };
            request.AddressesToValidate[1].Address.PostalCode = "53716";
            request.AddressesToValidate[1].CompanyName = "Wingra Direct";

The outbound SOAP Request (obtained using Fiddler). Note the missing options:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
        <AddressValidationRequest xmlns="http://fedex.com/ws/addressvalidation/v2">
            <WebAuthenticationDetail>
                <UserCredential>
                    <Key>XXX-KEY-XXX</Key>
                    <Password>XXX-PWD-XXX</Password>
                </UserCredential>
            </WebAuthenticationDetail>
            <ClientDetail>
                <AccountNumber>XXX-ACCT#-XXX</AccountNumber>
                <MeterNumber>XXX-MTR#-XXX</MeterNumber>
            </ClientDetail>
            <TransactionDetail>
                <CustomerTransactionId>***Address Validation v2 Request using VC#***</CustomerTransactionId>
            </TransactionDetail>
            <Version>
                <ServiceId>aval</ServiceId>
                <Major>2</Major>
                <Intermediate>0</Intermediate>
                <Minor>0</Minor>
            </Version>
            <RequestTimestamp>2010-08-26T16:40:13.2026134-05:00</RequestTimestamp>
            <Options>
                <CheckResidentialStatus>true</CheckResidentialStatus>
                <MaximumNumberOfMatches>5</MaximumNumberOfMatches>
            </Options>
            <AddressesToValidate>
                <AddressId>Kimmel</AddressId>
                <Address>
                    <StreetLines>425 Morningside Dr</StreetLines>
                    <City>Deerfield</City>
                    <PostalCode>53531</PostalCode>
                    <CountryCode>US</CountryCode>
                    <Residential>true</Residential>
                </Address>
            </AddressesToValidate>
            <AddressesToValidate>
                <AddressId>WD</AddressId>
                <CompanyName>Wingra Direct</CompanyName>
                <Address>
                    <StreetLines>2830 Progress Rd</StreetLines>
                    <PostalCode>53716</PostalCode>
                </Address>
            </AddressesToValidate>
        </AddressValidationRequest>
    </soap:Body>
</soap:Envelope>

The response I get back is:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"/>
    <soapenv:Body>
        <v2:AddressValidationReply xmlns:v2="http://fedex.com/ws/addressvalidation/v2">
            <v2:HighestSeverity>SUCCESS</v2:HighestSeverity>
            <v2:Notifications>
                <v2:Severity>SUCCESS</v2:Severity>
                <v2:Source>wsi</v2:Source>
            </v2:Notifications>
            <v2:TransactionDetail xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <v2:CustomerTransactionId>***Address Validation v2 Request using VC#***</v2:CustomerTransactionId>
            </v2:TransactionDetail>
            <v2:Version xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <v2:ServiceId>aval</v2:ServiceId>
                <v2:Major>2</v2:Major>
                <v2:Intermediate>0</v2:Intermediate>
                <v2:Minor>0</v2:Minor>
            </v2:Version>
            <v2:ReplyTimestamp>2010-08-26T21:40:14.140Z</v2:ReplyTimestamp>
            <v2:AddressResults>
                <v2:AddressId>Kimmel</v2:AddressId>
                <v2:ProposedAddressDetails>
                    <v2:Score>93</v2:Score>
                    <v2:Changes>MODIFIED_TO_ACHIEVE_MATCH</v2:Changes>
                    <v2:ResidentialStatus>UNAVAILABLE</v2:ResidentialStatus>
                    <v2:DeliveryPointValidation>CONFIRMED</v2:DeliveryPointValidation>
                    <v2:Address>
                        <v2:StreetLines>425 Morningside Dr</v2:StreetLines>
                        <v2:City>Deerfield</v2:City>
                        <v2:StateOrProvinceCode>WI</v2:StateOrProvinceCode>
                        <v2:PostalCode>53531-9492</v2:PostalCode>
                        <v2:CountryCode>US</v2:CountryCode>
                    </v2:Address>
                    <v2:RemovedNonAddressData/>
                </v2:ProposedAddressDetails>
            </v2:AddressResults>
            <v2:AddressResults>
                <v2:AddressId>WD</v2:AddressId>
                <v2:ProposedAddressDetails>
                    <v2:Score>93</v2:Score>
                    <v2:Changes>MODIFIED_TO_ACHIEVE_MATCH</v2:Changes>
                    <v2:ResidentialStatus>UNAVAILABLE</v2:ResidentialStatus>
                    <v2:DeliveryPointValidation>CONFIRMED</v2:DeliveryPointValidation>
                    <v2:CompanyName>Wingra Direct</v2:CompanyName>
                    <v2:Address>
                        <v2:StreetLines>2830 Progress Rd</v2:StreetLines>
                        <v2:City>Madison</v2:City>
                        <v2:StateOrProvinceCode>WI</v2:StateOrProvinceCode>
                        <v2:PostalCode>53716-3338</v2:PostalCode>
                        <v2:CountryCode>US</v2:CountryCode>
                    </v2:Address>
                    <v2:RemovedNonAddressData/>
                </v2:ProposedAddressDetails>
            </v2:AddressResults>
        </v2:AddressValidationReply>
    </soapenv:Body>
</soapenv:Envelope>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T21:19:44+00:00Added an answer on May 16, 2026 at 9:19 pm

    I was unable to get the API working so I ended up manually coding the handling of SOAP requests and responses. Aside from the API not properly setting all the flags, I also found out that the FedEx DEV server was not returning the Residential Status, regardless of what the options were (confirmed by our FedEx Web Services contact). When we gained access to the production servers the new code worked like a charm.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.