Using CDATA with WCF REST starter kits

后端 未结 4 1151
深忆病人
深忆病人 2020-12-16 06:16

I have a service built using Preview 2 of the WCF REST starter kit, but I\'ve run into an issue with passing around XML-styled data in the calls. Here\'s my request object:<

4条回答
  •  眼角桃花
    2020-12-16 06:28

    Above code is missing the fact that you must go past the content after you have read it. So this class as it stands won't work with a collection.

    Change it to the following, and you can now hold Collections of CDataWrapper.

    Value = reader.ReadContentAsString(); 
    reader.Read();
    

提交回复
热议问题