org.xml.sax.SAXException:错误的信封标记:定义

时间:2011-04-05 06:57:32

标签: web-services jboss6.x

我试图使用apache axix调用Web服务,但我得到以下异常。请帮我。我使用以下技术: JBoss - 6.0 接缝 - 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

2 个答案:

答案 0 :(得分:5)

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

答案 1 :(得分:2)

端点格式错误

Ex:http://localhost:8080/YourService/

Ex:http://localhost:8080/YourService?wsdl

更正端点格式以设置构造函数

Ex:http://localhost:8080/YourService