08-08-2007 11:53 AM
Store storeRef = new Store("avm", "myWebProject");
Query query = new Query(
Constants.QUERY_LANG_LUCENE,
"+PATH:\"/www/avm_webapps/ROOT/content/*\"");
Predicate predicate = new Predicate(null, storeRef, query);
Content[] readResult = contentService.read(
predicate,
"{http://www.alfresco.org/model/content/1.0}content");
if (readResult == null) {
System.out.println("No content gotten!");
}
else {
for (Content content : readResult) {
InputStream contentStream = ContentUtils.getContentAsInputStream(content);
…
}
org.alfresco.webservice.util.WebServiceException: Unable to get content as inputStream.
at org.alfresco.webservice.util.ContentUtils.getContentAsInputStream(ContentUtils.java:128)
at com.bigbad.utils.HeadlineGrabber.getHeadlineList(TestApp.java:91)
at com.bigbad.utils.HeadlineGrabber.getHeadlines(TestApp.java:46)
at com.bigbad.utils.HeadlineGrabber.main(TestApp.java:26)
Caused by: java.net.MalformedURLException: no protocol: null?ticket=TICKET_861ad1ef84ccfc8e68ad51787c1e5812ff219e41
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)Error during query
[]
at java.net.URL.<init>(Unknown Source)
at org.alfresco.webservice.util.ContentUtils.getContentAsInputStream(ContentUtils.java:122)
… 3 more
11-27-2007 12:42 PM
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.