I have a web service, it exposes method M(B)
. Here B: A
(B inherits from A).
I need to hide this inheritance from the service consumers. The consumers don't need to know about A
, although B
will have its properties.
I know that I can write my own WSDL, but is there a way to make .NET do what I want automatically?
Asked
Active
Viewed 372 times
4

homam
- 1,945
- 1
- 19
- 26
1 Answers
-1
This is answered well at question:
How to hide an inherited property in a class without modifying the inherited class (base class)?
In short, you can override the properties and methods so that they just throw an exception, and "decorate" the overridden versions, marking them as obsolete. But the best practice would be to write a separate class for a web service contract.
-
OP is talking about a web service proxy class – John Saunders Jan 15 '15 at 19:27