08-19-2016 07:13 PM
Hi,
I'm trying to call the operation "Tag.Suggestion" using the java-client. I expected to get a list of tags or something but just get a ClassCastException because the client expect a Map as result but received a ArrayList.
My code is
NuxeoClient client = new NuxeoClient(url, username, password);
Object o = client.automation("Tag.Suggestion").param("searchTerm", userText).execute();
and the resulting stack trace is
java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.util.Map
at org.nuxeo.client.api.marshaller.NuxeoResponseConverterFactory.convert(NuxeoResponseConverterFactory.java:127)
at org.nuxeo.client.api.marshaller.NuxeoResponseConverterFactory.convert(NuxeoResponseConverterFactory.java:55)
at retrofit2.ServiceMethod.toResponse(ServiceMethod.java:116)
at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:211)
at retrofit2.OkHttpCall.execute(OkHttpCall.java:174)
at org.nuxeo.client.api.objects.NuxeoEntity.getResponse(NuxeoEntity.java:135)
at org.nuxeo.client.api.objects.Operation.execute(Operation.java:118)
at org.nuxeo.client.api.objects.Operation.execute(Operation.java:131)
Can anybody tell me how to call this operation correctly?
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.