GetCustomerDetails() Web Method

Listing 1. The GetCustomerDetails() Web method accepts a customer ID and returns a CustomerDetails object to the caller.

public CustomerDetails GetCustomerDetails(string id)
    //Simulate DB call that fills Customer Details object
    CustomerDetails cd = new CustomerDetails();
    cd.CustomerID = id;
    cd.ContactName = "Spike X";
    cd.Country = "USA";
    cd.Address = new Address();
    cd.Address.Street = "1234 Anywhere St.";
    cd.Address.City = "Phoenix";
    cd.Address.State = "AZ";
    cd.Address.Zip = "85003";
    return cd;