AnsweredAssumed Answered

Problem building custom webservice Alfresco 4.2

Question asked by jlabuelo on Nov 16, 2016
Latest reply on Nov 17, 2016 by afaust

Hi all

We are trying to build a custom webservice in order to allow an external system to run a query for all documents that have been modified between two given dates, and return all the metadata of these documents.

 

The issue we are facins is that after building the webservce the schmea is no finding some of the namesapace I need.

 

I am ussing

 

xmlns:ns="http://www.alfresco.org/ws/model/content/1.0"
type="java:org.alfresco.repo.webservice.authentication.AuthenticationFault"

 

but with this, the namespaces are not being found. When we try to deploy the wsdl we obtain the following error:

 

java.lang.NoClassDefFoundError: [Lorg/alfresco/webservice/types/ResultSetRow;
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.getDeclaredMethod(Class.java:2128)
at org.apache.axis.description.JavaServiceDesc.loadServiceDescByIntrospection(JavaServiceDesc.java:874)
at org.apache.axis.description.JavaServiceDesc.loadServiceDescByIntrospection(JavaServiceDesc.java:846)
at org.apache.axis.description.JavaServiceDesc.getOperations(JavaServiceDesc.java:410)
at org.apache.axis.wsdl.fromJava.Emitter.writePortType(Emitter.java:1016)
at org.apache.axis.wsdl.fromJava.Emitter.getWSDL(Emitter.java:484)
at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:331)
at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:430)
at org.apache.axis.wsdl.Java2WSDL.run(Java2WSDL.java:588)
at org.apache.axis.wsdl.Java2WSDL.main(Java2WSDL.java:682)
Caused by: java.lang.ClassNotFoundException: org.alfresco.webservice.types.ResultSetRow
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 12 more

 

We manage all dependencies with Maven and we are able to get access to them with no issue. I have seen that some other colleagues in this forum have fixed this issue by placing the libraries in  WEBINF/lib but this is not working either for me.

Here I attache the webservice and the xsd

Could you guide me to see what my error can be?

Thanks a lot in advance!

Outcomes