简体   繁体   English

允许BasicHttpBinding处理自定义内容类型

[英]Allow BasicHttpBinding to process custom content types

I have a client that does send Soap11 content, but with a different content type. 我有一个确实发送Soap11内容但具有不同内容类型的客户端。 It does not send text/xml but application/some-custom-header . 它不发送text/xml而是发送application/some-custom-header

The client receives the following exception Cannot process the message because the content type 'application/some-custom-header; charset=utf-8' 客户端收到以下异常,因为内容类型为'application/some-custom-header; charset=utf-8'无法处理消息'application/some-custom-header; charset=utf-8' 'application/some-custom-header; charset=utf-8' was not the expected type 'text/xml; charset=utf-8' 'application/some-custom-header; charset=utf-8'不是预期的类型'text/xml; charset=utf-8' 'text/xml; charset=utf-8' . 'text/xml; charset=utf-8'

what do i need to change? 我需要改变什么?

I got it. 我知道了。 I combined the encoding elements from the Invoking a web service returning ISO-8859-1 encoded data with BizTalk 2010 example, but replaced the Read/WriteMessage methods from the CustomMessageEncoder with the calls to a MessageEncoder retrieved from a TextMessageEncodingBindingElement and its MessageEncoderFactory . 我将调用ISO返回的ISO-8859-1编码的Web服务的Web服务中的编码元素与BizTalk 2010示例结合在一起 ,但是用从TextMessageEncodingBindingElement及其MessageEncoderFactory检索到的MessageEncoder的调用替换了CustomMessageEncoderRead/WriteMessage方法。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用BasicHttpBinding进行WCF自定义证书验证 - WCF custom certificate validation with BasicHttpBinding 使用basicHttpBinding和自定义UserNamePasswordValidator的WCF身份验证? - WCF Authentication using basicHttpBinding and custom UserNamePasswordValidator? basicHttpBinding不使用自定义ServiceCredentials - basicHttpBinding doesn't use custom ServiceCredentials ASP Core WebApi文件上传允许所有内容类型 - ASP Core WebApi File Upload Allow All Content Types 获取是否使用SharePoint WebServices选中了“允许管理内容类型” - Get if “Allow management of content types” is checked using SharePoint WebServices WCF,BasicHttpBinding:停止新连接但允许现有连接继续 - WCF, BasicHttpBinding: Stop new connections but allow existing connections to continue 从AS3向.NET WCF发送各种数据类型的数组(basicHttpBinding) - Sending an array of various data types from AS3 to .NET WCF (basicHttpBinding) Designer进程在具有绑定内容的Custom Control中终止 - Designer process terminated in Custom Control with Binding Content 有没有一种很好的方法来扩展使用basicHttpBinding的WCF服务,以允许REST服务与JSON通信? - Is there a good way to extend a WCF service using basicHttpBinding to also allow REST service communicating with JSON? 在主机(“ Basic”)上配置的身份验证方案不允许在绑定“ BasicHttpBinding”上配置的身份验证方案 - The authentication schemes configured on the host ('Basic') do not allow those configured on the binding 'BasicHttpBinding'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM