【发布时间】:2019-04-09 18:41:09
【问题描述】:
我有一个 WCF Soap 服务,我试图从 SoapUI 和我的 Java 程序中调用它。我正在从 Java 端读取 Excel 文件并将其发送到 .NET 端。
Excel 文件有 37 列,最多可包含 100 行。我一一阅读所有行并将它们添加到列表中。在列表的一项中,单行中每个单元格的键值对象列表。
这是我的问题。该服务适用于有限的行数。我查看了可以成功发送的最大内容长度,即 65536。如果我发送内容长度超过 65536 的请求,服务将不返回任何内容。
如果我从 Java 项目发送请求,我会收到以下错误:
无法发送消息。;嵌套异常是 org.apache.cxf.transport.http.HTTPException: HTTP response '400: Bad Request' 当与...通信时...
在 .NET 项目的 web.config 文件中,我知道请求大小没有限制。
Web.Config
<system.web>
<compilation targetFramework="4.0" debug="true"/>
<httpRuntime/>
</system.web>
SoapUI 我的请求
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:pas="http://schemas.datacontract.org/2004/07/..." xmlns:pas1="http://schemas.datacontract.org/2004/07/..." xmlns:arr="http://schemas.microsoft.com/2003/10/...">
<soapenv:Header/>
<soapenv:Body>
<tem:ListSegments>
<!--Optional:-->
<tem:request>
<!--Optional:-->
<pas:UserName>tst</pas:UserName>
<!--Optional:-->
<pas1:DetailList>
<!--Zero or more repetitions:-->
<arr:ArrayOfKeyValueOfstringstring>
<!--Zero or more repetitions:-->
<arr:KeyValueOfstringstring>
<arr:Key>No</arr:Key>
<arr:Value>1</arr:Value>
</arr:KeyValueOfstringstring>
....
</arr:ArrayOfKeyValueOfstringstring>
<arr:ArrayOfKeyValueOfstringstring>
<!--Zero or more repetitions:-->
<arr:KeyValueOfstringstring>
<arr:Key>No</arr:Key>
<arr:Value>2</arr:Value>
</arr:KeyValueOfstringstring>
....
</arr:ArrayOfKeyValueOfstringstring>
....
</pas1:DetailList>
<tem:request>
<tem:ListSegments>
<soapenv:Body>
</soapenv:Envelope>
【问题讨论】: