cancel
Showing results for 
Search instead for 
Did you mean: 

Batch processing through SOAP webservices

itsard
Champ in-the-making
Champ in-the-making
Hi,
I have implemented an interface using the Alfresco SOAP webservices api which calls these api from my application which is a different ear.
Currently if I have to upload multiple files i need to call the webservice api as many times.
Does SOAP webservices allow multiple calls simultaneously like creating multiple folders or documents through just one webservice call.?
Or creating a batch of actions and then calling them in one go on alfresco server?
2 REPLIES 2

openpj
Elite Collaborator
Elite Collaborator
Alfresco Web Services API allows you to create an array of calls for each type of modification.
So in this way you can invoke an unique call with many CML modifications.

For example if you would like to create 2 nodes you need to do this:

        CMLCreate createOne = new CMLCreate("1", parentReferenceOne, null, null, null, Constants.TYPE_CONTENT, propertiesOne);
        CMLCreate createTwo = new CMLCreate("2", parentReferenceTwo, null, null, null, Constants.TYPE_CONTENT, propertiesTwo);
        CML cml = new CML();
        cml.setCreate(new CMLCreate[]{createOne,createTwo});
        UpdateResult[] result = WebServiceFactory.getRepositoryService().update(cml);
Hope this helps.

itsard
Champ in-the-making
Champ in-the-making
Hey,
This would create multiple blank documents.
Is there a similar way for writing content through batch processing to the documents created ?

What I mean is :
Content lObjContent=contentService.write(lRefrenceObj, Constants.PROP_CONTENT, lFilebytes, format);
Can this code be also run such that in one call it writes content to multiple files in the repository.