cancel
Showing results for 
Search instead for 
Did you mean: 

Java Backed Web Scripts

amineelhaddaj
Champ in-the-making
Champ in-the-making
Hello everyone !
I'm having trouble trying to run a web script.
It's the RenditionWebScript.java available at <a>https://wiki.alfresco.com/wiki/Java-backed_Web_Scripts_Samples</a>
I'm working with Alfresco 4.2 and I installed the All-In-One Maven archetype for my project called javadir (according to another Alfresco Web Script tutorial).
I did my custom model in \javadir\amp\src\main\amp\config\alfresco\extension\model\customModel.xml as follows :

<?xml version="1.0" encoding="UTF-8"?>

<!– Custom Model –>

<!– Note: This model is pre-configured to load at startup of the Repository.
   So, all custom –>
<!– types and aspects added here will automatically be registered –>

<model name="custom:customModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

   <!– Optional meta-data about the model –>
   <description>Custom Model</description>
   <author></author>
   <version>1.0</version>

   <imports>
      <!– Import Alfresco Dictionary Definitions –>
      <import uri="http://www.alfresco.org/model/dictionary/1.0"
         prefix="d" />
      <!– Import Alfresco Content Domain Model Definitions –>
      <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
   </imports>

   <!– Introduction of new namespaces defined by this model –>
   <!– NOTE: The following namespace custom.model should be changed to reflect
      your own namespace –>
   <namespaces>
      <namespace uri="custom.model" prefix="custom" />
   </namespaces>

   <types>
      <type name="demo:rendition"/>
   </types>

   <aspects>
      <aspect name="demo:renditionable"/>
   </aspects>

</model>


I also installed SWF Tools, put the java code in \javadir\amp\src\main\java\com\alfresco\tutorials\RenditionWebScript.java, declared my Web Script in a file imported through module-context.xml and described the Web Script in an appropriate .

The problem is that when I run Alfresco, the Script doesn't show up in http://localhost:8080/alfresco/s/index

Does one of you has had this problem ? Or ran the RendistionWebScript ?

Thank you in advance !
1 REPLY 1

jpotts
World-Class Innovator
World-Class Innovator