cancel
Showing results for 
Search instead for 
Did you mean: 

Java-backed_Web_Scripts_Samples

lblancher
Champ in-the-making
Champ in-the-making
Hello,
  I am trying to build a java web script based on the information contained at http://wiki.alfresco.com/wiki/Java-backed_Web_Scripts_Samples.  The second example extends a class called AbstractRepositoryWebScript that is available for download.  When i use that file, i am unable to resolve two of its dependencies.

org.alfresco.repo.web.scripts.Repository
org.alfresco.web.scripts.servlet.WebScriptServletRequest;

I can't find the jar that these two classes reside in.  I have checked the alfresco SDK, Web Service API and alfresco-*.jar files, and nothing will give me these classes.  Where can i find them so that i can continue to develop my web scripts?

I am using alfresco 2.1.

Thanks in advance,
Lucas
5 REPLIES 5

cbosdonnat
Champ in-the-making
Champ in-the-making
Hi Lucas,

org.alfresco.repo.web.scripts.Repository
org.alfresco.web.scripts.servlet.WebScriptServletRequest;

I can't find the jar that these two classes reside in.  I have checked the alfresco SDK, Web Service API and alfresco-*.jar files, and nothing will give me these classes.  Where can i find them so that i can continue to develop my web scripts?

The org.alfresco.web.scripts.servlet.WebScriptServletRequest class is contained in the alfresco-web-client.jar. You can see this by using CTRL+SHIFT+T in Eclipse. Are you sure that your Alfresco SDK has been correctly downloaded ? I already have seen some problems like this: the SDK archive was corrupted and didn't contain all the jars.

For the other class, I don't see where you need it in the example. I haven't found any class like this in the SDK…

HTH

sun
Champ in-the-making
Champ in-the-making
It seems the online document is for Alfresco 3.0, which will be released later.

lblancher
Champ in-the-making
Champ in-the-making
Ok.. Thank you very much.  I look forward the 3.0 release.

Lucas

louislaf
Champ in-the-making
Champ in-the-making
The project and source code can be found in the  subversion repo. For a quick peek, have a look at http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/webscript-framework and you should find the dependencies.

For more information on the subversion repo, see  http://wiki.alfresco.com/wiki/Alfresco_SVN_Development_Environment

louislaf
Champ in-the-making
Champ in-the-making
One more thing….when all the required projects on the build path, e.g. 3rd Party, Core, Repository, Web-client, Webscript-framework, you will still see an error in the AbstractRepositoryWebScript.java file regarding the import statement: org.alfresco.repo.web.scripts.Repository. This is incorrect and should be changed to org.alfresco.repo.model. Note, you will still see error messages related to dependencies for the projects you imported. However, these too can be found in the SVN.
Getting started

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.