Tag: webservices client

WCF:“为MTOM消息创建阅读器时出错”

试图让MTOM在WCF客户端中工作。 我正在尝试使用的特定函数发送一个PDF文档的MTOM编码字节数组。 使用SoapUI使用WSDL测试API工作正常; 但是,当我尝试在客户端中执行相同的操作时,我收到以下错误: Error creating a reader for the MTOM message System.Xml.XmlException: MTOM messages must have type ‘application/xop+xml’. at System.Xml.XmlMtomReader.ReadMessageContentTypeHeader(ContentTypeHeader he ader, String& boundary, String& start, String& startInfo) at System.Xml.XmlMtomReader.Initialize(Stream stream, String contentType, Xml DictionaryReaderQuotas quotas, Int32 maxBufferSize) at System.Xml.XmlMtomReader.SetInput(Stream stream, Encoding[] encodings, Str ing contentType, XmlDictionaryReaderQuotas quotas, Int32 maxBufferSize, OnXmlDic tionaryReaderClose onClose) at […]