// // FICTITIOUS EXAMPLES OF SAMPLE CLIENT // //-- Example 1 - Ambigious reference problem -- //Will not compile. "Person" is an ambigious reference since it is generated both for the PersonHandler and the CompanyHandler webservice proxy int companyId = 32; CompanyHandler companyHandler = new CompanyHandler(); PersonHandler personHandler = new PersonHandler(); Person personsForCompany companyHandler.GetPersonsWorkingAtCompany(companyId); Person somePerson = personsForCompany; somePerson.Name = "James Brown"; somePerson.Email = "email@example.com"; personHandler.SavePerson(somePerson); //-- Example 2 - Using namespaces which cause "class mismatch" -- //Will not compile. We can not call SavePerson with the somePerson object since it is another "Person" class than the one returned by GetPersonsForCompany int companyId = 32; Company.CompanyHandler companyHandler = new Company.CompanyHandler(); Person.PersonHandler personHandler = new Person.PersonHandler(); Company.Person personsForCompany companyHandler.GetPersonsWorkingAtCompany(companyId); Company.Person somePerson = personsForCompany; somePerson.Name = "James Brown"; somePerson.Email = "firstname.lastname@example.org"; personHandler.SavePerson(somePerson); //will not compile, somePerson is wrong class for SavePerson even though they are based on the same class in the code for the webservice that is called
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE