除了安装了 Tridion CMS 之外,无法在任何其他机器上找到使用核心服务创建的项目 [英] Unable to find item created using core service from any other machine except where Tridion CMS is installed

查看:35
本文介绍了除了安装了 Tridion CMS 之外,无法在任何其他机器上找到使用核心服务创建的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

除了安装了 Tridion CMS 之外,我无法从任何其他机器上找到使用核心服务创建的任何项目(架构/组件),但是当我在使用相同控制台安装了 Tridion CMS 的机器上创建任何项目时应用程序,然后我就可以使用 TCM URI 找到该特定项目.是否需要在配置文件中定义任何配置(我认为这个问题与刷新或清除浏览器缓存无关)以及当 TCM URI 也是从其他机器生成时,那么即使从 CMS 服务器所在的位置也无法搜索该项目安装.请建议...

I am not able to find any item (schema/component) created using core service from any other machine except where Tridion CMS is installed, but when I create any item on the machine where I have Tridion CMS installed using the same console application then I am able to locate that particular item with TCM URI. Is there any configuration need to define in config file (I think this issue is not related with refreshing or clearing browser cache) and also when TCM URI is generated from other machines too, then how that item is not searchable even from where CMS server is installed. Please suggest...

更多信息:-

我正在开发 SDL Tridion 2011 GA 下面也是创建我正在使用的组件的示例代码:-

I am working on SDL Tridion 2011 GA also below is the sample code of creating a component which I am using:-

public static string CreateComponentStack(string folderUri, string title,
                                          string schemaID)
{
    core_service.ServiceReference1.SessionAwareCoreService2010Client client = 
        new SessionAwareCoreService2010Client();
    client.ClientCredentials.Windows.ClientCredential.UserName = "myUserName";
    client.ClientCredentials.Windows.ClientCredential.Password = "myPassword";
    client.Open();

    ReadOptions readoptions = new ReadOptions();

    string TargetFolderTcmId = folderUri;
    string LinkSchemaTcmId = schemaID;
    ComponentData CurrentMigrationComponent = client.GetDefaultData(
                ItemType.Component, TargetFolderTcmId) as ComponentData;
    LinkToSchemaData SchemaToUse = new LinkToSchemaData();
    SchemaToUse.IdRef = LinkSchemaTcmId.ToString();
    CurrentMigrationComponent.Schema = SchemaToUse;
    CurrentMigrationComponent.Title = title;
    XmlDocument doc = new XmlDocument();

    doc.LoadXml("<Content xmlns='uuid:7289aba9-16de-487c-9142-f6f97dbd2571'>"+
                "</Content>");

    CurrentMigrationComponent.Content = doc.DocumentElement.OuterXml;
    string newTCMID = client.Create(CurrentMigrationComponent, readoptions).Id; 
    Console.WriteLine(CurrentMigrationComponent.Id);
    Console.ReadLine(); 
    return newTCMID; 
}

推荐答案

该项目要么存在,要么不存在.它不是在您似乎正在体验的创作背景"的基础上创建的.

The item either exists or it does not. It is not created with any knowledge of a "creation context" that you seem to be experiencing.

您确定您在正在查找的同一出版物中创建了该项目吗?商品是否已签入?

Are you sure you created the item in the same publication that you are looking in? Is the item checked-in?

如果不是这样,我建议与我们分享您的代码的关键部分:可能是创建连接并在其上设置用户凭据的部分(当然要清除实际值)和调用的部分CoreServiceClient 上的 SaveUpdateCreate 方法.

If it's not something like that, I suggest sharing the crucial bits of your code with us: probably the part that creates the connection and sets the user credentials on it (blank out the actual values of course) and the part that calls the Save, Update or Create methods on the CoreServiceClient.

更新

你添加的代码对我来说很好.但您可能需要检查以下几点:

The code you added looks fine to me. But there are a few things you might want to check about it:

string newTCMID = client.Create(CurrentMigrationComponent, readoptions).Id; 
Console.WriteLine(CurrentMigrationComponent.Id);

鉴于您正在创建一个新组件,CurrentMigrationComponent 变量的 Idtcm:0-0-0.你在 newTCMID 中获得了什么价值?如果您搜索该 TCM URI(使用 GUI 中的搜索功能),它会找到任何东西吗?

Given that you are creating a new Component, the CurrentMigrationComponent variable with have an Id of tcm:0-0-0. What value do you get back in newTCMID? And if you search for that TCM URI (using the search function in the GUI), does it find anything?

这篇关于除了安装了 Tridion CMS 之外,无法在任何其他机器上找到使用核心服务创建的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆