11-29-2011 10:01 AM
I'm trying to use call from the Automation service, but I have some problem when the Path of my Document finish with space e.g.:
'/default-domain/workspaces/MyWorkspace/MyFolder/MyDocument '
when I call the service, I use :
{"input":"docs:/default-domain/workspaces/MyWorkspace/MyFolder/MyDocument , /default-domain/workspaces/MyWorkspace/MyFolder/AnotherDocument", "params":{}, "context":{}}
I tried to put single quotes (') and double quote ("), but still the same error
11-29-2011 11:35 AM
You cannot.
The default "docs" resolver (on the server side) is trimming the doc paths in the list.
The only way to do this is to override the default resolver for "docs" which is:
org.nuxeo.ecm.automation.server.jaxrs.io.resolvers.DocumentsInputResolver
You can do this by creating a regular Nuxeo component and call the following code in the activate method:
JsonRequestReader.addInputResolver(new MyDocumentsInputResolver());
where MyDocumentsInputResolver is your custom resolver for the "docs" input. (which should implement the logic to accept trailing spaces in the path entries)
11-29-2011 11:35 AM
You cannot.
The default "docs" resolver (on the server side) is trimming the doc paths in the list.
The only way to do this is to override the default resolver for "docs" which is:
org.nuxeo.ecm.automation.server.jaxrs.io.resolvers.DocumentsInputResolver
You can do this by creating a regular Nuxeo component and call the following code in the activate method:
JsonRequestReader.addInputResolver(new MyDocumentsInputResolver());
where MyDocumentsInputResolver is your custom resolver for the "docs" input. (which should implement the logic to accept trailing spaces in the path entries)
11-29-2011 12:22 PM
Ok, but how do I create a regular Nuxeo component, can you give me an example or point me to the doc.
Thanks!
Dom
11-29-2011 01:12 PM
As far as components are concerned you can learn more here: http://doc.nuxeo.com/x/0gBu
here: http://doc.nuxeo.com/x/dABu
and here: http://explorer.nuxeo.org/nuxeo/site/distribution/current/listComponents
Please note however that what you asked here is a separate question. In such situations we recommend creating a new question instead of attaching it to another one. This will help other community users navigate through this system and find the answers they are looking for.
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.