0

我们将 drupal soapservice 用于 Web 服务。当我们尝试调用soapservice时,它返回结果但axis2抛出以下错误......

org.apache.axis2.AxisFault: javax.xml.stream.XMLStreamException: element text content may not contain START_ELEMENT 
 at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) 
 at com.chm.api.login.client.DrupalSoapStub.fromOM(DrupalSoapStub.java:12249) 
 at com.chm.api.login.client.DrupalSoapStub.userLogin(DrupalSoapStub.java:1408) 
 at SocketClient.main(SocketClient.java:144) 
Caused by: java.lang.Exception: javax.xml.stream.XMLStreamException: element text content may not contain START_ELEMENT 
 at com.chm.api.login.client.DrupalSoapStub$UserLoginResponse$Factory.parse(DrupalSoapStub.java:59804) 
 at com.chm.api.login.client.DrupalSoapStub.fromOM(DrupalSoapStub.java:11473) 
 ... 2 more 
Caused by: javax.xml.stream.XMLStreamException: element text content may not contain START_ELEMENT 
 at org.apache.axiom.om.impl.SwitchingWrapper.getElementText(SwitchingWrapper.java:981) 
 at javax.xml.stream.util.StreamReaderDelegate.getElementText(StreamReaderDelegate.java:100) 
 at org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper.getElementText(XMLStreamReaderWrapper.java:100) 
 at org.apache.axiom.util.stax.debug.XMLStreamReaderValidator.getElementText(XMLStreamReaderValidator.java:76) 
 at com.chm.api.login.client.DrupalSoapStub$UserLoginResponse$Factory.parse(DrupalSoapStub.java:59770)
4

1 回答 1

0

我遇到了类似的问题,但与您所面临的不完全相同。我通过在类路径中添加以下依赖项解决了这个问题:

<dependency>
   <groupId>com.sun.xml.ws</groupId>
   <artifactId>jaxws-rt</artifactId>
   <version>2.1.5</version>
</dependency>

我不确定它是否适用于您的问题,但您可以尝试一下。

于 2012-08-20T12:47:55.240 回答