Unable to build bundle if scope is given as "provided". | Community
Skip to main content
Level 3
October 4, 2017
Solved

Unable to build bundle if scope is given as "provided".

  • October 4, 2017
  • 2 replies
  • 1480 views

Hi All,

We are using CXF API 3.2.0 for accessing SOAP webservice in AEM.

We are have included below given dependency for cxf-rt-frontend-jaxws  with default scope.

<dependency>

<groupId>org.apache.cxf</groupId>

<artifactId>cxf-rt-frontend-jaxws</artifactId>

<version>3.2.0</version>

</dependency>

While invoking the webservice, we are getting below given exception,

java.lang.LinkageError: loader constraint violation: when resolving overridden method "org.apache.cxf.jaxb.attachment.JAXBAttachmentMarshaller.addMtomAttachment(Ljavax/activation/DataHandler;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;" the class loader (instance of org/apache/felix/framework/BundleWiringImpl$BundleClassLoaderJava5) of the current class, org/apache/cxf/jaxb/attachment/JAXBAttachmentMarshaller, and its superclass loader (instance of <bootloader>), have different Class objects for the type javax/activation/DataHandler used in the signature

As some one suggested, we have changed the scope as  "provided", but after that we are getting build error saying,

Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://cxf.apache.org/jaxws].

Have anyone faced similar issue?Could any one help us in fixing this?

Thanks,

Anusha

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 Ratna_Kumar

Hi Anusha,

Yes, Scott is right!!

See this article which includes your use case: Creating an Experience Manager  HTL Component that displays data from a SOAP Web Service

You need to include the WS Java Proxy files as into the OSGi bundle as shown in the article. If you face any issues in this, we are happy to help you out!!

Thanks,

Ratna

2 replies

smacdonald2008
Level 10
October 4, 2017

We have built an HTL component that can successfully invoke a 3rd party SOAP web service and display the result - see the article and video here.

Scott's Digital Community: Creating an AEM HTML Template Language Component that displays data from a SOAP Web Service

You have to configure a file as described in the article. This is the WS data being displayed:

Ratna_Kumar
Ratna_KumarAccepted solution
Level 10
October 4, 2017

Hi Anusha,

Yes, Scott is right!!

See this article which includes your use case: Creating an Experience Manager  HTL Component that displays data from a SOAP Web Service

You need to include the WS Java Proxy files as into the OSGi bundle as shown in the article. If you face any issues in this, we are happy to help you out!!

Thanks,

Ratna