I have a web service project that contains 3 classes:
- 1 Abstract public class (BaseClass.cs)
- and 2 public classes that inherit from it (InheritedClassA.cs and
InheritedClassB.cs)
In my project (Test.csproj), I added a web reference to the above mentioned web service, and named it DAL.
When I’m trying to access for example “BaseClass” from my Test project, I write Test.DAL.BaseClass, and it recognizes it.
When I try to do the same thing to access any of my inherited classes (InheritedClassA and InheritedClassB) from my Test project it doesn’t work.
You need to tell the service to use the classes InheritedClassA and InheritedClassB either by returning instances of those classes in methods, or use XmlInclude to include the unused classes in the reference. Make sure to update your web reference after you make any of these changes.