Alfresco repository javascript webscript

162 views
Skip to first unread message

Patrícia Sousa

unread,
Nov 5, 2015, 1:15:46 PM11/5/15
to Alfresco Technical Discussion
I'm trying to make an webscript javascript in the repository to access on the share. Basically, I want to encode a file in base64 in the repo and in the share, get this file. 
I try to make javascript webscript and put them on the multiple folders that tutorials say me but I don't know what folder is correct... Anyone can help me?

And to call webscript in the share I have to make this :
 <import resource="classpath:alfresco/WEB-INF/scripts/demoamp.js">
?

If anyone can help me please say me hints.

Jeff Potts

unread,
Nov 5, 2015, 1:39:21 PM11/5/15
to alfresco-techn...@googlegroups.com
It describes where to put your web scripts in your AMP project structure.

Jeff

--
You received this message because you are subscribed to the Google Groups "Alfresco Technical Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alfresco-technical-d...@googlegroups.com.
To post to this group, send email to alfresco-techn...@googlegroups.com.
Visit this group at http://groups.google.com/group/alfresco-technical-discussion.
For more options, visit https://groups.google.com/d/optout.

Patrícia Sousa

unread,
Nov 5, 2015, 2:49:00 PM11/5/15
to Alfresco Technical Discussion
But I can make only one javascript and call it on share? I can't understand this. For example, I want to make an encode of files after GET this files on the share. So, I want to create a webscript that makes an encode. It is possible I call this javascript webscript on share to make this ? Or I need more things (FTL, XML)?

How can I call on share the javascript file ? And it is right call only the javascript file?


quinta-feira, 5 de Novembro de 2015 às 18:39:21 UTC, Jeff Potts escreveu:
It describes where to put your web scripts in your AMP project structure.

Jeff
On Thu, Nov 5, 2015 at 12:15 PM, Patrícia Sousa <patrici...@gmail.com> wrote:
I'm trying to make an webscript javascript in the repository to access on the share. Basically, I want to encode a file in base64 in the repo and in the share, get this file. 
I try to make javascript webscript and put them on the multiple folders that tutorials say me but I don't know what folder is correct... Anyone can help me?

And to call webscript in the share I have to make this :
 <import resource="classpath:alfresco/WEB-INF/scripts/demoamp.js">
?

If anyone can help me please say me hints.

--
You received this message because you are subscribed to the Google Groups "Alfresco Technical Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alfresco-technical-discussion+unsub...@googlegroups.com.

Patrícia Sousa

unread,
Nov 5, 2015, 3:20:41 PM11/5/15
to Alfresco Technical Discussion
PS: I make what the tutorial said for the amp but when I try to access the webscript with localhost:8080/alfresco/service/sample/helloworld (for example) I cannot access. With error: 
he Web Script 
/alfresco/service/sample/helloworld has responded with a status of 404 - Not Found.


404 Description: Requested resource is not available.
 
Message: 10050002 Script url /sample/helloworld does not map to a Web Script.
 
Exception: org.springframework.extensions.webscripts.WebScriptException - 10050002 Script url /sample/helloworld does not map to a Web Script.




I put on the folder that tutorial said :( 

Piergiorgio Lucidi

unread,
Nov 5, 2015, 3:50:31 PM11/5/15
to Alfresco Technical Discussion
Probably it could be an error in the descriptor XML file of your Web Scripts, could you please share it with us?

Patrícia Sousa

unread,
Nov 5, 2015, 3:51:08 PM11/5/15
to alfresco-techn...@googlegroups.com
<webscript>
<shortname>Hello World Sample Webscript</shortname>
<description>Hands back a greeting</description>
<url>/sample/helloworld</url>
<authentication>user</authentication>
<format default="html"></format>
</webscript>

To unsubscribe from this group and stop receiving emails from it, send an email to alfresco-technical-d...@googlegroups.com.

To post to this group, send email to alfresco-techn...@googlegroups.com.
Visit this group at http://groups.google.com/group/alfresco-technical-discussion.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Alfresco Technical Discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/alfresco-technical-discussion/3GF6iZNOTO0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to alfresco-technical-d...@googlegroups.com.

Patrícia Sousa

unread,
Nov 5, 2015, 4:17:46 PM11/5/15
to Alfresco Technical Discussion
I saw that on compile
 maven package install

that gives a warning:

Failed to Refresh Web Scripts for Alfresco Repository. Response status: 401, message: Unauthorized


What is wrong with my code ?
To unsubscribe from this group and stop receiving emails from it, send an email to alfresco-technical-discussion+unsub...@googlegroups.com.

To post to this group, send email to alfresco-techn...@googlegroups.com.
Visit this group at http://groups.google.com/group/alfresco-technical-discussion.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Alfresco Technical Discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/alfresco-technical-discussion/3GF6iZNOTO0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to alfresco-technical-discussion+unsub...@googlegroups.com.
To post to this group, send email to alfresco-technical-discussion@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages