Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.
SOLVED

Axis2 Class Cast Exception

Avatar

Level 2

Hi We are trying to imlement webservices on CQ. We are getting org.apache.commons.httpclinet.HttpClinet cannot be cast into org.apache.commons.httpclinet.HttpClinet . I have refered to the link adobe suggested and still getting the error. I dont understand how to proceed. I have tried to debug step by step. The (httpclient )cast, in org.apache.http.axis2.AbstractHTTPCLIENT is causing the class cast exception. I tried to swtich classloader to abstracthttpclinet , but no help. 

 

I tried to implement axis2 without two-way ssl works fine, but when implement with two way ssl , i get this error. Any help is greatly appreciated.

http://helpx.adobe.com/cq/kb/OsgiClassLoading3Party.html

1 Accepted Solution

Avatar

Correct answer by
Level 10

You can also use JAX-WS and Apache Ant to generate Java proxy classes. Then you can wrap these classes in an OSGi bundle to consume the wsdl - see http://helpx.adobe.com/adobe-cq/using/creating-cq-bundles-consume-web.html.

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

You can also use JAX-WS and Apache Ant to generate Java proxy classes. Then you can wrap these classes in an OSGi bundle to consume the wsdl - see http://helpx.adobe.com/adobe-cq/using/creating-cq-bundles-consume-web.html.

Avatar

Level 2

HttpClient cast exceptions is occurring because of multiple versions of httpclient running in the CQ. CQ provides a httpclient 3.1  bundle, explicitly deny importing that httpclient bundle & use axis httpclient. Everything else will be a smooth ride.