【问题标题】:Error while connecting to Alfresco repository using opencmis and SSO使用 opencmis 和 SSO 连接到 Alfresco 存储库时出错
【发布时间】:2014-04-24 11:22:52
【问题描述】:

我有一个在 xx.xx.xx.101 上运行的 Alfresco 服务器,我正在将我的 Java 工作区连接到它,我的工作区和 alfresco 已使用 SSO 连接。因此,每当我单击 jsp 页面中的任何链接时,如果不进行身份验证,我都会重定向到 Alfresco 共享页面。

这是我登录 Alfresco 存储库的代码

SessionFactory sessionFactory = SessionFactoryImpl.newInstance();
        Map<String, String> params = new HashMap<String, String>();
        params.put(SessionParameter.USER, userName);
        params.put(SessionParameter.PASSWORD, password);
        params.put(SessionParameter.ATOMPUB_URL,
 "http://10.139.1.217:81/alfresco/service/cmis");
        params.put(SessionParameter.BINDING_TYPE,
 BindingType.ATOMPUB.value());
        params.put(SessionParameter.OBJECT_FACTORY_CLASS,
 DMS_CONST.KBRREPOSITORYFACTORYIMPL);
        List<Repository> repos = sessionFactory.getRepositories(params);
        return repos.get(0).createSession();

对于用户名,我通过 ROLE_TICKET,对于密码,我通过从 Alfresco Share 检索到的 ticket_value。

问题是每当我执行这段代码时,我都会得到一个

com.ctc.wstx.exc.WstxParsingException:在 DOCTYPE 声明中;需要一个系统标识符。 在 [row,col {unknown-source}]:[1,62]

http://10.139.1.217:8

一个 URL 是我的 SSO URL ,我运行 alfresco 的机器的实际 URL 是不同的。

【问题讨论】:

  • 在你说你的服务器在.101上的问题中,但在你给.217的代码中-可能是这样吗?

标签: java web-services rest alfresco opencmis


【解决方案1】:

您应该改用以下网址 -

parameters.put(SessionParameter.ATOMPUB_URL, "http://localhost:8080/alfresco/cmisatom");

【讨论】:

    猜你喜欢
    • 2013-03-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多