cancel
Showing results for 
Search instead for 
Did you mean: 

Reference folder inside Web Project

frm85
Champ in-the-making
Champ in-the-making
Hi all,

I'm new in Alfresco (3.4.d) and i'm trying to connect a java application though web services.

Company_home > wcm (Web projects) > myWebProject > myFolderInsideProject

My problem is that i can't get the reference of folder inside "myWebProject". I did a lucene search, it works:

Query query = new Query("lucene","PATH:\"/www/avm_webapps/ROOT/noticia\"");

But when i try to do this with the method ParentReference to create a content, doesn't work:

Store storeRef = new Store("avm", "myWebProject");
   ParentReference companyHomeParent = new ParentReference(storeRef, null, "/www/avm_webapps/ROOT/myFolderInsideProject", Constants.ASSOC_CONTAINS,null);

Thanks for all.
3 REPLIES 3

mrogers
Star Contributor
Star Contributor
That path is not correct.   Within an AVM store the path will be something like "/myWebProject/ROOT/notica".

There's a rather ugly jump between the AVM stores and DM stores.

frm85
Champ in-the-making
Champ in-the-making
Thanks for your answer,

I tried that and i get this error:

Failed to resolve to a single NodeRef with parameters (store=avm:IntranetSGNTJ uuid=null path=/myWebProject/ROOT/myFolder), found 0 nodes

I supposed that store was:

Store storeRef = new Store("avm", "myWebProject");
ParentReference companyHomeParent = new ParentReference(storeRef, null, "/myWebProject/ROOT/myFolder", Constants.ASSOC_CONTAINS,null);

It's very rare, in nodebrowser search works:

In avm://myWebProject look for /www/avm_webapps/ROOT/myFolder, it's correct. I get the node with xpath searc (Parentreference uses xpath if i not wrong)

frm85
Champ in-the-making
Champ in-the-making
I forgot to say that I use web services java. I have a html form, i obtain data in a java class (portlet project).

There are web forms created in alfresco like "new.xsd".

Then another way i see, if i could pass or connect data received to web form "new.xsd" to create the content (.xml)

Regards.