Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# WCF web http服务不返回xmlns_C#_Wcf_.net 4.0 - Fatal编程技术网

C# WCF web http服务不返回xmlns

C# WCF web http服务不返回xmlns,c#,wcf,.net-4.0,C#,Wcf,.net 4.0,我创建了一个简单的REST web服务。。回答是这样的 <?xml version="1.0" encoding="utf-8"?> <ArrayOfTableCategories xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 使用此属性 [XmlSerializerF

我创建了一个简单的REST web服务。。回答是这样的

<?xml version="1.0" encoding="utf-8"?>
<ArrayOfTableCategories xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                        xmlns:xsd="http://www.w3.org/2001/XMLSchema">
使用此属性

[XmlSerializerFormat]

但是我看不到有xmlns。。。像坦普里

但当尝试发出请求时,如果不定义xmlns,则会出现400个错误=http://tempuri.org 在根元素处


对这种行为有什么解释吗?

这与您上两个问题中的问题相同

我们经常看到WCF服务不能将列表作为返回参数


按照我在这个问题中给出的答案:

这是服务电话的完整响应吗?可能不是这样,所以请查看完整XML响应中的soap元素,看看您得到了什么。您可以发布您对ArrayFTableCategories的定义吗?ArrayFTableCategories是自动生成的。它是列表。TableCategories是poco不具有[序列化]的事件。它也是一个Rest服务,所以没有soap!