Soap: The root element is required in a well-formed document.
来源:互联网 发布:阿里云cvtm628电视机 编辑:程序博客网 时间:2024/06/08 15:09
当soap请求出现如下错误的时候:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header/>
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.generalException</faultcode>
<faultstring>org.xml.sax.SAXParseException: The root element is required in a well-formed document. Message being parsed: </faultstring>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
是因为soap的请求没有明确写出请求包的长度,使server端不能完整读取请求包,server端便错误的认为请求的xml文件不完整。
只要明确的写上请求包得长度即可,java代码如下:
out.println("Content-Length: 257");
- Soap: The root element is required in a well-formed document.
- The markup in the document preceding the root element must be well-formed
- The markup in the document following the root element must be well-formed
- The markup in the document following the root element must be well-formed.
- The markup in the document following the root element must be well-formed.
- spring配置文件报错:the markup in the document preceding the root element must be well-formed
- 编写xml文件时,The markup in the document preceding the root element must be well-formed.等bug
- xml报错The markup in the document following the root element must be well-formed的处理
- JSF简单实例及无法正常访问的解决方法(404和The markup in the document preceding the root element must be well-formed. )
- org.xml.sax.SAXParseException: The markup in the document preceding the root element must be well-fo
- org.xml.sax.SAXParseException: The markup in the document following the root element must be well-fo
- A non well formed numeric value encountered in 。。。
- Piontcut is not well-formed
- 解决Pointcut is not well-formed
- ASP.Net中“The Server tag is not well formed”问题解析
- [WebService] the namespace on the "definitions" element, is not a valid SOAP version
- "http://schemas.xmlsoap.org/wsdl/", the namespace on the "definitions" element, is not a valid SOAP
- "http://schemas.xmlsoap.org/wsdl/", the namespace on the "definitions" element, is not a valid SOAP
- Delphi 编写ActiveX控件(OCX控件)的知识和样例
- jelastic,又一个支持java的云PaaS(beta中,支持绑域名)
- myeclipse8.5 设置
- Word 中使用mathtype 的公式序号编辑
- linux/ubuntu install boost
- Soap: The root element is required in a well-formed document.
- MathType公式编号
- 单片机的裸奔程序的框架
- C++的声明和定义及extern用法
- POS系统
- 判断文件及其文件夹存在的代码
- 关于MyEclipse出现错误,在log里看到No Application id found时
- Shallow vs. Retained Heap
- STL之容器:选择时机,删除元素,迭代器失效