Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: RE: Service builder in 7.4 not generating SOAP classes
1. Create a new service builder project
2. Run the gradle "buildService" target
3. Add some code to the ServiceImpl class
4. Run the buildService target again to update the code
5. Run the "buildWSDD" target
I get the following error:
> Task
:modules:MyProject:MyProject-service:buildWSDD FAILED
java.lang.ClassNotFoundException:
gov.nasa.hq.liferay.myproject.service.http.FooServiceSoap
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at
org.apache.tools.ant.AntClassLoader.findBaseClass(AntClassLoader.java:1405)
at
org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1102)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at
org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:187)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
at
org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:100)
at
org.apache.axis.wsdl.fromJava.Emitter.setCls(Emitter.java:2079)
at
org.apache.axis.tools.ant.wsdl.Java2WsdlAntTask.execute(Java2WsdlAntTask.java:188)
at
com.liferay.util.ant.Java2WsddTask.generateWsdd(Java2WsddTask.java:112)
at
com.liferay.portal.tools.wsdd.builder.WSDDBuilder._createServiceWSDD(WSDDBuilder.java:159)
at
com.liferay.portal.tools.wsdd.builder.WSDDBuilder.build(WSDDBuilder.java:117)
at
com.liferay.portal.tools.wsdd.builder.WSDDBuilder.main(WSDDBuilder.java:62)
Exception in thread "main" Error while running
org.apache.axis.tools.ant.wsdl.Java2WsdlAntTask
at
org.apache.axis.tools.ant.wsdl.Java2WsdlAntTask.execute(Java2WsdlAntTask.java:261)
at
com.liferay.util.ant.Java2WsddTask.generateWsdd(Java2WsddTask.java:112)
at
com.liferay.portal.tools.wsdd.builder.WSDDBuilder._createServiceWSDD(WSDDBuilder.java:159)
at
com.liferay.portal.tools.wsdd.builder.WSDDBuilder.build(WSDDBuilder.java:117)
at
com.liferay.portal.tools.wsdd.builder.WSDDBuilder.main(WSDDBuilder.java:62)
Caused by: java.lang.ClassNotFoundException:
gov.nasa.hq.liferay.myproject.service.http.FooServiceSoap
at
java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at
org.apache.tools.ant.AntClassLoader.findBaseClass(AntClassLoader.java:1405)
at
org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1102)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:187)
at java.security.AccessController.doPrivileged(Native
Method)
at
org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
at
org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:100)
at
org.apache.axis.wsdl.fromJava.Emitter.setCls(Emitter.java:2079)
at
org.apache.axis.tools.ant.wsdl.Java2WsdlAntTask.execute(Java2WsdlAntTask.java:188)
... 4 more
FAILURE: Build failed with an exception.
* What went wrong:
Execution
failed for task
':modules:MyProject:MyProject-service:buildWSDD'.
This is just an example but this happened when I tried to migrate a service builder project that was built with 7.2 to 7.4. I was able to work around this problem by copying the missing SOAP classes from my 7.2 code to the 7.4 code, but then, running the buildService target again went ahead and deleted those files.
Has there been some change between 7.2 and 7.4 in the support for SOAP?
Hi Steve, I'm not real familiar with Soap services, but poking around the docs and the src code, it looks like Soap web services were deprecated in 7.3 and from what I can tell, the property used to enable the Axis Servlet is not in 7.4 at all.
Thank you Russell. That might be a problem for us, although I do have the SOAP web service working after copying the old SOAP classes to the 7.4 version.
That's interesting. I found some Soap model classes in a few 7.4 code samples that we use in writing the documentation. When I run buildWsdd on these I alsoo see my Soap classes deleted. I guess the actual removal was quite recent.
* Rather, when I run buildService the classes disappear.
I think as long as I keep the old soap classes around I can make it work but it seems to me that if soap support is removed then the buildWSDD target should also be removed.
Powered by Liferay™