除了安装了 Tridion CMS 的机器上,我无法找到使用核心服务创建的任何项目(模式/组件),但是当我在使用相同控制台应用程序安装了 Tridion CMS 的机器上创建任何项目时,我能够使用 TCM URI 找到该特定项目。是否需要在配置文件中定义任何配置(我认为这个问题与刷新或清除浏览器缓存无关)以及当 TCM URI 也从其他机器生成时,即使从 CMS 服务器所在的位置也无法搜索该项目安装。请建议...
更多信息:-
我正在研究 SDL Tridion 2011 GA,下面是创建我正在使用的组件的示例代码:-
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;
}