gpt4 book ai didi

java - 用于 alfresco 4.2c 的远程 Alfresco Web 服务

转载 作者:行者123 更新时间:2023-12-01 09:04:34 25 4
gpt4 key购买 nike

我正在尝试访问放置在 alfresco 4.2c 文件夹中的文件。我使用以下代码来访问远程露天​​。我正在使用 Netbeans 和 GlassFish Server 4.1.1。我是否缺少一些 jar 文件或在配置/代码中出现任何错误。

代码: 封装JavaPackage;

import org.alfresco.webservice.util.AuthenticationUtils;
import org.alfresco.webservice.util.WebServiceFactory;
import java.io.IOException;
import java.io.InputStream;
import static java.lang.System.out;
import java.util.Arrays;
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.alfresco.webservice.authentication.AuthenticationFault;

import org.alfresco.webservice.content.Content;
import org.alfresco.webservice.content.ContentServiceSoapBindingStub;
import org.alfresco.webservice.repository.UpdateResult;
import org.alfresco.webservice.types.CML;
import org.alfresco.webservice.types.CMLCreate;
import org.alfresco.webservice.types.ContentFormat;
import org.alfresco.webservice.types.NamedValue;
import org.alfresco.webservice.types.ParentReference;
import org.alfresco.webservice.types.Predicate;
import org.alfresco.webservice.types.Reference;
import org.alfresco.webservice.types.Store;
import org.alfresco.webservice.util.AuthenticationUtils;
import org.alfresco.webservice.util.Constants;
import org.alfresco.webservice.util.ContentUtils;
import org.alfresco.webservice.util.Utils;
import org.alfresco.webservice.util.WebServiceFactory;
/**
*
* @author Mamoona-PC
*/
public class BackClass {
/** Admin user name and password used to connect to the repository */
protected static final String USERNAME = "admin";
protected static final String PASSWORD = "admin";

/** The store used throughout the samples */
protected static final Store STORE = new Store(Constants.WORKSPACE_STORE, "SpacesStore");

protected static final Reference SAMPLE_FOLDER = new Reference(STORE, null, "/app:company_home/cm:News");

public static void main(String args[]) throws Exception
{
WebServiceFactory.setEndpointAddress("http://192.168.10.18/alfresco/api");
AuthenticationUtils.startSession(USERNAME, PASSWORD);
try
{
// Check to see if the sample folder has already been created or not
WebServiceFactory.getRepositoryService().get(new Predicate(new Reference[]{SAMPLE_FOLDER}, STORE, null));
ParentReference parentRef = new ParentReference();
parentRef.setStore(STORE);
parentRef.setUuid(SAMPLE_FOLDER.getUuid());
parentRef.setPath(SAMPLE_FOLDER.getPath());
parentRef.setAssociationType(Constants.ASSOC_CONTAINS);
parentRef.setChildName(Constants.ASSOC_CONTAINS);

NamedValue[] properties2 = new NamedValue[]{Utils.createNamedValue(Constants.PROP_NAME, "empty.txt")};
CMLCreate create2 = new CMLCreate();
create2.setParent(parentRef);
create2.setProperty(properties2);
create2.setType(Constants.TYPE_CONTENT);

CML cml2 = new CML();
cml2.setCreate(new CMLCreate[] {create2});

UpdateResult[] result = WebServiceFactory.getRepositoryService().update(cml2);

Reference contentNode = result[0].getDestination();
ContentFormat format = new ContentFormat(Constants.MIMETYPE_TEXT_PLAIN, "UTF-8");
byte[] content = "This is some test content provided by the Alfresco development team!".getBytes();
Content content1 = WebServiceFactory.getContentService().write(contentNode,
Constants.PROP_CONTENT, content, format);

}
catch (Exception e){
e.printStackTrace();
e.getMessage();
}
}
}

图书馆:

enter image description here

错误:

run:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.apache.axis.ConfigurationException: java.lang.ClassNotFoundException: org.apache.ws.axis.security.WSDoAllSender
java.lang.ClassNotFoundException: org.apache.ws.axis.security.WSDoAllSender
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:187)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:100)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getJavaClass(WSDDDeployableItem.java:353)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.makeNewInstance(WSDDDeployableItem.java:295)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDChain.makeNewInstance(WSDDChain.java:125)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDDeployment.getGlobalRequest(WSDDDeployment.java:473)
at org.apache.axis.configuration.FileProvider.getGlobalRequest(FileProvider.java:269)
at org.apache.axis.AxisEngine.getGlobalRequest(AxisEngine.java:365)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:126)
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.repository.RepositoryServiceSoapBindingStub.get(RepositoryServiceSoapBindingStub.java:1078)
at JavaPackage.BackClass.main(BackClass.java:60)

org.apache.axis.ConfigurationException: java.lang.ClassNotFoundException: org.apache.ws.axis.security.WSDoAllSender
java.lang.ClassNotFoundException: org.apache.ws.axis.security.WSDoAllSender
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:187)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:100)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getJavaClass(WSDDDeployableItem.java:353)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.makeNewInstance(WSDDDeployableItem.java:295)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDChain.makeNewInstance(WSDDChain.java:125)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDDeployment.getGlobalRequest(WSDDDeployment.java:473)
at org.apache.axis.configuration.FileProvider.getGlobalRequest(FileProvider.java:269)
at org.apache.axis.AxisEngine.getGlobalRequest(AxisEngine.java:365)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:126)
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.repository.RepositoryServiceSoapBindingStub.get(RepositoryServiceSoapBindingStub.java:1078)
at JavaPackage.BackClass.main(BackClass.java:60)

at org.apache.axis.deployment.wsdd.WSDDDeployableItem.makeNewInstance(WSDDDeployableItem.java:297)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDChain.makeNewInstance(WSDDChain.java:125)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDDeployment.getGlobalRequest(WSDDDeployment.java:473)
at org.apache.axis.configuration.FileProvider.getGlobalRequest(FileProvider.java:269)
at org.apache.axis.AxisEngine.getGlobalRequest(AxisEngine.java:365)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:126)
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.repository.RepositoryServiceSoapBindingStub.get(RepositoryServiceSoapBindingStub.java:1078)
at JavaPackage.BackClass.main(BackClass.java:60)

faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:org.apache.axis.ConfigurationException: java.lang.ClassNotFoundException: org.apache.ws.axis.security.WSDoAllSender
java.lang.ClassNotFoundException: org.apache.ws.axis.security.WSDoAllSender
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:187)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:100)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getJavaClass(WSDDDeployableItem.java:353)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.makeNewInstance(WSDDDeployableItem.java:295)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDChain.makeNewInstance(WSDDChain.java:125)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDDeployment.getGlobalRequest(WSDDDeployment.java:473)
at org.apache.axis.configuration.FileProvider.getGlobalRequest(FileProvider.java:269)
at org.apache.axis.AxisEngine.getGlobalRequest(AxisEngine.java:365)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:126)
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.repository.RepositoryServiceSoapBindingStub.get(RepositoryServiceSoapBindingStub.java:1078)
at JavaPackage.BackClass.main(BackClass.java:60)

org.apache.axis.ConfigurationException: java.lang.ClassNotFoundException: org.apache.ws.axis.security.WSDoAllSender
java.lang.ClassNotFoundException: org.apache.ws.axis.security.WSDoAllSender
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:187)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:100)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getJavaClass(WSDDDeployableItem.java:353)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.makeNewInstance(WSDDDeployableItem.java:295)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDChain.makeNewInstance(WSDDChain.java:125)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDDeployment.getGlobalRequest(WSDDDeployment.java:473)
at org.apache.axis.configuration.FileProvider.getGlobalRequest(FileProvider.java:269)
at org.apache.axis.AxisEngine.getGlobalRequest(AxisEngine.java:365)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:126)
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.repository.RepositoryServiceSoapBindingStub.get(RepositoryServiceSoapBindingStub.java:1078)
at JavaPackage.BackClass.main(BackClass.java:60)

at org.apache.axis.deployment.wsdd.WSDDDeployableItem.makeNewInstance(WSDDDeployableItem.java:297)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDChain.makeNewInstance(WSDDChain.java:125)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDDeployment.getGlobalRequest(WSDDDeployment.java:473)
at org.apache.axis.configuration.FileProvider.getGlobalRequest(FileProvider.java:269)
at org.apache.axis.AxisEngine.getGlobalRequest(AxisEngine.java:365)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:126)
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.repository.RepositoryServiceSoapBindingStub.get(RepositoryServiceSoapBindingStub.java:1078)
at JavaPackage.BackClass.main(BackClass.java:60)

at org.apache.axis.deployment.wsdd.WSDDDeployableItem.makeNewInstance(WSDDDeployableItem.java:297)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDChain.makeNewInstance(WSDDChain.java:125)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDDeployment.getGlobalRequest(WSDDDeployment.java:473)
at org.apache.axis.configuration.FileProvider.getGlobalRequest(FileProvider.java:269)
at org.apache.axis.AxisEngine.getGlobalRequest(AxisEngine.java:365)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:126)
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.repository.RepositoryServiceSoapBindingStub.get(RepositoryServiceSoapBindingStub.java:1078)
at JavaPackage.BackClass.main(BackClass.java:60)

{http://xml.apache.org/axis/}hostname:Mamoona-PC-PC

org.apache.axis.ConfigurationException: java.lang.ClassNotFoundException: org.apache.ws.axis.security.WSDoAllSender
java.lang.ClassNotFoundException: org.apache.ws.axis.security.WSDoAllSender
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:187)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:100)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getJavaClass(WSDDDeployableItem.java:353)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.makeNewInstance(WSDDDeployableItem.java:295)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDChain.makeNewInstance(WSDDChain.java:125)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDDeployment.getGlobalRequest(WSDDDeployment.java:473)
at org.apache.axis.configuration.FileProvider.getGlobalRequest(FileProvider.java:269)
at org.apache.axis.AxisEngine.getGlobalRequest(AxisEngine.java:365)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:126)
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.repository.RepositoryServiceSoapBindingStub.get(RepositoryServiceSoapBindingStub.java:1078)
at JavaPackage.BackClass.main(BackClass.java:60)

org.apache.axis.ConfigurationException: java.lang.ClassNotFoundException: org.apache.ws.axis.security.WSDoAllSender
java.lang.ClassNotFoundException: org.apache.ws.axis.security.WSDoAllSender
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:187)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:100)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getJavaClass(WSDDDeployableItem.java:353)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.makeNewInstance(WSDDDeployableItem.java:295)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDChain.makeNewInstance(WSDDChain.java:125)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDDeployment.getGlobalRequest(WSDDDeployment.java:473)
at org.apache.axis.configuration.FileProvider.getGlobalRequest(FileProvider.java:269)
at org.apache.axis.AxisEngine.getGlobalRequest(AxisEngine.java:365)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:126)
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.repository.RepositoryServiceSoapBindingStub.get(RepositoryServiceSoapBindingStub.java:1078)
at JavaPackage.BackClass.main(BackClass.java:60)

at org.apache.axis.deployment.wsdd.WSDDDeployableItem.makeNewInstance(WSDDDeployableItem.java:297)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDChain.makeNewInstance(WSDDChain.java:125)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDDeployment.getGlobalRequest(WSDDDeployment.java:473)
at org.apache.axis.configuration.FileProvider.getGlobalRequest(FileProvider.java:269)
at org.apache.axis.AxisEngine.getGlobalRequest(AxisEngine.java:365)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:126)
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.repository.RepositoryServiceSoapBindingStub.get(RepositoryServiceSoapBindingStub.java:1078)
at JavaPackage.BackClass.main(BackClass.java:60)

at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:216)
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.repository.RepositoryServiceSoapBindingStub.get(RepositoryServiceSoapBindingStub.java:1078)
at JavaPackage.BackClass.main(BackClass.java:60)
Caused by: org.apache.axis.ConfigurationException: java.lang.ClassNotFoundException: org.apache.ws.axis.security.WSDoAllSender
java.lang.ClassNotFoundException: org.apache.ws.axis.security.WSDoAllSender
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:187)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:100)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getJavaClass(WSDDDeployableItem.java:353)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.makeNewInstance(WSDDDeployableItem.java:295)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDChain.makeNewInstance(WSDDChain.java:125)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDDeployment.getGlobalRequest(WSDDDeployment.java:473)
at org.apache.axis.configuration.FileProvider.getGlobalRequest(FileProvider.java:269)
at org.apache.axis.AxisEngine.getGlobalRequest(AxisEngine.java:365)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:126)
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.repository.RepositoryServiceSoapBindingStub.get(RepositoryServiceSoapBindingStub.java:1078)
at JavaPackage.BackClass.main(BackClass.java:60)

org.apache.axis.ConfigurationException: java.lang.ClassNotFoundException: org.apache.ws.axis.security.WSDoAllSender
java.lang.ClassNotFoundException: org.apache.ws.axis.security.WSDoAllSender
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:187)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:100)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getJavaClass(WSDDDeployableItem.java:353)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.makeNewInstance(WSDDDeployableItem.java:295)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDChain.makeNewInstance(WSDDChain.java:125)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDDeployment.getGlobalRequest(WSDDDeployment.java:473)
at org.apache.axis.configuration.FileProvider.getGlobalRequest(FileProvider.java:269)
at org.apache.axis.AxisEngine.getGlobalRequest(AxisEngine.java:365)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:126)
... 7 more
BUILD SUCCESSFUL (total time: 1 second)

最佳答案

您的 Axis JAR、WSS4J JAR 和 WSDL4J JAR 之间可能存在某种版本冲突。仔细检查这些 JAR 的文档,以确保您选择的版本能够相互兼容。

话虽如此,我同意@Gagravarr 的观点,即应避免使用 Alfresco 原生 Web 服务 API。它最终被弃用,并在您使用的版本发布后不久被删除。

在 Alfresco 中处理内容的一种更简单的方法是通过 CMIS。 This page显示通过对象 ID 或路径抓取对象的示例。和this page谈论如何使用内容流。

关于java - 用于 alfresco 4.2c 的远程 Alfresco Web 服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41393673/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com