当我们尝试连接到 php Web 服务时 - 我们遇到了一个已知问题,听起来“反序列化操作回复消息正文时出错”
互联网提示通过添加 readerQuotas 更改我们的 web.config 的解决方案 - 它不起作用。
您可以在下面找到我的解决方案。有人可以建议吗?我将感激不尽。还请记住,通过 post 方法和 httpRequest 效果很好,但这样的解决方案是不可接受的。
MIGDZ.Logic_DzSoapServer_QueryIdPortClient client = new Logic_DzSoapServer_QueryIdPortClient();
MIGDZ.Logic_DzSoapServer_Request_BodyId BodyRequest = new Logic_DzSoapServer_Request_BodyId();
BodyRequest.nr_dok = "xxxxxx";
client.ClientCredentials.UserName.UserName = "xxxx";
client.ClientCredentials.UserName.Password = "xxxxxxxxxx";
try
{
client.Open();
var responseArray = client.getParcel(BodyRequest, "xxxxxxxx");
}
catch (Exception ex)
{
throw;
}
finally
{
client.Close();
}
网络配置:
<binding name="Logic_DzSoapServer_QueryIdBinding" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="None" >
<transport clientCredentialType="None" proxyCredentialType="None" />
</security>
</binding>