我试图登录部署在 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 athttp://localhost:8080/alfresco/soapapi
关于java - 使用简单的 Java 类连接(登录)到 Alfresco,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22452796/