Your "server" class will not be "really accessible" to the client.
What happens is: based on the data contract, the client will create a new separate class from the XML service schema. It cannot use the server class as such!
It recreates a new class from the definition of an XML schema, but this schema does not contain any specific .NET objects, such as visibility or access modifiers — it's just an XML schema. The client-side class will be created in such a way that it has the same “trace” on the wire - for example, it is basically converted to one XML format.
cannot transfer .NET know-how in a class using a standard SOAP-based service. In the end, all you are looking at is serialized messages — no classes!
Check out the Four Principles of SOA (defined by Microsoft's Don Box):
- The boundaries are clear.
- Services are autonomous.
- Shared Services Schema and Contract, Not Class
- Policy Based Compatibility
See point 3 - the scheme of general access to services and the contract, the class is not - you just share the interface and the XML scheme for the contract with the data - all .NET classes.
marc_s Dec 09 '09 at 13:21 2009-12-09 13:21
source share