08-11-2006 02:55 PM
public static void main(String[] args) throws Exception{
Store storeRef = new Store(StoreEnum.workspace, "lightWeightVersionStore");
String uuid = "d7e29d6c-2965-11db-9253-5f4da51af059";
String path = null;
//start Session
AuthenticationUtils.startSession("admin", "admin");
// Get the content service
ContentServiceSoapBindingStub contentService = WebServiceFactory.getContentService();
// Create a reference to the node to be read
Reference newContentReference = new Reference (storeRef,uuid,path);
// Read the newly added content from the respository
Content[] contents = contentService.read(
new Predicate(new Reference[]{newContentReference}, storeRef, null),
Constants.PROP_CONTENT);
//Print the file contents
System.out.println(ContentUtils.getContentAsString(contents[0]));
// End the session
AuthenticationUtils.endSession();
}Exception in thread "main" org.alfresco.webservice.util.WebServiceException: Unable to get content as string.
at org.alfresco.webservice.util.ContentUtils.getContentAsString(ContentUtils.java:87)
at ReadFile.readFile(ReadFile.java:52)
at ReadFile.main(ReadFile.java:30)
Caused by: java.net.MalformedURLException: no protocol: null?ticket=TICKET_87c3cdd6-296a-11db-9253-5f4da51af059
at java.net.URL.<init>(URL.java:567)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at org.alfresco.webservice.util.ContentUtils.getContentAsString(ContentUtils.java:75)
… 2 more08-15-2006 12:46 PM
08-24-2006 11:16 AM
08-25-2006 12:45 PM
08-28-2006 07:57 AM
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.