试图通过Tax将TaxCategory导入/设置为TaxCategoryTaxDetail连接。
var categoryDetails = new TaxCategoryTaxDetail
{
TaxID = new StringValue {Value = "MYTAXID"},
TaxCategory = new StringValue {Value = "TAXABLE"},
};
var category = new TaxCategory
{
TaxCategoryID = new StringValue {Value = "TAXABLE"},
Details = new[] {categoryDetails}
};
_client.Put(category);调用Put抛出:
The maximum message size quota for incoming messages (6553600) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.端点版本: 17.200.001 Acumatica版本: 18.107.0022客户端应用程序在Visual 2017中使用wsdl端点。
与我正在使用的其他一些工作调用相比,categoryDetails有效负载非常小。
不过,categoryDetails在Acumatica中是正确的。看起来Put正在进行更新,然后将实际类别从服务器返回给客户端。Acumatica中的类别包含数以千计的相关税务记录。我不想也不需要这个。我宁愿这是一场火灾而忘了更新。
我可以catch异常并继续进行,但是等待异常抛出的速度非常慢。我觉得我只是在做错事。
发布于 2018-11-05 15:01:54
返回的数据长度超过MaxReceivedMessageSize绑定属性。
您可以增加“app.config”文件中的限制:
<binding name="DefaultSoap" allowCookies="true" maxReceivedMessageSize="2147483647">
<security mode="Transport" />
</binding>或者直接在soap客户端构造函数中:
using (soapClient = new DefaultSoapClient(new BasicHttpBinding()
{
AllowCookies = true,
Name = "DefaultSoap",
MaxBufferSize = 2147483647,
MaxReceivedMessageSize = 2147483647,
Security = new BasicHttpSecurity() { Mode = BasicHttpSecurityMode.Transport }
},
new EndpointAddress(url)))
{
}在webservice调用中,还可以指定返回行为:
ReturnBehavior = ReturnBehavior.Nonehttps://stackoverflow.com/questions/53143296
复制相似问题