11-11-2009 07:29 AM
01-20-2010 04:05 AM
03-04-2010 12:17 PM
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 this
4) Perform required APIs on the service
5) 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();
03-04-2010 12:24 PM
03-05-2010 03:33 AM
03-17-2010 07:41 PM
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 either did not find out how to run them (but I am on NetBeans and I know that Alfresco is built on Eclipse) - although there is an import tool, I prefered creating my own code and just used the examples as input how to do it (approximately).
I hope someone could help me, because I think the wiki pages takles these issues superficiallyIndeed for a newcomer the Wiki informaion is in general quite superficial. I am still on finding out some needed things by trial and error.
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.