我的post方法有问题..
这是我的界面
public interface Iinterface
{
[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "inventory?")]
System.IO.Stream inventory(Stream data);
}
而且功能..
public System.IO.Stream inventory(System.IO.Stream data)
{
//Do something
}
好吧,如果从客户端发送内容类型为 text/plain 或 application/octet-stream 的作品完美,但客户端无法更改内容类型,他是 text/xml,我得到一个错误..
The exception message is 'Incoming message for operation 'inventory' (contract
'Iinterface' with namespace 'http://xxxx.com/provider/2012/10') contains an
unrecognized http body format value 'Xml'. The expected body format value is 'Raw'.
This can be because a WebContentTypeMapper has not been configured on the binding.
有人可以帮助我吗?
谢谢。