cancel
Showing results for 
Search instead for 
Did you mean: 

Web service client startSession not works with my Alfresco 5.0

spilby
Confirmed Champ
Confirmed Champ
Hi,

I'm changing our Alfresco 4.1.6 to an Alfresco 5.0.

When I execute this code from Java


WebServiceFactory.setEndpointAddress(endPoint);
AuthenticationResult result = WebServiceFactory.getAuthenticationService().startSession(username, password); 


and points to our old Alfresco 4.1.6 (with a url http://10.120.X.XXX:8080/alfresco/api) works ok and connect.

But when I execute that code on our new Alfresco (with the same url "/alfresco/api" but new IP) it returns a exception.

We still use the same web-service-client library (alfresco-webservice-client-2.1.jar). Alfresco 5.0 not works witj this library? Or maybe the url to start the session are different?

When I call to this url with a browser returns me an org.alfresco.webservice.util.WebServiceException: Error starting session.


{"list":{"pagination":{"count":1,"hasMoreItems":false,"totalItems":1,"skipCount":0,"maxItems":100},"entries":[{"entry":{"quotas":[],"isEnabled":true,"id":"-default-"}}]}}


What's the problem? Someone knows it?
4 REPLIES 4

mrogers
Star Contributor
Star Contributor
That looks like the old SOAP API which is no longer provided.   In addition the URL for "api" was reused for the public REST API.

spilby
Confirmed Champ
Confirmed Champ
And how we can use the webservice client with Alfresco 5.0? With another url?

Yes, we use SOAP, for example doing things like this:


RepositoryServiceSoapBindingStub repositoryService = SessionManager.getRepositoryService(sessionId);
Predicate pred = new Predicate();
pred.setNodes(new Reference[] { new Reference(STORE, null, alfPath) });
node = repositoryService.get(pred);


We can't use it with Alfresco 5.0?? We need to change all or only the Authentication?? I'm scared now…

opbarth
Champ in-the-making
Champ in-the-making
Same problem here. Did you find a solution?

opbarth
Champ in-the-making
Champ in-the-making
https://wiki.alfresco.com/wiki/Alfresco_Content_Management_Web_Services

4. line:

"This API was removed in Alfresco 5.0 and is no longer available. Use the CMIS web services bindings instead."