我有一个在 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]
一个 URL 是我的 SSO URL,我运行 alfresco 的机器的实际 URL 是不同的。