AnsweredAssumed Answered

how to test POST webscript?

Question asked by targa2000 on Mar 13, 2010
Latest reply on Dec 7, 2016 by kpatel
I can test a GET webscript with : http://localhost:8080/alfresco/service/somegetwebscript

how can test a POST webscript?

I tried

http://localhost:8080/alfresco/service/somepostwebscript

but get

Web Script Status 405 - Method Not Allowed

The Web Script /alfresco/service/somepostwebscript has responded with a status of 405 - Method Not Allowed.

405 Description:   The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.

Message:   02130004 Script url /somepostwebscript does not support the method GET
   
Exception:   org.alfresco.web.scripts.WebScriptException - 02130004 Script url /somepostwebscript does not support the method GET
   
   org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:152)
   org.alfresco.web.scripts.servlet.WebScriptServlet.service(WebScriptServlet.java:122)
   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.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
   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:286)
   org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
   org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
   org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
   java.lang.Thread.run(Thread.java:619)

Outcomes