Java Liferay-无法将文档库项目附加到远程门户中的日志文章

Java Liferay-无法将文档库项目附加到远程门户中的日志文章,java,liferay,Java,Liferay,我一直在尝试在远程门户中创建本地日志文章的副本。但即使我在文章的content部分提供了正确的URL,它也不会出现在门户中。我已经在这个问题上纠缠了好几天了 我创建的文章如下 JournalArticleSoap journalArticleSoap = journalSoap.addArticle( remoteGroupId, article.getFolderId(), article.getClassNameId(), article.getClassPK

我一直在尝试在远程门户中创建本地日志文章的副本。但即使我在文章的
content
部分提供了正确的URL,它也不会出现在门户中。我已经在这个问题上纠缠了好几天了

我创建的文章如下

JournalArticleSoap journalArticleSoap = journalSoap.addArticle(
    remoteGroupId,
    article.getFolderId(),
    article.getClassNameId(),
    article.getClassPK(),
    "",
    true,
    LocalizationUtil.getAvailableLanguageIds(article.getTitle()),
    titleMapValues.toArray(new String[titleMapValues.size()]),
    LocalizationUtil.getAvailableLanguageIds(article.getDescription()),
    descriptionMapValues.toArray(new String[descriptionMapValues.size()]),
    content,
    article.getType(),
    article.getStructureId(),
    newRemoteTemplate.getTemplateKey(),
    article.getLayoutUuid(),
    displayDate.get(Calendar.MONTH),
    displayDate.get(Calendar.DAY_OF_MONTH),
    displayDate.get(Calendar.YEAR),
    displayDate.get(Calendar.HOUR),
    displayDate.get(Calendar.MINUTE),
    0, 0, 0, 0, 0, //expirationDate
    article.getExpirationDate() == null,
    0, 0, 0, 0, 0,
    true,
    article.isIndexable(),
    article.getUrlTitle(),
    serviceContext);
<?xml version="1.0"?>

<root available-locales="en_US" default-locale="en_US">
    <dynamic-element name="Text2001" type="text" index-type="keyword" index="0">
        <dynamic-content language-id="en_US"><![CDATA[Desert image]]></dynamic-content>
    </dynamic-element>
    <dynamic-element name="Documents_and_Media2051" type="document_library" index-type="keyword" index="0">
        <dynamic-content language-id="en_US"><![CDATA[/documents/20101/20201/Photo1]]></dynamic-content>
    </dynamic-element>
</root>
其中,
journalSoap
是远程门户的JournalArticleServiceSoap,
article
是本地JournalArticle

内容如下

JournalArticleSoap journalArticleSoap = journalSoap.addArticle(
    remoteGroupId,
    article.getFolderId(),
    article.getClassNameId(),
    article.getClassPK(),
    "",
    true,
    LocalizationUtil.getAvailableLanguageIds(article.getTitle()),
    titleMapValues.toArray(new String[titleMapValues.size()]),
    LocalizationUtil.getAvailableLanguageIds(article.getDescription()),
    descriptionMapValues.toArray(new String[descriptionMapValues.size()]),
    content,
    article.getType(),
    article.getStructureId(),
    newRemoteTemplate.getTemplateKey(),
    article.getLayoutUuid(),
    displayDate.get(Calendar.MONTH),
    displayDate.get(Calendar.DAY_OF_MONTH),
    displayDate.get(Calendar.YEAR),
    displayDate.get(Calendar.HOUR),
    displayDate.get(Calendar.MINUTE),
    0, 0, 0, 0, 0, //expirationDate
    article.getExpirationDate() == null,
    0, 0, 0, 0, 0,
    true,
    article.isIndexable(),
    article.getUrlTitle(),
    serviceContext);
<?xml version="1.0"?>

<root available-locales="en_US" default-locale="en_US">
    <dynamic-element name="Text2001" type="text" index-type="keyword" index="0">
        <dynamic-content language-id="en_US"><![CDATA[Desert image]]></dynamic-content>
    </dynamic-element>
    <dynamic-element name="Documents_and_Media2051" type="document_library" index-type="keyword" index="0">
        <dynamic-content language-id="en_US"><![CDATA[/documents/20101/20201/Photo1]]></dynamic-content>
    </dynamic-element>
</root>

在上述url(
/documents/20101/20201/Photo1
)中,20101是远程门户的全局组ID,20201是创建Photo1的远程文档库中文件夹的ID。当我转到
http://host:port/documents/20101/20201/Photo1
,我下载了文件。但是,远程门户中的文章如下所示


如您所见,我在远程文章中获得了文本动态元素“沙漠图像”。但是我没有将动态元素从文档库中获取到远程文章中。任何人都可以让我知道我在这里做错了什么。

只要从前端创建一篇结构化(只包含D&M uploader字段)文章,并检查数据库中的XML,你就会发现到底哪里出了问题

问题是我正在从url中删除uuid和创建时间戳

当我将
/documents/20101/20201/Photo1
替换为
/documents/20101/20201/Photo1/uuid?t=timestamp
时,它开始工作。这里uuid是uuid,timestamp是文件Photo1的创建时间(长类型)