[英]Error creating a reader for the MTOM message MIME part with Content-ID '<858d8f9f-b101-46c3-bf84-d2b934ad1271>' not found
I must consume a service with MTOM message but I get the error: 我必须使用带有MTOM消息的服务,但出现错误:
"Error creating a reader for the MTOM message" and the inner exception: "MIME part with Content-ID '<858d8f9f-b101-46c3-bf84-d2b934ad1271>' not found." “为MTOM消息创建阅读器时出错”和内部异常:“未找到具有Content-ID'<858d8f9f-b101-46c3-bf84-d2b934ad1271>'的MIME部分。”
BasicHttpsBinding b = new BasicHttpsBinding(BasicHttpsSecurityMode.TransportWithMessageCredential)
{
MessageEncoding = WSMessageEncoding.Mtom
};
MySoapClient client = new SomeSoapClient(b, new EndpointAddress(url));
client.ClientCredentials.UserName.UserName = username;
client.ClientCredentials.UserName.Password = password;
AxisValues ax = new AxisValues()
{
Solution = "xxx",
User = "xxxx"
};
// Exception is generated in this line
SomeResultType r = client.getSomeMethod(ax, new long[] { 1234 }, out SomeType[] list);
Under the normal circumstance, there is no problem during the client call (at least on my side, it works properly). 在正常情况下,在客户呼叫期间没有问题(至少在我这边,它可以正常工作)。
The reason might cause this issue is that we modified the SOAP message, whose HTTP header Content-type is overwritten. 可能导致此问题的原因是我们修改了SOAP消息,其HTTP标头Content-type被覆盖。 Please refer to the below link. 请参考以下链接。
https://social.msdn.microsoft.com/Forums/vstudio/en-US/73039d75-e078-436b-a8ab-d8c7197a976b/error-creating-a-reader-for-the-mtom-message?forum=wcf https://social.msdn.microsoft.com/Forums/vstudio/zh-CN/73039d75-e078-436b-a8ab-d8c7197a976b/error-creating-a-reader-for-the-mtom-message?forum=wcf
WCF: "Error creating reader for MTOM message" WCF:“为MTOM消息创建阅读器时出错”
Feel free to let me know if there is anything I can help with. 请随时告诉我是否有什么我可以帮助的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.