java - 使用简单的 Java 类连接(登录)到 Alfresco

标签 java eclipse tomcat alfresco

我试图登录部署在 localhost:80/alfresco 的 alfresco

这是我到目前为止所做的:

 public static void main(String[] args) throws Exception {

    WebServiceFactory.setEndpointAddress("http://localhost:80/alfresco/api/");

    // Start the session
    AuthenticationUtils.startSession(USERNAME, PASSWORD);

    try {

        //Work to do if the login works :S

    } finally {
      // End the session
      AuthenticationUtils.endSession();
    }
  }

这是我上课时得到的:

WARNING: Unable to find required classes (javax.activation.DataHandler and   javax.mail.internet.MimeMultipart). Attachment support is disabled.
Exception in thread "main" org.alfresco.webservice.util.WebServiceException: Error starting session.
at org.alfresco.webservice.util.AuthenticationUtils.startSession(AuthenticationUtils.java:94)
at com.delta.logic.connect.Query1.main(Query1.java:53)
Caused by: (404)Introuvable
   at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
   at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
   at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
   at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
   at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
   at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
   at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
   at org.apache.axis.client.Call.invoke(Call.java:2767)
   at org.apache.axis.client.Call.invoke(Call.java:2443)
   at org.apache.axis.client.Call.invoke(Call.java:2366)
   at org.apache.axis.client.Call.invoke(Call.java:1812)
   at org.alfresco.webservice.authentication.AuthenticationServiceSoapBindingStub.startSession(AuthenticationServiceSoapBindingStub.java:187)
   at org.alfresco.webservice.util.AuthenticationUtils.startSession(AuthenticationUtils.java:79)
... 1 more

我真的卡在这里了,救命!

最佳答案

来自 Alfresco Content Management Web Services

Please also note that the endpoint for soap web services was moved for alfresco 4.2.d. To make way for the public api now instead of being http://localhost:8080/alfresco/api the soap services resides at http://localhost:8080/alfresco/soapapi

关于java - 使用简单的 Java 类连接(登录)到 Alfresco,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22452796/

相关文章:

eclipse - 我可以与其他人同时在同一个项目上使用 Java 进行编程吗?

java - 在 Eclipse Amazon lambda 函数中作为 junit 运行时出现 JsonMappingException

spring - junit 每行执行两次

tomcat - Nginx + Tomcat 虚拟主机

java - 导出的Jar文件未执行

java - 更改一个对象中的值会更改另一个对象中的值

java - 阻止 Eclipse 在其他视角中打开选项卡

java - 如何在 JAVA FX 2.2 中重新绘制窗口(舞台)

java - 从 Java 调用扫描仪 Win32 DLL

spring - 带有 Spring 表单的 Tomcat 404 页面