Unable to access the AXIS webservice? | Community
Skip to main content
October 16, 2015
Solved

Unable to access the AXIS webservice?

  • October 16, 2015
  • 7 replies
  • 4475 views

Hi,

 I am trying to import the wsdl provided from Magento in CQ fleix console by using SOAP services (RPC).

 For that we added some support jars as OSGI bundle into fleix.

I mentioned the exception below.Please suggest me to solve it.

axis.jar
commons-discovery-0.2
javax.wsdl_1.6.2.v201012040545
jaxrpc
org.apache.commons.logging_1.0.4.v201101211617
commons-net-3.3

Caused by: java.lang.ExceptionInInitializerError
    at org.apache.axis.handlers.BasicHandler.<clinit>(BasicHandler.java:43)
    at org.apache.axis.client.Service.getAxisClient(Service.java:104)
    at org.apache.axis.client.Service.<init>(Service.java:113)
    at Magento.MagentoServiceLocator.<init>(MagentoServiceLocator.java:12)
    at Magento.Mage_Api_Model_Server_V2_HandlerPortTypeProxy._initMage_Api_Model_Server_V2_HandlerPortTypeProxy(Mage_Api_Model_Server_V2_HandlerPortTypeProxy.java:18)
    at Magento.Mage_Api_Model_Server_V2_HandlerPortTypeProxy.<init>(Mage_Api_Model_Server_V2_HandlerPortTypeProxy.java:8)
    at org.apache.jsp.apps.allcomponent.components.page.LayoutPage.LayoutPage_jsp._jspService(LayoutPage_jsp.java:175)
    at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
    ... 85 more
Caused by: org.apache.commons.discovery.DiscoveryException: No implementation defined for org.apache.commons.logging.LogFactory
    at org.apache.commons.discovery.tools.ClassUtils.verifyAncestory(ClassUtils.java:176)
    at org.apache.commons.discovery.tools.SPInterface.verifyAncestory(SPInterface.java:201)
    at org.apache.commons.discovery.tools.SPInterface.newInstance(SPInterface.java:195)
    at org.apache.commons.discovery.tools.DiscoverClass.newInstance(DiscoverClass.java:579)
    at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:418)
    at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:378)
    at org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:45)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory.java:41)
    at org.apache.axis.components.logger.LogFactory.<clinit>(LogFactory.java:33)
    ... 95 more

Thanks in advance

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

To learn how to successfully work with AEM and web services -- please read this AEM article:

http://helpx.adobe.com/experience-manager/using/creating-cq-bundles-consume-web.html

7 replies

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 16, 2015

To learn how to successfully work with AEM and web services -- please read this AEM article:

http://helpx.adobe.com/experience-manager/using/creating-cq-bundles-consume-web.html

pradeep_kumar1
October 16, 2015

Although I am not the originator of this thread, I am facing the same issue when trying to call a web service with Axis. The web service client requires Apache AXIS which in turn requires the commons logging library. We converted all jars into bundle and installed in Felix. All bundle's have in Active state .Now we get a runtime error

Caused by: org.apache.commons.discovery.DiscoveryException: No implementation defined for org.apache.commons.logging.LogFactory
    at org.apache.commons.discovery.tools.ClassUtils.verifyAncestory(ClassUtils.java:176)
    at org.apache.commons.discovery.tools.SPInterface.verifyAncestory(SPInterface.java:201)
    at org.apache.commons.discovery.tools.SPInterface.newInstance(SPInterface.java:195)
    at org.apache.commons.discovery.tools.DiscoverClass.newInstance(DiscoverClass.java:579)
    at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:418)
    at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:378)
    at org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:45)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory.java:41)
    at org.apache.axis.components.logger.LogFactory.<clinit>(LogFactory.java:33)

smacdonald2008
Level 10
October 16, 2015

In the AEM web service article -- we successfully created Java Proxy files that consumed a 3rd party web service (http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL) using  Java API for XML Web Services (JAX-WS): https://jax-ws.java.net/2.2.1/

Try using JAX-WS as opposed to AXIS. Follow the article - its been tested many times and works.  

pradeep_kumar1
October 16, 2015

Thanks,

As per our requirement, we are using Axis JAX-RPC based web service. i attached installed bundle screenshot. Please guide me.

smacdonald2008
Level 10
October 16, 2015

The AEM community team will make Creating AEM Web Services Bundles with AXIS a priority. The Eng team guided us to use JAX-WS which we did and it works. However -- we will look into what needs to be done to build an AEM Web Service bundle with AXIS. Its a different set of Java libs (AXIS vs JAX-WS) and most likely is a dependency issue.

pradeep_kumar1
October 16, 2015

Ya your right, May be package conflict issue ( Common Discovery bundle with  org.apache.sling.commons.log bundle

     
Imported Packagesorg.apache.commons.logging,version=1.1.1 from org.apache.sling.commons.log (3)

For axis and common discovery bundle requires org.apache.sling.commons.log package. we need to use that package

How to solve the dependency issue.

smacdonald2008
Level 10
October 16, 2015

When using CQ and web services, I recommend using JAX-WS over AXIS when possible due to all of the AXIS JAR dependencies that you need to get into CQ. If you want to use AXIS instead of JAX-WS -- one of our top contributors in the AEM community has written a really useful article that talks about using AXIS and CQ:

http://www.wemblog.com/2012/03/how-to-integrate-soap-web-service.html 

This article will guide you how to get the required AXIS dependencies into CQ