我从部署在web sphere 8(服务和客户端)上的Web应用程序调用Web服务,当我尝试从web sphere客户端调用Web服务时它会抛出如下所示的异常,我能够测试服务来自SOAP UI。这样的WSDL没有问题。无法理解可能出现的问题
org.xml.sax.SAXParseException: Premature end of file.
at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2255)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2330)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2296)
at org.apache.axis2.jaxws.util.WSDL4JWrapper$13.run(WSDL4JWrapper.java:732)
at org.apache.axis2.java.security.AccessController.doPrivileged(AccessController.java:132)
at org.apache.axis2.jaxws.util.WSDL4JWrapper.loadDefinition(WSDL4JWrapper.java:729) 195 more
Caused by:
org.xml.sax.SAXParseException: Premature end of file.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2245)"
答案 0 :(得分:0)
我发现导致问题的原因是,由于对Web服务进行了一些更改后无法访问WSDL,在提供解决的WSDL问题的正确路径之后,即service_name?wsdl无法访问我必须提供完整的URL到WSDL文件
谢谢,