Java 序言错误中的意外 EOF

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19161475/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-12 14:37:15  来源:igfitidea点击:

Unexpected EOF in prolog Error

java.netxmlvb.netsoap

提问by jnasty

I'm attempting to send a SOAP Message to another web service, however the response I get back throws an error: "Couldn't create SOAP message due to exception: XML reader error: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog".

我正在尝试将 SOAP 消息发送到另一个 Web 服务,但是我得到的响应抛出一个错误:“由于异常,无法创建 SOAP 消息:XML 阅读器错误:com.ctc.wstx.exc.WstxEOFException:意外序言中的EOF”。

The web service is written in Java, with a client written in VB.NET.

Web 服务是用 Java 编写的,客户端是用 VB.NET 编写的。

 Case SoapMessageStage.BeforeDeserialize
 readStr = New StreamReader(oldStream)
 writeStr = New StreamWriter(newStream)
 soapMsg1 = readStr.ReadToEnd()
 xDoc.LoadXml(soapMsg1)

回答by zawi

Are you sure your massage is properly escaped and without any forbidden characters? I got that message a lot from parser if I forgot about it.

您确定您的按摩已正确转义并且没有任何禁止字符吗?如果我忘记了,我会从解析器那里得到很多消息。