I'm trying to integrate a component wired together with a webservice call using the JAX-WS API. I'm utilizing JAX-WS request dispatcher to make the service call.
The service call is working as expected from my local eclipse (able to create the service object, place the dispatch call and receive the response back.)
The error that I'm getting in the CQ error log:
Caused by: org.apache.sling.api.SlingException: javax.servlet.ServletException: java.lang.LinkageError: loader constraint violation: when resolving method "javax.xml.ws.Service.create(Ljava/net/URL;Ljavax/xml/namespace/QName;)Ljavax/xml/ws/Serv ice;" the class loader (instance of org/apache/felix/framework/ModuleImpl$ModuleClassLoaderJava5) of the current class, com/mohegansun/website/api/services/facade/ServicesFacade, and the class loader (instance of <bootloader>) for resolved class, javax/xml/ws/Service, have different Class objects for the type javax/xml/namespace/QName used in the signature
The jdk used by my eclipse and CQ instance (local) are both same!
I removed the jaxws-api-2.2.8 and jaxws-rt-2.0EA3 jars from the jre/lib/ext folder, restarted my machine, hoping to get a different error/exception - It still fails with same error!
I'm banging my head against the wall as i write this!
Any help, much appreciated.
Thanks Marcel .
I had already looked at the article. We are not creating Proxy classes to let the container know how to invoke the service call, rather the webservice dispatch object is used invoke to the call.
This is a design restriction.
interesting behavior to note here is: I removed the jaxws jars from jre, after restarting and testing the call again on CQ, I get the same error. How's that logically possible? I'm just short of ideas here. Where does CQ look for those jars, if they are not in the underlying JRE? Looks to me like a classloader hell issue, but, i need ideas to explore further. Thanks much!