开发者

WCF web http Service doesnt return xmlns

开发者 https://www.devze.com 2023-03-30 15:21 出处:网络
I have created a simple REST web service.. Responses are like <?xml version=\"1.0\" encoding=\"utf-8\"?>

I have created a simple REST web service.. Responses are like

<?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">

using this attribute

[XmlSeri开发者_开发百科alizerFormat]

However I see no xmlns there... like tempuri...

but when try to make a request I get 400 error if I don't define xmlns="http://tempuri.org" at root element..

Any explanation for this behavior?


This is the same problem as in your last 2 questions.

We have often seen that a WCF service is not able to have a List as a return parameter.

Follow the answer that I gave in this question: Cannot deserialize with XMLSerializer result from WCF webservice

0

精彩评论

暂无评论...
验证码 换一张
取 消