JAXWS WebServices calls not working on AEM 6.5

Issue

JAXWS web-service calls not working not working on AEM 6.5 and above

Solution

This issue is due to the fact that CFX packages have been removed from AEM and you have to install those externally.

To resolve the issue, you can install the "cfx-bundles-1.0.zip" package which provides the minimal set of jar files for the 2.3.0 release of CXF DOSGi

This is the minimal set of jars are:

/apps/cxf/install/org.apache.servicemix.bundles.wsdl4j-1.6.3_1.jar 
/apps/cxf/install/woodstox-core-5.0.3.jar 
/apps/cxf/install/cxf-core-3.2.0.jar 
/apps/cxf/install/cxf-rt-bindings-soap-3.2.0.jar 
/apps/cxf/install/cxf-rt-bindings-xml-3.2.0.jar 
/apps/cxf/install/cxf-rt-frontend-simple-3.2.0.jar 
/apps/cxf/install/cxf-rt-databinding-jaxb-3.2.0.jar 
/apps/cxf/install/cxf-rt-transports-http-3.2.0.jar 
/apps/cxf/install/cxf-rt-wsdl-3.2.0.jar 
/apps/cxf/install/xmlschema-core-2.2.2.jar 
/apps/cxf/install/woodstox-core-5.0.3.jar 
/apps/cxf/install/stax2-api-3.1.4.jar 
/apps/cxf/install/validation-api-1.1.0.Final.jar 
/apps/cxf/install/asm-all-5.0.4.jar

In some cases, you might run into an issue where JAXWS calls are still failing with the error below:

javax.xml.ws.WebServiceException: Could not find wsdl:binding operation info for web method <method>. 
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:129) [org.apache.cxf.cxf-rt-frontend-jaxws:3.2.10] 
at com.sun.proxy.$Proxy254.getKeywords(Unknown Source)

To resolve the issue, you can follow the steps below:

1. Remove the following from the bundle's Import-Package directive:

!javax.jws.*, 
!javax.xml.bind.*, 
!javax.xml.bind.annotation.*,

2. Get those packages to resolve once more, add the following dependencies to the core bundle:

<dependency> 
  <artifactId>org.apache.servicemix.specs.jaxb-api-2.2</artifactId> 
  <version>2.9.0</version> 
  <groupId>org.apache.servicemix.specs</groupId> 
  <scope>provided</scope> 
</dependency> 
<dependency> 
  <artifactId>geronimo-ws-metadata_2.0_spec</artifactId> 
  <version>1.1.3</version> 
  <groupId>org.apache.geronimo.specs</groupId> 
  <scope>provided</scope> 
</dependency>

Last ned

Forsiktig!

Note: See this article as well if you are on Java 11.

Adobe-logoen

Logg på kontoen din