0
문서 라이브러리에 새로운 작업을 추가했습니다. 내 Java 클래스는 확장Alfresco 5.0 커뮤니티 양식 프로세서가이 방법을 지원하지 않습니다. GET
ActionExecuterAbstractBase
입니다. 코드 내부에서 나는 HttpsURLConnection에을하고이 같은 응답을 읽어
자바 스크립트가 완벽하게 작동 프레스코 외부URL url = new URL("https://...................................Get?username="+Name+"&password="+Password);
HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
if (conn.getResponseCode() != 200) {
throw new RuntimeException("Failed : HTTP error code : "
+ conn.getResponseCode());
}
BufferedReader br = new BufferedReader(new InputStreamReader(
(conn.getInputStream())));
하지만 다음과 같은 오류가 발생합니다 내부 :
Web Script Status 405 - Method Not Allowed
The Web Script /alfresco/s/api/action/cosign/formprocessor 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: 08060002 Script url /api/action/cosign/formprocessor does not support the method GET
Exception: org.springframework.extensions.webscripts.WebScriptException - 08060002 Script url /api/action/cosign/formprocessor does not support the method GET
org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:179)
org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
java.lang.Thread.run(Thread.java:745)
Server: Community v5.0.0 (d r99759-b2) schema 8.022
Time: 6 Σεπ 2016 11:25:36 πμ
나는이 문제를 어떻게 해결할 수 있습니까?
'GET'대신 'POST'를 보내시겠습니까? – Gagravarr
"conn.setRequestMethod ("POST ");"를 추가하면 " java throws org.json.JSONException : JSONObject [ "Data"]을 (를) 찾을 수 없습니다. –
게시물 요청은 일반적으로 일부 데이터를 포함하며 폼 프로세서가 일부 양식을 제공 할 것으로 예상하는 것처럼 보입니다. Alfresco 소스 트리에서 이와 유사한 여러 가지 작업 중 하나를 살펴보고 어떻게 작동하는지 보려면 어떻게됩니까? – Gagravarr