cancel
Showing results for 
Search instead for 
Did you mean: 

Empty Exception

aubertinp
Champ in-the-making
Champ in-the-making
Hi,
I try to use Alfresco web Service API.
When I invoke this code:

      try {
         Reference SINISTRE_FOLDER = new Reference(STORE, null, "/app:company_home/cm:Sinistre_"+newSinistreId);
           
         WebServiceFactory.getRepositoryService().get(new Predicate(new Reference[]{SINISTRE_FOLDER}, STORE, null));
         message = "Sinistre "+newSinistreId+" existe déjà";
   
      
      }catch(RemoteException e){
         System.out.println("exception" +e);
}


I expect to get an exception but that exception is always empty!

Any ideas?

Thanks!
2 REPLIES 2

openpj
Elite Collaborator
Elite Collaborator
Have you set the endpoint address?
I think you must add this before invoking RepositoryService:

String alfrescoApiUrl = "http://yourAlfrescoIP:yourAlfrescoPORT/alfresco/api";
WebServiceFactory.setEndpointAddress(alfrescoApiUrl);


Hope this helps.

aubertinp
Champ in-the-making
Champ in-the-making
No, that's strange, because the code work!

I am able to do everything except getting this exception!

Thank anyway.