1.问题:WebService调用其他WebService,缓冲默认大小为65536,当消息包过大时,就会出现SOAP调用失败的问题。
2.解决方案,通过修改客户端的web.config来解决,如下:
<system.serviceModel>
<bindings> @H_502_10@ <basicHttpBinding> @H_502_10@ <binding name="PlayListServiceSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassproxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize=" 2147482647" maxBufferPoolSize=" 2147482647" maxReceivedMessageSize=" 2147482647" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNaMetableCharCount="16384" /> <security mode="None"> <transport clientCredentialType="None" proxyCredentialType="None" realm="" /> <message clientCredentialType="UserName" algorithmSuite="Default" /> </security> </binding> </basicHttpBinding> </bindings> <client> <endpoint address="http://192.168.11.104:203/PlayListService.asmx" binding="basicHttpBinding" bindingConfiguration="PlayListServiceSoap" contract="PlayListServiceRef.PlayListServiceSoap" name="PlayListServiceSoap" /> </client> </system.serviceModel>版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。