0
votes

I was working on SOAP CXF webservice. I gone through the below link "http://helpx.adobe.com/experience-manager/using/creating-cxf-bundles-consume-web.html". I created the CXF osgi bundle and it's in ACTIVE state in felix console. When i was trying to call webservice through JSP, it's giving error as "java.lang.NoClassDefFoundError: Could not initialize class com.aem.ws.Weather".

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

Thanks,

Kiran Parab

2

2 Answers

0
votes

Check out this link and see if it helps--it sounds like a similar issue: http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.9.html/forum__zydx-dear_expertsim.html

Another thing to check is that your bundles export unique package names. I've found if I have two bundles that export the same package--com.aem.ws in this case--then CQ will pick one to use at runtime, and if that bundle doesn't contain the class I'd get this sort of error even if some other bundle does contain the class. So check what the bundle exports carefully to ensure you don't have two bundles defining the same package namespace.

0
votes

Issue is render because of command mentioned in blog. I am using "apache-cxf-3.0.0-milestone2" version. When i am using mentioned command in blog, In Weather generated class files, i am getting below error :-

//This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
//API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
//compliant code instead.**
public Weather(WebServiceFeature ... features) {
    super(WSDL_LOCATION, SERVICE);
}

//This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
//API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
//compliant code instead.
public Weather(URL wsdlLocation, WebServiceFeature ... features) {
    super(wsdlLocation, SERVICE);
}

//This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
//API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
//compliant code instead.
public Weather(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) {
    super(wsdlLocation, serviceName);
}   

To remove the error from stubs, please find the new command mentioned below :-

*New command :-

wsdl2java -frontend jaxws21 -p com.aem.ws -d c:\proxy http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL