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: <?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
  <soapenv:Fault>
   <faultcode>soapenv:Server.generalException</faultcode>
   <faultstring>org.xml.sax.SAXParseException: 文件过早结束。</faultstring>
   <detail/>
  </soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

主要因为在传递参数是,有个参数存储的内容为类似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);

你可能感兴趣的:(org.xml.sax.SAXParseException: 文件过早结束)