I got xml looking like:
<?xml version="1.0" encoding="UTF-8"?>
<items>
<item>1</item>
<item>2</item>
<item>3</item>
</items>
And a wcf service contract:
[ServiceContract(Namespace = "", Name = "MyService", SessionMode = SessionMode.NotAllowed)]
public interface IMyService
{
[OperationContract]
[WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Xml, RequestFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Bare)]
void DoWork(IEnumerable<int> items);
}
Service binding is basic http.
But when i try to post that xml to wcf method i'm getting error:
Unable to deserialize XML message with root name "items" and root namespace ""
How should wcf method look like to properly work with that xml?