11-16-2016 01:49 PM
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="javarg.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!
11-17-2016 04:11 AM
Are you aware that Alfresco 4.2 is the LAST version to support web services and that this feature has been removed in Alfresco 5? Creating custom web services at this point seems like a waste of effort. Additionally, your use case can be perfectly dealt with using the industry standard CMIS API. It supports querying of nodes / documents e.g. with modification date within a specific range and returning results with their metadata.
Due to class loading order in JVM you absolutely have to place your JARs in WEB-INF/lib if they have dependencies to Alfresco JARs. Putting them anywhere else will cause classes not to be found.
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.