- 服務(wù)端
大文件傳輸時(shí)塘秦,CXF官方文檔寫的是默認(rèn)128M http://cxf.apache.org/docs/security.html
超過會(huì)報(bào)以下錯(cuò)誤:
org.apache.cxf.interceptor.Fault: Unmarshalling Error: Text size limit (134217728) exceeded
需要注意的是,此時(shí)客戶端可能會(huì)報(bào):
cxf生成客戶端:java.io.IOException: Error writing request body to server
axis2生成客戶端:socket write error
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"
xmlns:cxf="http://cxf.apache.org/core">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<cxf:bus>
<cxf:properties>
<!-- 定義上傳文件的最大長(zhǎng)度,限制為256M -->
<entry key="org.apache.cxf.stax.maxTextLength" value="268435456" />
</cxf:properties>
</cxf:bus>
</beans>