3

我正在尝试使用 apache axix 调用 Web 服务,但我遇到了异常。请帮我。我正在使用以下技术:JBoss - 6.0 Seam - 2.1.2 EJB3、JSF。

Web 服务在 JBoss-4.2.3 中运行良好,但是当我尝试在 JBoss-6.0 中运行时,它给了我一个错误。

11:48:13,759 ERROR [STDERR] Caused by: org.xml.sax.SAXException: Bad envelope tag:  definitions
11:48:13,760 ERROR [STDERR]     at org.apache.axis.message.EnvelopeBuilder.startElement(EnvelopeBuilder.java:71)
11:48:13,760 ERROR [STDERR]     at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048)
11:48:13,760 ERROR [STDERR]     at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
11:48:13,760 ERROR [STDERR]     at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
11:48:13,761 ERROR [STDERR]     at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
11:48:13,761 ERROR [STDERR]     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
11:48:13,761 ERROR [STDERR]     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
11:48:13,761 ERROR [STDERR]     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
11:48:13,762 ERROR [STDERR]     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
11:48:13,762 ERROR [STDERR]     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
11:48:13,762 ERROR [STDERR]     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
11:48:13,762 ERROR [STDERR]     at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
11:48:13,763 ERROR [STDERR]     at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
11:48:13,763 ERROR [STDERR]     at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
11:48:13,763 ERROR [STDERR]     at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
11:48:13,763 ERROR [STDERR]     ... 104 more
4

2 回答 2

5

这几乎可以肯定意味着您已经使用 WSDL 位置而不是资源端点位置来设置服务端点。

于 2012-06-20T08:19:08.810 回答
4

端点格式错误

例如:http://localhost:8080/YourService/

例如:http://localhost:8080/YourService?wsdl

正确的端点格式来设置构造函数

例如:http://localhost:8080/YourService

于 2015-01-15T13:11:31.547 回答