Axis2 客户端调用时报【Transport error: 411 Error: Length Required】

Aixs2 RPC客户端报错
org.apache.axis2.AxisFault: Transport error: 411 Error: Length Required
	at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:310) [axis2-transport-http-1.5.2.jar:na]
	at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:200) [axis2-transport-http-1.5.2.jar:na]
	at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:76) [axis2-transport-http-1.5.2.jar:na]
	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:400) [axis2-transport-http-1.5.2.jar:na]
	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:225) [axis2-transport-http-1.5.2.jar:na]
	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435) [axis2-kernel-1.5.2.jar:1.5.2]
	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402) [axis2-kernel-1.5.2.jar:1.5.2]
	at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229) [axis2-kernel-1.5.2.jar:1.5.2]
	at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165) [axis2-kernel-1.5.2.jar:1.5.2]
	at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:540) [axis2-kernel-1.5.2.jar:1.5.2]
	at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:521) [axis2-kernel-1.5.2.jar:1.5.2]
	at org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceClient.java:102) [axis2-adb-1.5.2.jar:1.5.2]
	at com.ebiz.abc.webservice.client.JdhxWebServiceRPCClient.querySellClient(JdhxWebServiceRPCClient.java:54) [classes/:na]
	at com.ebiz.abc.webservice.client.JdhxWebServiceRPCClient.main(JdhxWebServiceRPCClient.java:23) [classes/:na]


设置属性CHUNKED
serviceClient.getOptions().setProperty(HTTPConstants.CHUNKED, false);

你可能感兴趣的:(java,apache,xml,webservice)