I've done so far is implementing IRequestHandler explicitly on my WCF Data Service like this:
public class EntityDataService : DataService<DatabaseEntities>, IRequestHandler
The actual implementation looks like this:
public new Message ProcessRequestForMessage(Stream messageBody)
This is the closest I can get to the workaround explained in my link. It doesn't work though, and I'm not sure why. That's really besides the point though. Shouldn't it be possible to inject a ProxyDataContractResolver in a WCF Data Service somehow? I just
can't wrap my head around how to do it.
This isn't possible with WCF Data Services. In WCF, if you are using a contract which takes in a stream and returns a Message, you are basically bypassing all the WCF pipeline and hence one cannot hook into WCF pipleline events such as type resolver.
This is a bug in WCF data services and needs to be fixed in WCF data service code base.
This posting is provided "AS IS" with no warranties, and confers no rights.