我需要在SOAP 1.2
中使用Xamarin.iOS
网络服务,但我似乎找不到如何使其发挥作用的方法。我在我的项目中添加了ServiceRefence,我甚至可以发送消息,但每次发送消息时都会出现以下异常:
System.Net.WebException: There was an error processing web request: Status code 415(UnsupportedMediaType): Cannot process the message because the content type 'text/xml; charset=utf-8' was not the expected type 'application/soap+xml; charset=utf-8'.
我看到此消息表明我使用了错误的绑定。我应该使用WsHttpBinding
代替BasicHttpBinding
,但我无法在Mono中找到WsHttpBinding
。
我知道如何让它发挥作用?