Axis2 Class Cast Exception | Community
Skip to main content
Level 2
October 16, 2015
Solved

Axis2 Class Cast Exception

  • October 16, 2015
  • 2 replies
  • 1016 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

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.

2 replies

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 16, 2015

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.

Level 2
October 16, 2015

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.