Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

Unable to access the AXIS webservice?

Avatar

Former Community Member

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

1 Accepted Solution

Avatar

Correct answer by
Level 10

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

View solution in original post

7 Replies

Avatar

Correct answer by
Level 10

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

Avatar

Level 1

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)

Avatar

Level 10

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.  

Avatar

Level 1

Thanks,

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

Avatar

Level 10

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.

Avatar

Level 1

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.

Avatar

Level 10

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