I have a WCF service with an operation contract that returns null values. That is: it’s supposed to return some custom class ‘ProgressReport’, but in the client application it shows up as null. In the WCF service itself the custom class is instantiated and returned without errors and without becoming null at any time.
The ‘ProgressReport’ class is not defined as DataContract because it is defined in another assembly.
For the operation that returns ‘ProgressReport’, the WcfTestClient informs me that it cannot perform operation because it uses type ‘ProgressReport’.
I’ve tried adding an operationcontract with System.Object as return type, but it gives me the same error (cannot perform operation because it uses type ‘System.Object’)
Does anyone know how to solve this?
You could try to extend the
ProgressReport-class (if it’s not sealed) and define that as aDataContract(but I think that does not help with the properties of the class as they needed to be marked asDataMembers) or create a own class as a kind of a proxy and return this object:or