You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.2 KiB
46 lines
1.2 KiB
using System;
|
|
using Teamcenter.ClientX;
|
|
|
|
namespace Teamcenter.FMS
|
|
{
|
|
/**
|
|
* This sample client application demonstrates some of the basic features
|
|
* of the FileManagement service
|
|
*/
|
|
public class FMS
|
|
{
|
|
/**
|
|
* @param args -help or -h will print out a Usage statement
|
|
*/
|
|
public static void Main(string[] args)
|
|
{
|
|
String serverHost = "http://localhost:7001/tc";
|
|
|
|
if (args.Length > 0)
|
|
{
|
|
if (args[0].Equals("-help") || args[0].Equals("-h"))
|
|
{
|
|
System.Console.Out.WriteLine("usage: FMS [-host http://server:port/tc]");
|
|
return;
|
|
}
|
|
if (args[0].Equals("-host") && args.Length > 1)
|
|
{
|
|
// Get optional host information
|
|
serverHost = args[1];
|
|
}
|
|
}
|
|
|
|
Session session = new Session(serverHost);
|
|
FileManagement fm = new FileManagement();
|
|
|
|
// Establish a session with the Teamcenter Server
|
|
session.login();
|
|
|
|
// Upload some files
|
|
fm.uploadFiles();
|
|
|
|
session.logout();
|
|
}
|
|
}
|
|
}
|