Java org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException:意外文档!收到:Atom条目

Java org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException:意外文档!收到:Atom条目,java,apache-camel,sharepoint-2013,cmis,apache-chemistry,Java,Apache Camel,Sharepoint 2013,Cmis,Apache Chemistry,我正在尝试创建连接到Sharepoint 2013的客户端应用程序 我收到这种异常,似乎我使用的库(化学cmis库)无法解析响应 下面是我的代码: public Session fillParams() {//define some values for the connection string Map<String, String> parameter = new HashMap<String, String>(); // Set the user

我正在尝试创建连接到Sharepoint 2013的客户端应用程序

我收到这种异常,似乎我使用的库(化学cmis库)无法解析响应

下面是我的代码:

public Session fillParams() {//define some values for the connection string

    Map<String, String> parameter = new HashMap<String, String>();

    // Set the user credentials
    parameter.put(SessionParameter.USER, "**");
    parameter.put(SessionParameter.PASSWORD, "**");

    // Specify the connection settings
    parameter.put(SessionParameter.ATOMPUB_URL, "http://bbdurl.bbd.cloudappsportal.com/sites/_api/web");
    parameter.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());

    // Set the alfresco object factory
    parameter.put(SessionParameter.OBJECT_FACTORY_CLASS, "org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl");

    // Create a session
    SessionFactory factory = SessionFactoryImpl.newInstance();
    List<Repository> repositories = new ArrayList<Repository>();
    repositories = factory.getRepositories(parameter);
    Repository repository = repositories.get(0);

    Session session = factory.createSession(parameter);
    return session;
}

这不是CMIS URL。确保已在SharePoint 2013上激活CMIS生产者(默认情况下已关闭),然后尝试以下URL模式:http:///_vti_bin/cmis/rest?getRepositories

你好,Florian,我试图查看我使用,它是一个提供免费sharepoint 2013服务器的网站,但遗憾的是,在创建的sharepoint 2013上没有可启用的CMIS producer选项。有一个链接“”说明如何激活CMIS制作人,但我有一个限制,因为它只是托管的。你有没有其他办法让我激活CMIS?嗨,Florian,我能够按照你所说的关于CMIS制作人激活的说明进行操作,现在我收到了CMIS UnauthorizedException:Unauthorized exception类似于下面的链接。(请帮忙。)
Exception in thread "main" org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException: Unexpected document! Received: Atom Entry
    at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.parse(AbstractAtomPubService.java:602)
    at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getRepositoriesInternal(AbstractAtomPubService.java:783)
    at org.apache.chemistry.opencmis.client.bindings.spi.atompub.RepositoryServiceImpl.getRepositoryInfos(RepositoryServiceImpl.java:65)
    at org.apache.chemistry.opencmis.client.bindings.impl.RepositoryServiceImpl.getRepositoryInfos(RepositoryServiceImpl.java:88)
    at org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.getRepositories(SessionFactoryImpl.java:133)
    at org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.getRepositories(SessionFactoryImpl.java:111)
    at sample.CMISConnect.fillParams(CMISConnect.java:59)
    at sample.CMISConnect.main(CMISConnect.java:70)