AnsweredAssumed Answered

How to call the external web service in alfresco community 5.2

Question asked by anandhan on Sep 27, 2017
Latest reply on Nov 27, 2017 by krutik.jayswal



I am trying to connect the external web service from my alfresco site to fetch the data and update that data in the ftl file. While connecting the external web service I am getting error like "Communication Failed". Please check the below code, If I made any mistake in this.


Steps followed:


Step 1: create the site-profile.get.html.ftl in below path "alfresco-home\tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\dashlets".  In this file I have referred the js file "site-profile.js"


<@script type="text/javascript" src="${url.context}/res/components/dashlets/site-profile.js" group="dashlets"/>


Step 2 : created the site-profile.js in below path "alfresco-home\tomcat\webapps\share\components\dashlets"



function updateList(){
   url: "",
   method: Alfresco.util.Ajax.GET,
   headers: ('Access-Control-Allow-Origin: *'),
   headers: ('Access-Control-Request-Headers: *'),
   headers: ('Access-Control-Allow-Methods: *'),
   requestContentType: Alfresco.util.Ajax.JSON,
         fn: function(res){
            fn: function(res){


function appendOptiOnvalues(result)