cancel
Showing results for 
Search instead for 
Did you mean: 

ws too slow

bassista
Champ in-the-making
Champ in-the-making
hello everybody!

i've an alfresco deployed on jboss as a standalone web-app.
i've another web-application of my own deployed on the same jboss
that uses alfresco ws. (i'm using axis 1.4 on the client side)

i use a single user at all, that logs in once, for the further requests i use always the same ticket (ws-security feature)

every ws request takes more than 5 seconds to end.

alfresco web-client instead is very responsive!

i think i've some problem of configuration whit the ws… any idea? i need some hint and tip! help me!!
thanks in advance
2 REPLIES 2

sdavis
Champ in-the-making
Champ in-the-making
Are you using CML at all as described at http://wiki.alfresco.com/wiki/Alfresco_Content_Management_Web_Services ?

Also, I assume you need true web services… but in case a RESTful approach is an option be sure to also review http://wiki.alfresco.com/wiki/Web_Scripts

bassista
Champ in-the-making
Champ in-the-making
that's the code:

      CML cml = new CML();
         
         fine=System.currentTimeMillis();
         trascorso=fine-inizio;
         inizio=fine;
         System.out.println("6c) updateResult: "+trascorso);
         
         cml.setCreate(new CMLCreate[] { create });
         
         fine=System.currentTimeMillis();
         trascorso=fine-inizio;
         inizio=fine;
         System.out.println("6d) updateResult: "+trascorso);
         
         UpdateResult[] result = repositoryService.update(cml);
More than 5 seconds are spent in the following method: org.alfresco.webservice.repository.RepositoryServiceSoapBindingStub.update(CML)

in the following code:

         Reference newContentNode = result[0].getDestination();
         
         fine=System.currentTimeMillis();
         trascorso=fine-inizio;
         inizio=fine;
         System.out.println("7a) getNode: "+trascorso);
         
         Content content = contentService.write(newContentNode,
               Constants.PROP_CONTENT, contentFile, contentFormat);
         if (newContentNode == null)
            throw new Exception("Errore nell'importazione del file.");
         
         fine=System.currentTimeMillis();
         trascorso=fine-inizio;
         inizio=fine;
         System.out.println("7b) write: "+trascorso);

more than 10 seconds are spent in the following method:
org.alfresco.webservice.content.ContentServiceSoapBindingStub.write(Reference,String,byte[],ContentFormat)
(the uploaded file dimension is very small, few kb)

another call that needs a lot of seconds is:
org.alfresco.webservice.authoring.AuthoringServiceSoapBindingStub.getVersionHistory(Reference)

I'm totally amazed at these time-consuming web services…