For reasons that I am yet to understand, RestSharp’s Xml Serializer was not playing nice today with my WCF Rest service. I was trying send a simple Post request but couldn’t because the endpoint kept complaining that the namespace did not get added to the xml. Once I added it, for some obscure reasons, the message received on the server was always missing the collection I was sending as part of the package.
I suspect this has something to do with Big Mike’s implementation of Rest in WCF…but I still had to get my stuff working.
Instead of spending too much time trying to figure out what was wrong with it, especially since it affected a portion of the code meant for internal use only, I chose to go the “less clean” route using the DataContractSerializer
Here is the result
This will do for now 😛