As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
1) Set endpoint address of API - WebServiceFactory.setEndpointAddress(endPointUrl);2)Start session - AuthenticationUtils.startSession(serverUsername, serverPassword);3) Get required service - WebServiceFactory.getRepositoryService(); or WebServiceFactory.getContentService(); or any other - read APIs/Javadocs for this4) Perform required APIs on the service5) End session - AuthenticationUtils.endSession();
import org.alfresco.webservice.content.Content; import org.alfresco.webservice.content.ContentServiceSoapBindingStub; import org.alfresco.webservice.repository.UpdateResult; import org.alfresco.webservice.types.*; import org.alfresco.webservice.util.AuthenticationUtils; import org.alfresco.webservice.util.Constants; import org.alfresco.webservice.util.Utils; import org.alfresco.webservice.util.WebServiceFactory; import java.io.File; import static java.io.File.separatorChar; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.*; String alfrescoWsUrl = "http://localhost:8080/alfresco/api"; WebServiceFactory.setEndpointAddress(alfrescoWsUrl); AuthenticationUtils.startSession("admin", "admin"); … … ???????? … … AuthenticationUtils.endSession();
but I didn't understand how to consume these examples, where to find them in my Alfresco and how to develop and deploy one ws of mine.
I hope someone could help me, because I think the wiki pages takles these issues superficially