Considering a server that expose a service through WCF. One of the OperationContract return a typed DataSet called TraceDataSet that contains a snapshot of the trace on the server.
When the dataset is returned, the ReadXml that is occurring inside the custom visual studio tool generated file, in the method ReadXmlSerializable throws a
Undefined data type: ‘xs:string’.
I added WCF trace on the client and server, but the WCF communication works perfectly.
I did some research, but nothing is conclusive and I also get 404 errors from the MSDN forums.
I checked the stream behind the XmlReader and it does contains the declaration of the xmlns:xs namespace, so I’m a bit confused there.
If I serialize the DataSet to a file on the server (which run locally for debugging purpose) and I read that file from the client, it does work, so I’m suspecting that something is occurring through the WCF communication even if it does not fail.
The typed DataSet is declared in a shared assembly that is reference by both the client and the server. We are not using a regenerated DataSet created by a proxy in the /References folder.
We never had any problem concerning the trace, until recently, and sadly, we can’t point to the change that caused this feature to break.
Does anybody have an idea why ReadXml can’t find the xs:string data type?
I search in forums and other site, i found that it seems this is a bug in the serialization in some circonstance in System.Data. I dont know how to fix this bug, but i found a work arround :
Put the Dataset in a string ( with getXml() on the traceData), and send it to the client. The client received the string and rebuild the dataset. This is not a fix, but it a workaround and it work for me.