无法解析SOAP响应

时间:2017-05-19 09:33:07

标签: java soap jax-ws

我正在使用JAX-WS来调用SOAP Web服务。解析SOAP响应时会遇到异常。我的SOAP客户端是一个JAR,它运行在Weblogic服务器中部署的另一个Web应用程序中。

javax.xml.soap.SOAPException: Error parsing envelope: most likely due to an invalid SOAP message.: Unexpected EOF in prolog
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog at [row,col {unknown-source}]: [1,0] 
at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:677) 
at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2139) 
at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2045) 
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1134) 
at oracle.j2ee.ws.saaj.util.ResettableXMLStreamReader.next(ResettableXMLStreamReader.java:218) 
at oracle.j2ee.ws.saaj.soap.StaxHandler.moveNext(StaxHandler.java:213) 
at oracle.j2ee.ws.saaj.soap.StaxHandler.staxParse(StaxHandler.java:117) 
at oracle.j2ee.ws.saaj.soap.StaxHandler.staxParse(StaxHandler.java:105) 
at oracle.j2ee.ws.saaj.soap.StaxHandler.staxParse(StaxHandler.java:88) 
at oracle.j2ee.ws.saaj.soap.AbstractSOAPImplementation.getStaXParsedEnvelope(AbstractSOAPImplementation.java:235) 
at oracle.j2ee.ws.saaj.soap.AbstractSOAPImplementation.createEnvelope(AbstractSOAPImplementation.java:70)

令人惊讶的是,我能够在日志中打印SOAP响应。

0 个答案:

没有答案