Expand my Community achievements bar.

SOLVED

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

Avatar

Level 4

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

1 Accepted Solution

Avatar

Correct answer by
Level 10

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

View solution in original post

2 Replies

Avatar

Level 10

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 ...

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

IntroClient.png

Avatar

Correct answer by
Level 10

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