Error while parsing XML file with StAx

徘徊边缘 提交于 2019-12-01 16:16:55

Strictly because an answer is easier to read than the reading through the comments....

Answer from Dimitri


I may find the answer to my question. The problem was when I have received the answer from the server as InputStream, I parse it. As you may know, in Java, once an InputStream is parsed, it is close automatically. Things sometime we forgot. Thanks for the documentation .

The answer is very simple. In my program, before I called the method I parse, I use to display the content input Stream to see what I am receiving. The fact is, once you read/parse your inpustream, it is automatically close. See the link below. So when I call my method parse, the Inputstream parameter was already close, this is why I caught this error.

endpoint URL should be with ?wsdl. For example http://172.16.31.132:8088/mockApplicationServicesBinding?wsdl

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!