尝试调用CXF / SOAP Web服务时出现LinkageError [英] LinkageError whilst trying to invoke CXF/SOAP webservice
问题描述
我有一个项目(比如myproject),我在其中托管了一个CXF RESTful服务和CXF WS / SOAP服务,并在JBoss(6.0.0.FINAL)上运行。 RESTful接口由我们所有内部系统使用,SOAP接口由第三方系统使用(作为回调接口)
I have a project (say myproject) in which I have hosted a CXF RESTful service and CXF WS/SOAP service, and running on JBoss (6.0.0.FINAL). The RESTful interface is used by all of our internal systems, and the SOAP interface is used by the third party systems (as a callback interface)
以下URL工作正常。
Following URLs are working fine.
-
REST URL:
http:// localhost:8080 / myproject / internal / someOperation
(content-type:application / json
和POST body)
REST URL:
http://localhost:8080/myproject/internal/someOperation
(content-type: application/json
and POST body)
SOAP WSDL: http:// localhost:8080 / myproject / cbsoap?wsdl
SOAP WSDL: http://localhost:8080/myproject/cbsoap?wsdl
现在我的问题是实际的SOAP调用不成功。我使用SOAPUI来尝试SOAP调用,但只是为了能够查询WSDL。我收到以下错误: -
Now my problem is that actual SOAP calls are not successful. I use SOAPUI to try the SOAP calls but just to able to query the WSDL. I am getting the following error:-
javax.servlet.ServletException: Servlet execution threw an exception
org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67)
root cause
java.lang.LinkageError: loader constraint violation: when resolving overridden method "org.apache.cxf.jaxb.attachment.JAXBAttachmentUnmarshaller.getAttachmentAsDataHandler(Ljava/lang/String;)Ljavax/activation/DataHandler;" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, org/apache/cxf/jaxb/attachment/JAXBAttachmentUnmarshaller, and its superclass loader (instance of ), have different Class objects for the type r used in the signature
org.apache.cxf.jaxb.JAXBDataBase.getAttachmentUnmarshaller(JAXBDataBase.java:78)
org.apache.cxf.jaxb.io.DataReaderImpl.createUnmarshaller(DataReaderImpl.java:123)
org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:156)
org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:109)
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207)
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:209)
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:191)
org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:114)
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185)
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:108)
javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:164)
org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67)
推荐答案
<我终于解决了这个问题,但这真的很奇怪。
I finally solved the problem but it is really weird.
- 我添加了cxf-rt-frontend-jaxws和cxf-bundle-rs作为依赖项并标记一些排除项 - > jetty-server,gernomino-servlet。
感谢您的回复。
这篇关于尝试调用CXF / SOAP Web服务时出现LinkageError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!