当我们尝试连接到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();
}
Web配置:
<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>