org.xml.sax.SAXParseException: 文件过早结束

调用webService的时候报错,服务端为Lotus-Domino平台,报错信息如下:
ID: 1
Response-Code: 200
Encoding: UTF-8
Content-Type: text/xml; charset=utf-8
Headers: {Server=[Lotus-Domino], Content-Length=[458], Date=[Fri, 20 Jul 2012 01:13:50 GMT], Content-Language=[zh-cn], content-type=[text/xml; charset=utf-8]}
Payload:



soapenv:Server.generalException
org.xml.sax.SAXParseException: 文件过早结束。





主要因为在传递参数是,有个参数存储的内容为类似XML格式的String字符串,webService发送时报错。后面如此处理后得到解决:
Client client = ClientProxy.getClient(writeOffService);
HTTPConduit http = (HTTPConduit) client.getConduit();
HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
//httpClientPolicy.setCookie("");
//httpClientPolicy.setCookie((String)this.getContext().getRequest().getSession().getAttribute("Cookie")); httpClientPolicy.setAllowChunking(false);
http.setClient(httpClientPolicy);

你可能感兴趣的:(点滴技术)