Domanda

i query this url http://your.host:8080/share/proxy/alfresco/collaboration/tagQuery on browser,this result

  {
   "countMin": 1,
   "countMax": 1,
   "tags": 
   [
      { "name": "folder", "count": 1 }
   ]
}

but i'm use same url in javascript it not show ,who have anyway for query Tag in Alfresco?

and this message ::

Web Script Status 404 - Not Found

The Web Script /alfresco/s/collabQuery/tag has responded with a status of 404 - Not Found.

404 Description:     Requested resource is not available.

Message:    11040003 Script url /collabQuery/tag does not map to a Web Script.

Exception:  org.springframework.extensions.webscripts.WebScriptException - 11040003 Script url /collabQuery/tag does not map to a Web Script.

org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:173)
org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:861)
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1584)
java.lang.Thread.run(Thread.java:662)

this my code in Test.get.js

function main()
{
    var theUrl = "proxy/alfresco/collaboration/tagQuery";
    var data = remote.call(theUrl);

    var result = String(data);
    model.result = result; 

}
main();
È stato utile?

Soluzione

As noted by @Gagravarr you are using the wrong URL. To access that URL in a Share web script you would need to change line 3 in your Test.get.js to var theUrl = "/collaboration/tagQuery". The proxy/alfresco part is only needed when calling the URL from the web browser.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top