0

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

[XmlSerializerFormat]

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?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
GorillaApe
  • 3,611
  • 10
  • 63
  • 106
  • 1
    Is that the full response from the service call? It probably isn't, so look inside of the soap elements inside of the full XML response and see what you come up with. – A.R. Aug 25 '11 at 19:12
  • 1
    Can you post your definition of ArrayOfTableCategories? – Shiraz Bhaiji Aug 25 '11 at 19:18
  • ArrayOfTableCategories is automaticaly generated. It is List .TableCategories is poco doesnt event have [Serialization]. Also it is a Rest service , so no soap! – GorillaApe Aug 25 '11 at 19:43

1 Answers1

0

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

Community
  • 1
  • 1
Shiraz Bhaiji
  • 64,065
  • 34
  • 143
  • 252