AnsweredAssumed Answered

Get content from web service

Question asked by drvolks on May 27, 2010
Latest reply on May 27, 2010 by drvolks
I'm trying to read content from a java web service and I can't figure out what Store and Reference I need to use. It seems there is no examples in the Alfresco forum!

I have a web project named "site1" and the content is in the staging sandbox. In the ROOT folder there is a article.html file.

String path = "/article.html"
Store store = new Store("avm", "site1");

ContentServiceSoapBindingStub contentService = WebServiceFactory.getContentService();
Reference ref = new Reference(store, null, path);
Content[] readResult =
              new Predicate(new Reference[]{ref}, store, null),
Content content = readResult[0];

Which result in

Failed to resolve to a single NodeRef with parameters (store=avm:site1 uuid=null path=/article.html), found 0 nodes.

Also tried with the workspace store SpacesStore and site1 in the path, same result. (Obviously the path is wrong).

I've seen examples with a syntax like "/app:company_home/cm: bla bla bla" but I'm under the impression it's used for DM content.

So, in summary, how can get the file article.html in the root of a web project named site1, using the web service?