@ -0,0 +1,33 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// General Information about an assembly is controlled through the following
|
||||||
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
// associated with an assembly.
|
||||||
|
[assembly: AssemblyTitle("HelloTeamcenter")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("Siemens Product Lifecycle Management Software Inc.")]
|
||||||
|
[assembly: AssemblyProduct("HelloTeamcenter")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright 2008 Siemens Product Lifecycle Management Software Inc.")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid("6ce4adbe-4247-464b-8d53-e3ecb88955fd")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
@ -0,0 +1,146 @@
|
|||||||
|
//==================================================
|
||||||
|
//
|
||||||
|
// @<COPYRIGHT>@
|
||||||
|
//
|
||||||
|
//==================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
using Teamcenter.Schemas.Soa._2006_03.Exceptions;
|
||||||
|
using Teamcenter.Soa;
|
||||||
|
using Teamcenter.Soa.Common;
|
||||||
|
using Teamcenter.Soa.Client;
|
||||||
|
using Teamcenter.Soa.Exceptions;
|
||||||
|
|
||||||
|
namespace Teamcenter.ClientX
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The CredentialManager is used by the Teamcenter Services framework to get the
|
||||||
|
* user's credentials when challanged by the server. This can occur after a period
|
||||||
|
* of inactivity and the server has timed-out the user's session, at which time
|
||||||
|
* the client application will need to re-authenitcate. The framework will
|
||||||
|
* call one of the getCredentials methods (depending on circumstances) and will
|
||||||
|
* send the SessionService.login service request. Upon successfull completion of
|
||||||
|
* the login service request. The last service request (one that cuased the challange)
|
||||||
|
* will be resent.
|
||||||
|
*
|
||||||
|
* The framework will also call the setUserPassword setGroupRole methods when ever
|
||||||
|
* these credentials change, thus allowing this implementation of the CredentialManager
|
||||||
|
* to cache these values so prompting of the user is not requried for re-authentication.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class AppXCredentialManager : CredentialManager
|
||||||
|
{
|
||||||
|
|
||||||
|
private String name = null;
|
||||||
|
private String password = null;
|
||||||
|
private String group = ""; // default group
|
||||||
|
private String role = ""; // default role
|
||||||
|
private String discriminator = "SoaAppX"; // always connect same user
|
||||||
|
// to same instance of server
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the type of credentials this implementation provides,
|
||||||
|
* standard (user/password) or Single-Sign-On. In this case
|
||||||
|
* Standard credentials are returned.
|
||||||
|
*
|
||||||
|
* @see com.teamcenter.soa.client.CredentialManager#getCredentialType()
|
||||||
|
*/
|
||||||
|
public int CredentialType
|
||||||
|
{
|
||||||
|
get { return SoaConstants.CLIENT_CREDENTIAL_TYPE_STD; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prompt's the user for credentials.
|
||||||
|
* This method will only be called by the framework when a login attempt has
|
||||||
|
* failed.
|
||||||
|
*
|
||||||
|
* @see com.teamcenter.soa.client.CredentialManager#getCredentials(com.teamcenter.schemas.soa._2006_03.exceptions.InvalidCredentialsException)
|
||||||
|
*/
|
||||||
|
public string[] GetCredentials(InvalidCredentialsException e)
|
||||||
|
//throws CanceledOperationException
|
||||||
|
{
|
||||||
|
Console.WriteLine(e.Message);
|
||||||
|
return PromptForCredentials();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the cached credentials.
|
||||||
|
* This method will be called when a service request is sent without a valid
|
||||||
|
* session ( session has expired on the server).
|
||||||
|
*
|
||||||
|
* @see com.teamcenter.soa.client.CredentialManager#getCredentials(com.teamcenter.schemas.soa._2006_03.exceptions.InvalidUserException)
|
||||||
|
*/
|
||||||
|
public String[] GetCredentials(InvalidUserException e)
|
||||||
|
//throws CanceledOperationException
|
||||||
|
{
|
||||||
|
// Have not logged in yet, shoult not happen but just in case
|
||||||
|
if (name == null) return PromptForCredentials();
|
||||||
|
|
||||||
|
// Return cached credentials
|
||||||
|
String[] tokens = { name, password, group, role, discriminator };
|
||||||
|
return tokens;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cache the group and role
|
||||||
|
* This is called after the SessionService.setSessionGroupMember service
|
||||||
|
* operation is called.
|
||||||
|
*
|
||||||
|
* @see com.teamcenter.soa.client.CredentialManager#setGroupRole(java.lang.String,
|
||||||
|
* java.lang.String)
|
||||||
|
*/
|
||||||
|
public void SetGroupRole(String group, String role)
|
||||||
|
{
|
||||||
|
this.group = group;
|
||||||
|
this.role = role;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cache the User and Password
|
||||||
|
* This is called after the SessionService.login service operation is called.
|
||||||
|
*
|
||||||
|
* @see com.teamcenter.soa.client.CredentialManager#setUserPassword(java.lang.String,
|
||||||
|
* java.lang.String, java.lang.String)
|
||||||
|
*/
|
||||||
|
public void SetUserPassword(String user, String password, String discriminator)
|
||||||
|
{
|
||||||
|
this.name = user;
|
||||||
|
this.password = password;
|
||||||
|
this.discriminator = discriminator;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String[] PromptForCredentials()
|
||||||
|
//throws CanceledOperationException
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Console.WriteLine("Please enter user credentials (return to quit):");
|
||||||
|
Console.Write("User Name: ");
|
||||||
|
name = Console.ReadLine();
|
||||||
|
|
||||||
|
if (name.Length == 0)
|
||||||
|
throw new CanceledOperationException("");
|
||||||
|
|
||||||
|
Console.Write("Password: ");
|
||||||
|
password = Console.ReadLine();
|
||||||
|
}
|
||||||
|
catch (IOException e)
|
||||||
|
{
|
||||||
|
String message = "Failed to get the name and password.\n" + e.Message;
|
||||||
|
Console.WriteLine(message);
|
||||||
|
throw new CanceledOperationException(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
String[] tokens = { name, password, group, role, discriminator };
|
||||||
|
return tokens;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
//==================================================
|
||||||
|
//
|
||||||
|
// @<COPYRIGHT>@
|
||||||
|
//
|
||||||
|
//==================================================
|
||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
|
using Teamcenter.Soa.Client.Model;
|
||||||
|
|
||||||
|
namespace Teamcenter.ClientX
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementation of the DeleteListener, simply prints out list of all objects
|
||||||
|
* that are deleted.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class AppXDeletedObjectListener : DeleteListener
|
||||||
|
{
|
||||||
|
|
||||||
|
public void ModelObjectDelete(string[] uids)
|
||||||
|
{
|
||||||
|
if (uids.Length == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
System.Console.WriteLine("");
|
||||||
|
System.Console.WriteLine("Deleted Objects handled in com.teamcenter.clientx.AppXDeletedObjectListener.modelObjectDelete");
|
||||||
|
System.Console.WriteLine("The following objects have been deleted from the server and removed from the client data model:");
|
||||||
|
for (int i = 0; i < uids.Length; i++)
|
||||||
|
{
|
||||||
|
System.Console.WriteLine(" " + uids[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,101 @@
|
|||||||
|
//==================================================
|
||||||
|
//
|
||||||
|
// @<COPYRIGHT>@
|
||||||
|
//
|
||||||
|
//==================================================
|
||||||
|
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
using Teamcenter.Schemas.Soa._2006_03.Exceptions;
|
||||||
|
using Teamcenter.Soa.Client;
|
||||||
|
using Teamcenter.Soa.Exceptions;
|
||||||
|
|
||||||
|
namespace Teamcenter.ClientX
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementation of the ExceptionHandler. For ConnectionExceptions (server
|
||||||
|
* temporarily down .etc) prompts the user to retry the last request. For other
|
||||||
|
* exceptions convert to a RunTime exception.
|
||||||
|
*/
|
||||||
|
public class AppXExceptionHandler : ExceptionHandler
|
||||||
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
|
* @see com.teamcenter.soa.client.ExceptionHandler#handleException(com.teamcenter.schemas.soa._2006_03.exceptions.InternalServerException)
|
||||||
|
*/
|
||||||
|
public void HandleException(InternalServerException ise)
|
||||||
|
{
|
||||||
|
Console.WriteLine("");
|
||||||
|
Console.WriteLine("*****");
|
||||||
|
Console.WriteLine("Exception caught in com.teamcenter.clientx.AppXExceptionHandler.handleException(InternalServerException).");
|
||||||
|
|
||||||
|
|
||||||
|
if (ise is ConnectionException)
|
||||||
|
{
|
||||||
|
// ConnectionException are typically due to a network error (server
|
||||||
|
// down .etc) and can be recovered from (the last request can be sent again,
|
||||||
|
// after the problem is corrected).
|
||||||
|
Console.Write("\nThe server returned an connection error.\n" + ise.Message
|
||||||
|
+ "\nDo you wish to retry the last service request?[y/n]");
|
||||||
|
}
|
||||||
|
else if (ise is ProtocolException)
|
||||||
|
{
|
||||||
|
// ProtocolException are typically due to programming errors
|
||||||
|
// (content of HTTP
|
||||||
|
// request is incorrect). These are generally can not be
|
||||||
|
// recovered from.
|
||||||
|
Console.Write("\nThe server returned an protocol error.\n" + ise.Message
|
||||||
|
+ "\nThis is most likely the result of a programming error."
|
||||||
|
+ "\nDo you wish to retry the last service request?[y/n]");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("\nThe server returned an internal server error.\n"
|
||||||
|
+ ise.Message
|
||||||
|
+ "\nThis is most likely the result of a programming error."
|
||||||
|
+ "\nA RuntimeException will be thrown.");
|
||||||
|
throw new SystemException(ise.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
String retry = Console.ReadLine();
|
||||||
|
// If yes, return to the calling SOA client framework, where the
|
||||||
|
// last service request will be resent.
|
||||||
|
if (retry.ToLower().Equals("y") || retry.ToLower().Equals("yes"))
|
||||||
|
return;
|
||||||
|
|
||||||
|
throw new SystemException("The user has opted not to retry the last request");
|
||||||
|
}
|
||||||
|
catch (IOException e)
|
||||||
|
{
|
||||||
|
Console.Error.WriteLine("Failed to read user response.\nA RuntimeException will be thrown.");
|
||||||
|
throw new SystemException(e.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
|
* @see com.teamcenter.soa.client.ExceptionHandler#handleException(com.teamcenter.soa.exceptions.CanceledOperationException)
|
||||||
|
*/
|
||||||
|
public void HandleException(CanceledOperationException coe)
|
||||||
|
{
|
||||||
|
Console.WriteLine("");
|
||||||
|
Console.WriteLine("*****");
|
||||||
|
Console.WriteLine("Exception caught in com.teamcenter.clientx.AppXExceptionHandler.handleException(CanceledOperationException).");
|
||||||
|
|
||||||
|
// Expecting this from the login tests with bad credentials, and the
|
||||||
|
// AnyUserCredentials class not
|
||||||
|
// prompting for different credentials
|
||||||
|
throw new SystemException(coe.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,68 @@
|
|||||||
|
//==================================================
|
||||||
|
//
|
||||||
|
// @<COPYRIGHT>@
|
||||||
|
//
|
||||||
|
//==================================================
|
||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
|
using Teamcenter.Soa.Client.Model;
|
||||||
|
|
||||||
|
|
||||||
|
namespace Teamcenter.ClientX
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementation of the PartialErrorListener. Print out any partial errors
|
||||||
|
* returned.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class AppXPartialErrorListener : PartialErrorListener
|
||||||
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
|
* @see com.teamcenter.soa.client.model.PartialErrorListener#handlePartialError(com.teamcenter.soa.client.model.ErrorStack[])
|
||||||
|
*/
|
||||||
|
public void HandlePartialError(ErrorStack[] stacks)
|
||||||
|
{
|
||||||
|
if (stacks.Length == 0) return;
|
||||||
|
|
||||||
|
Console.WriteLine("");
|
||||||
|
Console.WriteLine("*****");
|
||||||
|
Console.WriteLine("Partial Errors caught in com.teamcenter.clientx.AppXPartialErrorListener.");
|
||||||
|
|
||||||
|
|
||||||
|
for (int i = 0; i < stacks.Length; i++)
|
||||||
|
{
|
||||||
|
ErrorValue[] errors = stacks[i].ErrorValues;
|
||||||
|
Console.Write("Partial Error for ");
|
||||||
|
|
||||||
|
// The different service implementation may optionally associate
|
||||||
|
// an ModelObject, client ID, or nothing, with each partial error
|
||||||
|
if (stacks[i].HasAssociatedObject() )
|
||||||
|
{
|
||||||
|
Console.WriteLine("object "+ stacks[i].AssociatedObject.Uid);
|
||||||
|
}
|
||||||
|
else if (stacks[i].HasClientId())
|
||||||
|
{
|
||||||
|
Console.WriteLine("client id "+ stacks[i].ClientId);
|
||||||
|
}
|
||||||
|
else if (stacks[i].HasClientIndex())
|
||||||
|
{
|
||||||
|
Console.WriteLine("client index " + stacks[i].ClientIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Each Partial Error will have one or more contributing error messages
|
||||||
|
for (int j = 0; j < errors.Length; j++)
|
||||||
|
{
|
||||||
|
Console.WriteLine(" Code: " + errors[j].Code + "\tSeverity: "
|
||||||
|
+ errors[j].Level + "\t" + errors[j].Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
//==================================================
|
||||||
|
//
|
||||||
|
// @<COPYRIGHT>@
|
||||||
|
//
|
||||||
|
//==================================================
|
||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
|
using Teamcenter.Soa.Client;
|
||||||
|
|
||||||
|
|
||||||
|
namespace Teamcenter.ClientX
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This implemenation of the RequestListener, logs each service request
|
||||||
|
* to the console.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class AppXRequestListener : RequestListener
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called before each request is sent to the server.
|
||||||
|
*/
|
||||||
|
public void ServiceRequest(ServiceInfo info)
|
||||||
|
{
|
||||||
|
// will log the service name when done
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called after each response from the server.
|
||||||
|
* Log the service operation to the console.
|
||||||
|
*/
|
||||||
|
public void ServiceResponse(ServiceInfo info)
|
||||||
|
{
|
||||||
|
Console.WriteLine(info.Id + ": " + info.Service + "." + info.Operation);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,48 @@
|
|||||||
|
//==================================================
|
||||||
|
//
|
||||||
|
// @<COPYRIGHT>@
|
||||||
|
//
|
||||||
|
//==================================================
|
||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
|
using Teamcenter.Soa.Client.Model;
|
||||||
|
using Teamcenter.Soa.Exceptions;
|
||||||
|
|
||||||
|
namespace Teamcenter.ClientX
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementation of the ChangeListener. Print out all objects that have been updated.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class AppXUpdateObjectListener : ChangeListener
|
||||||
|
{
|
||||||
|
|
||||||
|
public void ModelObjectChange(ModelObject[] objects)
|
||||||
|
{
|
||||||
|
if (objects.Length == 0) return;
|
||||||
|
System.Console.WriteLine("");
|
||||||
|
System.Console.WriteLine("Modified Objects handled in com.teamcenter.clientx.AppXUpdateObjectListener.modelObjectChange");
|
||||||
|
System.Console.WriteLine("The following objects have been updated in the client data model:");
|
||||||
|
for (int i = 0; i < objects.Length; i++)
|
||||||
|
{
|
||||||
|
String uid = objects[i].Uid;
|
||||||
|
String type = objects[i].GetType().Name;
|
||||||
|
String name = "";
|
||||||
|
if (objects[i].GetType().Name.Equals("WorkspaceObject"))
|
||||||
|
{
|
||||||
|
ModelObject wo = objects[i];
|
||||||
|
try
|
||||||
|
{
|
||||||
|
name = wo.GetProperty("object_string").StringValue;
|
||||||
|
}
|
||||||
|
catch (NotLoadedException /*e*/) {} // just ignore
|
||||||
|
}
|
||||||
|
System.Console.WriteLine(" " + uid + " " + type + " " + name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,247 @@
|
|||||||
|
//==================================================
|
||||||
|
//
|
||||||
|
// @<COPYRIGHT>@
|
||||||
|
//
|
||||||
|
//==================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Net;
|
||||||
|
|
||||||
|
using Teamcenter.Schemas.Soa._2006_03.Exceptions;
|
||||||
|
using Teamcenter.Services.Strong.Core;
|
||||||
|
using Teamcenter.Services.Strong.Core._2006_03.Session;
|
||||||
|
using Teamcenter.Soa;
|
||||||
|
using Teamcenter.Soa.Client;
|
||||||
|
using Teamcenter.Soa.Client.Model;
|
||||||
|
using Teamcenter.Soa.Exceptions;
|
||||||
|
|
||||||
|
using WorkspaceObject = Teamcenter.Soa.Client.Model.Strong.WorkspaceObject;
|
||||||
|
using User = Teamcenter.Soa.Client.Model.Strong.User;
|
||||||
|
|
||||||
|
namespace Teamcenter.ClientX
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public class Session
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Single instance of the Connection object that is shared throughtout
|
||||||
|
* the application. This Connection object is needed whenever a Service
|
||||||
|
* stub is instantiated.
|
||||||
|
*/
|
||||||
|
private static Connection connection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The credentialManager is used both by the Session class and the Teamcenter
|
||||||
|
* Services Framework to get user credentials.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static AppXCredentialManager credentialManager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an instance of the Session with a connection to the specified
|
||||||
|
* server.
|
||||||
|
*
|
||||||
|
* Add implementations of the ExceptionHandler, PartialErrorListener,
|
||||||
|
* ChangeListener, and DeleteListeners.
|
||||||
|
*
|
||||||
|
* @param host Address of the host to connect to, http://serverName:port/tc
|
||||||
|
*/
|
||||||
|
public Session(String host)
|
||||||
|
{
|
||||||
|
// Create an instance of the CredentialManager, this is used
|
||||||
|
// by the SOA Framework to get the user's credentials when
|
||||||
|
// challanged by the server (sesioin timeout on the web tier).
|
||||||
|
credentialManager = new AppXCredentialManager();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Create the Connection object, no contact is made with the server
|
||||||
|
// until a service request is made
|
||||||
|
connection = new Connection(host, new CookieCollection(), credentialManager, SoaConstants.REST,
|
||||||
|
SoaConstants.HTTP, false);
|
||||||
|
|
||||||
|
|
||||||
|
// Add an ExceptionHandler to the Connection, this will handle any
|
||||||
|
// InternalServerException, communication errors, xml marshalling errors
|
||||||
|
// .etc
|
||||||
|
connection.ExceptionHandler = new AppXExceptionHandler();
|
||||||
|
|
||||||
|
// While the above ExceptionHandler is required, all of the following
|
||||||
|
// Listeners are optional. Client application can add as many or as few Listeners
|
||||||
|
// of each type that they want.
|
||||||
|
|
||||||
|
// Add a Partial Error Listener, this will be notified when ever a
|
||||||
|
// a service returns partial errors.
|
||||||
|
connection.ModelManager.AddPartialErrorListener(new AppXPartialErrorListener());
|
||||||
|
|
||||||
|
// Add a Change Listener, this will be notified when ever a
|
||||||
|
// a service returns model objects that have been updated.
|
||||||
|
connection.ModelManager.AddChangeListener(new AppXUpdateObjectListener());
|
||||||
|
|
||||||
|
// Add a Delete Listener, this will be notified when ever a
|
||||||
|
// a service returns objects that have been deleted.
|
||||||
|
connection.ModelManager.AddDeleteListener(new AppXDeletedObjectListener());
|
||||||
|
|
||||||
|
// Add a Request Listener, this will be notified before and after each
|
||||||
|
// service request is sent to the server.
|
||||||
|
Connection.AddRequestListener(new AppXRequestListener());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the single Connection object for the application
|
||||||
|
*
|
||||||
|
* @return connection
|
||||||
|
*/
|
||||||
|
public static Connection getConnection()
|
||||||
|
{
|
||||||
|
return connection;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Login to the Teamcenter Server
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public User login()
|
||||||
|
{
|
||||||
|
// Get the service stub
|
||||||
|
SessionService sessionService = SessionService.getService(connection);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Prompt for credentials until they are right, or until user
|
||||||
|
// cancels
|
||||||
|
String[] credentials = credentialManager.PromptForCredentials();
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
// *****************************
|
||||||
|
// Execute the service operation
|
||||||
|
// *****************************
|
||||||
|
LoginResponse resp = sessionService.Login(credentials[0], credentials[1],
|
||||||
|
credentials[2], credentials[3],"",credentials[4]);
|
||||||
|
|
||||||
|
return resp.User;
|
||||||
|
}
|
||||||
|
catch (InvalidCredentialsException e)
|
||||||
|
{
|
||||||
|
credentials = credentialManager.GetCredentials(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// User canceled the operation, don't need to tell him again
|
||||||
|
catch (CanceledOperationException /*e*/) {}
|
||||||
|
|
||||||
|
// Exit the application
|
||||||
|
//System.exit(0);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Terminate the session with the Teamcenter Server
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void logout()
|
||||||
|
{
|
||||||
|
// Get the service stub
|
||||||
|
SessionService sessionService = SessionService.getService(connection);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// *****************************
|
||||||
|
// Execute the service operation
|
||||||
|
// *****************************
|
||||||
|
sessionService.Logout();
|
||||||
|
}
|
||||||
|
catch (ServiceException /*e*/) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print some basic information for a list of objects
|
||||||
|
*
|
||||||
|
* @param objects
|
||||||
|
*/
|
||||||
|
public static void printObjects(ModelObject[] objects)
|
||||||
|
{
|
||||||
|
if(objects == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
// Ensure that the referenced User objects that we will use below are loaded
|
||||||
|
getUsers( objects );
|
||||||
|
|
||||||
|
Console.WriteLine("Name\t\tOwner\t\tLast Modified");
|
||||||
|
Console.WriteLine("====\t\t=====\t\t=============");
|
||||||
|
for (int i = 0; i < objects.Length; i++)
|
||||||
|
{
|
||||||
|
if(!(objects[i] is WorkspaceObject ))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
WorkspaceObject wo = (WorkspaceObject)objects[i];
|
||||||
|
try
|
||||||
|
{
|
||||||
|
String name = wo.Object_string;
|
||||||
|
User owner = (User) wo.Owning_user;
|
||||||
|
DateTime lastModified =wo.Last_mod_date;
|
||||||
|
|
||||||
|
Console.WriteLine(name + "\t" + owner.User_name + "\t" + lastModified.ToString());
|
||||||
|
}
|
||||||
|
catch (NotLoadedException e)
|
||||||
|
{
|
||||||
|
// Print out a message, and skip to the next item in the folder
|
||||||
|
// Could do a DataManagementService.getProperties call at this point
|
||||||
|
Console.WriteLine(e.Message);
|
||||||
|
Console.WriteLine("The Object Property Policy ($TC_DATA/soa/policies/Default.xml) is not configured with this property.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static void getUsers(ModelObject[] objects)
|
||||||
|
{
|
||||||
|
if(objects == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
DataManagementService dmService = DataManagementService.getService(Session.getConnection());
|
||||||
|
ArrayList unKnownUsers = new ArrayList();
|
||||||
|
for (int i = 0; i < objects.Length; i++)
|
||||||
|
{
|
||||||
|
if(!(objects[i] is WorkspaceObject ))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
WorkspaceObject wo = (WorkspaceObject)objects[i];
|
||||||
|
|
||||||
|
User owner = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
owner = (User) wo.Owning_user;
|
||||||
|
String userName = owner.User_name;
|
||||||
|
}
|
||||||
|
catch (NotLoadedException /*e*/)
|
||||||
|
{
|
||||||
|
if(owner != null)
|
||||||
|
unKnownUsers.Add(owner);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
User[] users = new User[unKnownUsers.Count];
|
||||||
|
unKnownUsers.CopyTo( users );
|
||||||
|
String[] attributes = { "user_name" };
|
||||||
|
|
||||||
|
|
||||||
|
// *****************************
|
||||||
|
// Execute the service operation
|
||||||
|
// *****************************
|
||||||
|
dmService.GetProperties(users, attributes);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,379 @@
|
|||||||
|
//==================================================
|
||||||
|
//
|
||||||
|
// @<COPYRIGHT>@
|
||||||
|
//
|
||||||
|
//==================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
|
||||||
|
using Teamcenter.ClientX;
|
||||||
|
using Teamcenter.Schemas.Soa._2006_03.Exceptions;
|
||||||
|
|
||||||
|
// Include the Data Management Service Interface
|
||||||
|
using Teamcenter.Services.Strong.Core;
|
||||||
|
|
||||||
|
// Input and output structures for the service operations
|
||||||
|
// Note: the different namespace from the service interface
|
||||||
|
using Teamcenter.Services.Strong.Core._2006_03.DataManagement;
|
||||||
|
using Teamcenter.Services.Strong.Core._2007_01.DataManagement;
|
||||||
|
using Teamcenter.Soa.Client.Model;
|
||||||
|
using Teamcenter.Soa.Exceptions;
|
||||||
|
|
||||||
|
using Item = Teamcenter.Soa.Client.Model.Strong.Item;
|
||||||
|
using ItemRevision = Teamcenter.Soa.Client.Model.Strong.ItemRevision;
|
||||||
|
|
||||||
|
namespace Teamcenter.Hello
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform different operations in the DataManamentService
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class DataManagement
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a sequence of data management operations: Create Items, Revise
|
||||||
|
* the Items, and Delete the Items
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void createReviseAndDelete()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
int numberOfItems = 3;
|
||||||
|
|
||||||
|
// Reserve Item IDs and Create Items with those IDs
|
||||||
|
ItemIdsAndInitialRevisionIds[] itemIds = generateItemIds(numberOfItems, "Item");
|
||||||
|
CreateItemsOutput[] newItems = createItems(itemIds, "Item");
|
||||||
|
|
||||||
|
// Copy the Item and ItemRevision to separate arrays for further
|
||||||
|
// processing
|
||||||
|
Item[] items = new Item[newItems.Length];
|
||||||
|
ItemRevision[] itemRevs = new ItemRevision[newItems.Length];
|
||||||
|
for (int i = 0; i < items.Length; i++)
|
||||||
|
{
|
||||||
|
items[i] = newItems[i].Item;
|
||||||
|
itemRevs[i] = newItems[i].ItemRev;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reserve revision IDs and revise the Items
|
||||||
|
Hashtable allRevIds = generateRevisionIds(items);
|
||||||
|
reviseItems(allRevIds, itemRevs);
|
||||||
|
|
||||||
|
// Delete all objects created
|
||||||
|
deleteItems(items);
|
||||||
|
}
|
||||||
|
catch (ServiceException e)
|
||||||
|
{
|
||||||
|
System.Console.Out.WriteLine(e.Message );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reserve a number Item and Revision Ids
|
||||||
|
*
|
||||||
|
* @param numberOfIds Number of IDs to generate
|
||||||
|
* @param type Type of IDs to generate
|
||||||
|
*
|
||||||
|
* @return An array of Item and Revision IDs. The size of the array is equal
|
||||||
|
* to the input numberOfIds
|
||||||
|
*
|
||||||
|
* @throws ServiceException If any partial errors are returned
|
||||||
|
*/
|
||||||
|
public ItemIdsAndInitialRevisionIds[] generateItemIds(int numberOfIds, String type)
|
||||||
|
// throws ServiceException
|
||||||
|
{
|
||||||
|
// Get the service stub
|
||||||
|
DataManagementService dmService = DataManagementService.getService(Session.getConnection());
|
||||||
|
|
||||||
|
GenerateItemIdsAndInitialRevisionIdsProperties[] properties = new GenerateItemIdsAndInitialRevisionIdsProperties[1];
|
||||||
|
GenerateItemIdsAndInitialRevisionIdsProperties property = new GenerateItemIdsAndInitialRevisionIdsProperties();
|
||||||
|
|
||||||
|
property.Count = numberOfIds;
|
||||||
|
property.ItemType = type;
|
||||||
|
property.Item = null; // Not used
|
||||||
|
properties[0] = property;
|
||||||
|
|
||||||
|
// *****************************
|
||||||
|
// Execute the service operation
|
||||||
|
// *****************************
|
||||||
|
GenerateItemIdsAndInitialRevisionIdsResponse response = dmService.GenerateItemIdsAndInitialRevisionIds(properties);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// The AppXPartialErrorListener is logging the partial errors returned
|
||||||
|
// In this simple example if any partial errors occur we will throw a
|
||||||
|
// ServiceException
|
||||||
|
if (response.ServiceData.sizeOfPartialErrors() > 0)
|
||||||
|
throw new ServiceException( "DataManagementService.generateItemIdsAndInitialRevisionIds returned a partial error.");
|
||||||
|
|
||||||
|
// The return is a map of ItemIdsAndInitialRevisionIds keyed on the
|
||||||
|
// 0-based index of requested IDs. Since we only asked for IDs for one
|
||||||
|
// data type, the map key is '0'
|
||||||
|
Int32 bIkey = 0;
|
||||||
|
Hashtable allNewIds = response.OutputItemIdsAndInitialRevisionIds;
|
||||||
|
ItemIdsAndInitialRevisionIds[] myNewIds = (ItemIdsAndInitialRevisionIds[]) allNewIds[bIkey];
|
||||||
|
|
||||||
|
return myNewIds;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create Items
|
||||||
|
*
|
||||||
|
* @param itemIds Array of Item and Revision IDs
|
||||||
|
* @param itemType Type of item to create
|
||||||
|
*
|
||||||
|
* @return Set of Items and ItemRevisions
|
||||||
|
*
|
||||||
|
* @throws ServiceException If any partial errors are returned
|
||||||
|
*/
|
||||||
|
public CreateItemsOutput[] createItems(ItemIdsAndInitialRevisionIds[] itemIds, String itemType)
|
||||||
|
// throws ServiceException
|
||||||
|
{
|
||||||
|
// Get the service stub
|
||||||
|
DataManagementService dmService = DataManagementService.getService(Session.getConnection());
|
||||||
|
// Populate form type
|
||||||
|
GetItemCreationRelatedInfoResponse relatedResponse = dmService.GetItemCreationRelatedInfo(itemType, null);
|
||||||
|
String[] formTypes = new String[0];
|
||||||
|
if ( relatedResponse.ServiceData.sizeOfPartialErrors() > 0)
|
||||||
|
throw new ServiceException( "DataManagementService.getItemCretionRelatedInfo returned a partial error.");
|
||||||
|
|
||||||
|
formTypes = new String[relatedResponse.FormAttrs.Length];
|
||||||
|
for ( int i = 0; i < relatedResponse.FormAttrs.Length; i++ )
|
||||||
|
{
|
||||||
|
FormAttributesInfo attrInfo = relatedResponse.FormAttrs[i];
|
||||||
|
formTypes[i] = attrInfo.FormType;
|
||||||
|
}
|
||||||
|
|
||||||
|
ItemProperties[] itemProps = new ItemProperties[itemIds.Length];
|
||||||
|
for (int i = 0; i < itemIds.Length; i++)
|
||||||
|
{
|
||||||
|
// Create form in cache for form property population
|
||||||
|
ModelObject[] forms = createForms(itemIds[i].NewItemId, formTypes[0],
|
||||||
|
itemIds[i].NewRevId, formTypes[1],
|
||||||
|
null, false);
|
||||||
|
ItemProperties itemProperty = new ItemProperties();
|
||||||
|
|
||||||
|
itemProperty.ClientId = "AppX-Test";
|
||||||
|
itemProperty.ItemId = itemIds[i].NewItemId;
|
||||||
|
itemProperty.RevId = itemIds[i].NewRevId;
|
||||||
|
itemProperty.Name = "AppX-Test";
|
||||||
|
itemProperty.Type = itemType;
|
||||||
|
itemProperty.Description = "Test Item for the SOA AppX sample application.";
|
||||||
|
itemProperty.Uom = "";
|
||||||
|
|
||||||
|
// Retrieve one of form attribute value from Item master form.
|
||||||
|
ServiceData serviceData = dmService.GetProperties(forms, new String[]{"project_id"});
|
||||||
|
if ( serviceData.sizeOfPartialErrors() > 0)
|
||||||
|
throw new ServiceException( "DataManagementService.getProperties returned a partial error.");
|
||||||
|
Property property = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
property= forms[0].GetProperty("project_id");
|
||||||
|
}
|
||||||
|
catch ( NotLoadedException /*ex*/){}
|
||||||
|
|
||||||
|
|
||||||
|
// Only if value is null, we set new value
|
||||||
|
if ( property == null || property.StringValue == null || property.StringValue.Length == 0)
|
||||||
|
{
|
||||||
|
itemProperty.ExtendedAttributes = new ExtendedAttributes[1];
|
||||||
|
ExtendedAttributes theExtendedAttr = new ExtendedAttributes();
|
||||||
|
theExtendedAttr.Attributes = new Hashtable();
|
||||||
|
theExtendedAttr.ObjectType = formTypes[0];
|
||||||
|
theExtendedAttr.Attributes["project_id"] = "project_id";
|
||||||
|
itemProperty.ExtendedAttributes[0] = theExtendedAttr;
|
||||||
|
}
|
||||||
|
itemProps[i] = itemProperty;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// *****************************
|
||||||
|
// Execute the service operation
|
||||||
|
// *****************************
|
||||||
|
CreateItemsResponse response = dmService.CreateItems(itemProps, null, "");
|
||||||
|
// before control is returned the ChangedHandler will be called with
|
||||||
|
// newly created Item and ItemRevisions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// The AppXPartialErrorListener is logging the partial errors returned
|
||||||
|
// In this simple example if any partial errors occur we will throw a
|
||||||
|
// ServiceException
|
||||||
|
if (response.ServiceData.sizeOfPartialErrors() > 0)
|
||||||
|
throw new ServiceException( "DataManagementService.createItems returned a partial error.");
|
||||||
|
|
||||||
|
return response.Output;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reserve Revision IDs
|
||||||
|
*
|
||||||
|
* @param items Array of Items to reserve Ids for
|
||||||
|
*
|
||||||
|
* @return Map of RevisionIds
|
||||||
|
*
|
||||||
|
* @throws ServiceException If any partial errors are returned
|
||||||
|
*/
|
||||||
|
public Hashtable generateRevisionIds(Item[] items) //throws ServiceException
|
||||||
|
{
|
||||||
|
// Get the service stub
|
||||||
|
DataManagementService dmService = DataManagementService.getService(Session.getConnection());
|
||||||
|
|
||||||
|
GenerateRevisionIdsResponse response = null;
|
||||||
|
GenerateRevisionIdsProperties[] input = null;
|
||||||
|
input = new GenerateRevisionIdsProperties[items.Length];
|
||||||
|
for (int i = 0; i < items.Length; i++)
|
||||||
|
{
|
||||||
|
GenerateRevisionIdsProperties property = new GenerateRevisionIdsProperties();
|
||||||
|
property.Item = items[i];
|
||||||
|
property.ItemType = "";
|
||||||
|
input[i] = property;
|
||||||
|
}
|
||||||
|
|
||||||
|
// *****************************
|
||||||
|
// Execute the service operation
|
||||||
|
// *****************************
|
||||||
|
response = dmService.GenerateRevisionIds(input);
|
||||||
|
|
||||||
|
// The AppXPartialErrorListener is logging the partial errors returned
|
||||||
|
// In this simple example if any partial errors occur we will throw a
|
||||||
|
// ServiceException
|
||||||
|
if (response.ServiceData.sizeOfPartialErrors() > 0)
|
||||||
|
throw new ServiceException( "DataManagementService.generateRevisionIds returned a partial error.");
|
||||||
|
|
||||||
|
return response.OutputRevisionIds;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Revise Items
|
||||||
|
*
|
||||||
|
* @param revisionIds Map of Revsion IDs
|
||||||
|
* @param itemRevs Array of ItemRevisons
|
||||||
|
*
|
||||||
|
* @return Map of Old ItemRevsion(key) to new ItemRevision(value)
|
||||||
|
*
|
||||||
|
* @throws ServiceException If any partial errors are returned
|
||||||
|
*/
|
||||||
|
public Hashtable reviseItems(Hashtable revisionIds, ItemRevision[] itemRevs) //throws ServiceException
|
||||||
|
{
|
||||||
|
// Get the service stub
|
||||||
|
DataManagementService dmService = DataManagementService.getService(Session.getConnection());
|
||||||
|
|
||||||
|
Hashtable revs = new Hashtable();
|
||||||
|
for (int i = 0; i < itemRevs.Length; i++)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
RevisionIds rev = (RevisionIds) revisionIds[i];
|
||||||
|
|
||||||
|
ReviseProperties revProps = new ReviseProperties();
|
||||||
|
|
||||||
|
revProps.RevId = rev.NewRevId;
|
||||||
|
revProps.Name = "testRevise";
|
||||||
|
revProps.Description = "describe testRevise";
|
||||||
|
|
||||||
|
Hashtable attrs = new Hashtable();
|
||||||
|
attrs["project_id"] = "project_id_val";
|
||||||
|
revProps.ExtendedAttributes = attrs;
|
||||||
|
|
||||||
|
revs[itemRevs[i]]= revProps;
|
||||||
|
}
|
||||||
|
|
||||||
|
// *****************************
|
||||||
|
// Execute the service operation
|
||||||
|
// *****************************
|
||||||
|
ReviseResponse revised = dmService.Revise(revs);
|
||||||
|
// before control is returned the ChangedHandler will be called with
|
||||||
|
// newly created Item and ItemRevisions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// The AppXPartialErrorListener is logging the partial errors returned
|
||||||
|
// In this simple example if any partial errors occur we will throw a
|
||||||
|
// ServiceException
|
||||||
|
if (revised.ServiceData.sizeOfPartialErrors() > 0)
|
||||||
|
throw new ServiceException("DataManagementService.revise returned a partial error.");
|
||||||
|
|
||||||
|
return revised.OldItemRevToNewItemRev;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete the Items
|
||||||
|
*
|
||||||
|
* @param items Array of Items to delete
|
||||||
|
*
|
||||||
|
* @throws ServiceException If any partial errors are returned
|
||||||
|
*/
|
||||||
|
public void deleteItems(Item[] items) //throws ServiceException
|
||||||
|
{
|
||||||
|
// Get the service stub
|
||||||
|
DataManagementService dmService = DataManagementService.getService(Session.getConnection());
|
||||||
|
|
||||||
|
// *****************************
|
||||||
|
// Execute the service operation
|
||||||
|
// *****************************
|
||||||
|
ServiceData serviceData = dmService.DeleteObjects(items);
|
||||||
|
|
||||||
|
// The AppXPartialErrorListener is logging the partial errors returned
|
||||||
|
// In this simple example if any partial errors occur we will throw a
|
||||||
|
// ServiceException
|
||||||
|
if (serviceData.sizeOfPartialErrors() > 0)
|
||||||
|
throw new ServiceException("DataManagementService.deleteObjects returned a partial error.");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create ItemMasterForm and ItemRevisionMasterForm
|
||||||
|
*
|
||||||
|
* @param IMFormName Name of ItemMasterForm
|
||||||
|
* @param IMFormType Type of ItemMasterForm
|
||||||
|
* @param IRMFormName Name of ItemRevisionMasterForm
|
||||||
|
* @param IRMFormType Type of ItemRevisionMasterForm
|
||||||
|
* @param parent The container object that two
|
||||||
|
* newly-created forms will be added into.
|
||||||
|
* @return ModelObject[] Array of forms
|
||||||
|
*
|
||||||
|
* @throws ServiceException If any partial errors are returned
|
||||||
|
*/
|
||||||
|
public ModelObject[] createForms ( String IMFormName, String IMFormType,
|
||||||
|
String IRMFormName, String IRMFormType,
|
||||||
|
ModelObject parent, bool saveDB ) //throws ServiceException
|
||||||
|
{
|
||||||
|
//Get the service stub
|
||||||
|
DataManagementService dmService = DataManagementService.getService(Session.getConnection());
|
||||||
|
FormInfo[] inputs = new FormInfo[2];
|
||||||
|
inputs[0] = new FormInfo();
|
||||||
|
inputs[0].ClientId = "1";
|
||||||
|
inputs[0].Description="";
|
||||||
|
inputs[0].Name = IMFormName;
|
||||||
|
inputs[0].FormType=IMFormType;
|
||||||
|
inputs[0].SaveDB = saveDB;
|
||||||
|
inputs[0].ParentObject = parent ;
|
||||||
|
inputs[1] = new FormInfo();
|
||||||
|
inputs[1].ClientId = "2";
|
||||||
|
inputs[1].Description="";
|
||||||
|
inputs[1].Name = IRMFormName;
|
||||||
|
inputs[1].FormType=IRMFormType;
|
||||||
|
inputs[1].SaveDB = saveDB;
|
||||||
|
inputs[1].ParentObject = parent;
|
||||||
|
CreateOrUpdateFormsResponse response = dmService.CreateOrUpdateForms(inputs);
|
||||||
|
if ( response.ServiceData.sizeOfPartialErrors() > 0)
|
||||||
|
throw new ServiceException("DataManagementService.createForms returned a partial error.");
|
||||||
|
ModelObject[] forms = new ModelObject [inputs.Length];
|
||||||
|
for (int i=0; i<inputs.Length; ++i)
|
||||||
|
{
|
||||||
|
forms[i] = response.Outputs[i].Form;
|
||||||
|
}
|
||||||
|
return forms;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,91 @@
|
|||||||
|
//==================================================
|
||||||
|
//
|
||||||
|
// @<COPYRIGHT>@
|
||||||
|
//
|
||||||
|
//==================================================
|
||||||
|
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using Teamcenter.ClientX;
|
||||||
|
|
||||||
|
using User = Teamcenter.Soa.Client.Model.Strong.User;
|
||||||
|
|
||||||
|
namespace Teamcenter.Hello
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* This sample client application demonstrates some of the basic features of the
|
||||||
|
* Teamcenter Services framework and a few of the services.
|
||||||
|
*
|
||||||
|
* An instance of the Connection object is created with implementations of the
|
||||||
|
* ExceptionHandler, PartialErrorListener, ChangeListener, and DeleteListeners
|
||||||
|
* intefaces. This client application performs the following functions:
|
||||||
|
* 1. Establishes a session with the Teamcenter server
|
||||||
|
* 2. Display the contents of the Home Folder
|
||||||
|
* 3. Performs a simple query of the database
|
||||||
|
* 4. Create, revise, and delete an Item
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class Hello
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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: Hello [-host http://server:port/tc]");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (args[0].Equals("-host") && args.Length > 1)
|
||||||
|
{
|
||||||
|
// Get optional host information
|
||||||
|
serverHost = args[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
Session session = new Session(serverHost);
|
||||||
|
HomeFolder home = new HomeFolder();
|
||||||
|
Query query = new Query();
|
||||||
|
DataManagement dm = new DataManagement();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Establish a session with the Teamcenter Server
|
||||||
|
User user = session.login();
|
||||||
|
|
||||||
|
// Using the User object returned from the login service request
|
||||||
|
// display the contents of the Home Folder
|
||||||
|
home.listHomeFolder(user);
|
||||||
|
|
||||||
|
// Perform a simple query of the database
|
||||||
|
query.queryItems();
|
||||||
|
|
||||||
|
// Perform some basic data management functions
|
||||||
|
dm.createReviseAndDelete();
|
||||||
|
|
||||||
|
// Terminate the session with the Teamcenter server
|
||||||
|
session.logout();
|
||||||
|
}
|
||||||
|
catch (SystemException e)
|
||||||
|
{
|
||||||
|
Console.WriteLine(e.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,79 @@
|
|||||||
|
//==================================================
|
||||||
|
//
|
||||||
|
// @<COPYRIGHT>@
|
||||||
|
//
|
||||||
|
//==================================================
|
||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
|
using Teamcenter.ClientX;
|
||||||
|
using Teamcenter.Services.Strong.Core;
|
||||||
|
using Teamcenter.Soa.Client.Model;
|
||||||
|
using Teamcenter.Soa.Exceptions;
|
||||||
|
|
||||||
|
using User = Teamcenter.Soa.Client.Model.Strong.User;
|
||||||
|
using Folder = Teamcenter.Soa.Client.Model.Strong.Folder;
|
||||||
|
using WorkspaceObject = Teamcenter.Soa.Client.Model.Strong.WorkspaceObject;
|
||||||
|
|
||||||
|
namespace Teamcenter.Hello
|
||||||
|
{
|
||||||
|
public class HomeFolder
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List the contents of the Home folder.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void listHomeFolder(User user)
|
||||||
|
{
|
||||||
|
Folder home = null;
|
||||||
|
WorkspaceObject[] contents = null;
|
||||||
|
|
||||||
|
// Get the service stub
|
||||||
|
DataManagementService dmService = DataManagementService.getService(Session.getConnection());
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// User was a primary object returned from the login command
|
||||||
|
// the Object Property Policy should be configured to include the
|
||||||
|
// 'home_folder' property. However the actuall 'home_folder' object
|
||||||
|
// was a secondary object returned from the login request and
|
||||||
|
// therefore does not have any properties associated with it. We will need to
|
||||||
|
// get those properties explicitly with a 'getProperties' service request.
|
||||||
|
home = user.Home_folder;
|
||||||
|
}
|
||||||
|
catch (NotLoadedException e)
|
||||||
|
{
|
||||||
|
Console.Out.WriteLine(e.Message);
|
||||||
|
Console.Out.WriteLine("The Object Property Policy ($TC_DATA/soa/policies/Default.xml) is not configured with this property.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ModelObject[] objects = { home };
|
||||||
|
String[] attributes = { "contents" };
|
||||||
|
|
||||||
|
// *****************************
|
||||||
|
// Execute the service operation
|
||||||
|
// *****************************
|
||||||
|
dmService.GetProperties(objects, attributes);
|
||||||
|
|
||||||
|
|
||||||
|
// The above getProperties call returns a ServiceData object, but it
|
||||||
|
// just has pointers to the same object we passed into the method, so the
|
||||||
|
// input object have been updated with new property values
|
||||||
|
contents = home.Contents;
|
||||||
|
}
|
||||||
|
// This should never be thrown, since we just explicitly asked for this
|
||||||
|
// property
|
||||||
|
catch (NotLoadedException /*e*/){}
|
||||||
|
|
||||||
|
Console.Out.WriteLine("");
|
||||||
|
Console.Out.WriteLine("Home Folder:");
|
||||||
|
Session.printObjects( contents );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,112 @@
|
|||||||
|
//==================================================
|
||||||
|
//
|
||||||
|
// @<COPYRIGHT>@
|
||||||
|
//
|
||||||
|
//==================================================
|
||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
|
using Teamcenter.ClientX;
|
||||||
|
using Teamcenter.Schemas.Soa._2006_03.Exceptions;
|
||||||
|
|
||||||
|
//Include the Saved Query Service Interface
|
||||||
|
using Teamcenter.Services.Strong.Query;
|
||||||
|
|
||||||
|
// Input and output structures for the service operations
|
||||||
|
// Note: the different namespace from the service interface
|
||||||
|
using Teamcenter.Services.Strong.Query._2006_03.SavedQuery;
|
||||||
|
|
||||||
|
using ImanQuery = Teamcenter.Soa.Client.Model.Strong.ImanQuery;
|
||||||
|
|
||||||
|
|
||||||
|
namespace Teamcenter.Hello
|
||||||
|
{
|
||||||
|
public class Query
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a simple query of the database
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void queryItems()
|
||||||
|
{
|
||||||
|
|
||||||
|
ImanQuery query = null;
|
||||||
|
|
||||||
|
// Get the service stub
|
||||||
|
SavedQueryService queryService = SavedQueryService.getService(Session.getConnection());
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
// *****************************
|
||||||
|
// Execute the service operation
|
||||||
|
// *****************************
|
||||||
|
GetSavedQueriesResponse savedQueries = queryService.GetSavedQueries();
|
||||||
|
|
||||||
|
|
||||||
|
if (savedQueries.Queries.Length == 0)
|
||||||
|
{
|
||||||
|
Console.Out.WriteLine("There are no saved queries in the system.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find one called 'Item Name'
|
||||||
|
for (int i = 0; i < savedQueries.Queries.Length; i++)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (savedQueries.Queries[i].Name.Equals("Item Name"))
|
||||||
|
{
|
||||||
|
query = savedQueries.Queries[i].Query;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (ServiceException e)
|
||||||
|
{
|
||||||
|
Console.Out.WriteLine("GetSavedQueries service request failed.");
|
||||||
|
Console.Out.WriteLine(e.Message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (query == null)
|
||||||
|
{
|
||||||
|
Console.WriteLine("There is not an 'Item Name' query.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Search for all Items, returning a maximum of 25 objects
|
||||||
|
Teamcenter.Services.Strong.Query._2007_06.SavedQuery.SavedQueryInput[] savedQueryInput = new Teamcenter.Services.Strong.Query._2007_06.SavedQuery.SavedQueryInput[1];
|
||||||
|
savedQueryInput[0] = new Teamcenter.Services.Strong.Query._2007_06.SavedQuery.SavedQueryInput();
|
||||||
|
savedQueryInput[0].Query = query;
|
||||||
|
savedQueryInput[0].MaxNumToReturn = 25;
|
||||||
|
savedQueryInput[0].LimitListCount = 0;
|
||||||
|
savedQueryInput[0].LimitList = new Teamcenter.Soa.Client.Model.ModelObject[0];
|
||||||
|
savedQueryInput[0].Entries = new String[] { "Item Name" };
|
||||||
|
savedQueryInput[0].Values = new String[1];
|
||||||
|
savedQueryInput[0].Values[0] = "*";
|
||||||
|
savedQueryInput[0].MaxNumToInflate = 25;
|
||||||
|
|
||||||
|
//*****************************
|
||||||
|
//Execute the service operation
|
||||||
|
//*****************************
|
||||||
|
Teamcenter.Services.Strong.Query._2007_06.SavedQuery.ExecuteSavedQueriesResponse savedQueryResult = queryService.ExecuteSavedQueries(savedQueryInput);
|
||||||
|
|
||||||
|
Teamcenter.Services.Strong.Query._2007_06.SavedQuery.SavedQueryResults found = savedQueryResult.ArrayOfResults[0];
|
||||||
|
|
||||||
|
System.Console.Out.WriteLine("");
|
||||||
|
System.Console.Out.WriteLine("Found Items:");
|
||||||
|
Teamcenter.ClientX.Session.printObjects( found.Objects );
|
||||||
|
}
|
||||||
|
catch (ServiceException e)
|
||||||
|
{
|
||||||
|
Console.Out.WriteLine("ExecuteSavedQuery service request failed.");
|
||||||
|
Console.Out.WriteLine(e.Message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<PublishUrlHistory>publish\</PublishUrlHistory>
|
||||||
|
<InstallUrlHistory>
|
||||||
|
</InstallUrlHistory>
|
||||||
|
<SupportUrlHistory>
|
||||||
|
</SupportUrlHistory>
|
||||||
|
<UpdateUrlHistory>
|
||||||
|
</UpdateUrlHistory>
|
||||||
|
<BootstrapperUrlHistory>
|
||||||
|
</BootstrapperUrlHistory>
|
||||||
|
<ErrorReportUrlHistory>
|
||||||
|
</ErrorReportUrlHistory>
|
||||||
|
<FallbackCulture>zh-CN</FallbackCulture>
|
||||||
|
<VerifyUploadedFiles>false</VerifyUploadedFiles>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
@ -0,0 +1,41 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using Autodesk.AutoCAD.DatabaseServices;
|
||||||
|
using Autodesk.AutoCAD.Runtime;
|
||||||
|
using Autodesk.AutoCAD.Geometry;
|
||||||
|
using Autodesk.AutoCAD.ApplicationServices;
|
||||||
|
using Autodesk.AutoCAD.EditorInput;
|
||||||
|
using Autodesk.AutoCAD.Windows;
|
||||||
|
using HelloTeamcenter.hello;
|
||||||
|
|
||||||
|
// General Information about an assembly is controlled through the following
|
||||||
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
// associated with an assembly.
|
||||||
|
[assembly: AssemblyTitle("HelloTeamcenter")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("Siemens Product Lifecycle Management Software Inc.")]
|
||||||
|
[assembly: AssemblyProduct("HelloTeamcenter")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright 2008 Siemens Product Lifecycle Management Software Inc.")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid("6ce4adbe-4247-464b-8d53-e3ecb88955fd")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
@ -0,0 +1,145 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
|
<data name="autocad_01" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\res\autocad_01.ico;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="FOLDER" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\res\FOLDER.ICO;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="FOLDEROP" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\res\FOLDEROP.ICO;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="item" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\res\item.ico;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="itemrev" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\res\itemrev.ico;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="login" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\res\login.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="Newstuff_Folder" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\res\Newstuff_Folder.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="tai" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\res\tai.ico;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
@ -0,0 +1,3 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<configuration>
|
||||||
|
<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>
|
@ -0,0 +1,146 @@
|
|||||||
|
//==================================================
|
||||||
|
//
|
||||||
|
// @<COPYRIGHT>@
|
||||||
|
//
|
||||||
|
//==================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
using Teamcenter.Schemas.Soa._2006_03.Exceptions;
|
||||||
|
using Teamcenter.Soa;
|
||||||
|
using Teamcenter.Soa.Common;
|
||||||
|
using Teamcenter.Soa.Client;
|
||||||
|
using Teamcenter.Soa.Exceptions;
|
||||||
|
|
||||||
|
namespace Teamcenter.ClientX
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The CredentialManager is used by the Teamcenter Services framework to get the
|
||||||
|
* user's credentials when challanged by the server. This can occur after a period
|
||||||
|
* of inactivity and the server has timed-out the user's session, at which time
|
||||||
|
* the client application will need to re-authenitcate. The framework will
|
||||||
|
* call one of the getCredentials methods (depending on circumstances) and will
|
||||||
|
* send the SessionService.login service request. Upon successfull completion of
|
||||||
|
* the login service request. The last service request (one that cuased the challange)
|
||||||
|
* will be resent.
|
||||||
|
*
|
||||||
|
* The framework will also call the setUserPassword setGroupRole methods when ever
|
||||||
|
* these credentials change, thus allowing this implementation of the CredentialManager
|
||||||
|
* to cache these values so prompting of the user is not requried for re-authentication.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class AppXCredentialManager : CredentialManager
|
||||||
|
{
|
||||||
|
|
||||||
|
private String name = null;
|
||||||
|
private String password = null;
|
||||||
|
private String group = ""; // default group
|
||||||
|
private String role = ""; // default role
|
||||||
|
private String discriminator = "SoaAppX"; // always connect same user
|
||||||
|
// to same instance of server
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the type of credentials this implementation provides,
|
||||||
|
* standard (user/password) or Single-Sign-On. In this case
|
||||||
|
* Standard credentials are returned.
|
||||||
|
*
|
||||||
|
* @see com.teamcenter.soa.client.CredentialManager#getCredentialType()
|
||||||
|
*/
|
||||||
|
public int CredentialType
|
||||||
|
{
|
||||||
|
get { return SoaConstants.CLIENT_CREDENTIAL_TYPE_STD; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prompt's the user for credentials.
|
||||||
|
* This method will only be called by the framework when a login attempt has
|
||||||
|
* failed.
|
||||||
|
*
|
||||||
|
* @see com.teamcenter.soa.client.CredentialManager#getCredentials(com.teamcenter.schemas.soa._2006_03.exceptions.InvalidCredentialsException)
|
||||||
|
*/
|
||||||
|
public string[] GetCredentials(InvalidCredentialsException e)
|
||||||
|
//throws CanceledOperationException
|
||||||
|
{
|
||||||
|
Console.WriteLine(e.Message);
|
||||||
|
return PromptForCredentials();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the cached credentials.
|
||||||
|
* This method will be called when a service request is sent without a valid
|
||||||
|
* session ( session has expired on the server).
|
||||||
|
*
|
||||||
|
* @see com.teamcenter.soa.client.CredentialManager#getCredentials(com.teamcenter.schemas.soa._2006_03.exceptions.InvalidUserException)
|
||||||
|
*/
|
||||||
|
public String[] GetCredentials(InvalidUserException e)
|
||||||
|
//throws CanceledOperationException
|
||||||
|
{
|
||||||
|
// Have not logged in yet, shoult not happen but just in case
|
||||||
|
if (name == null) return PromptForCredentials();
|
||||||
|
|
||||||
|
// Return cached credentials
|
||||||
|
String[] tokens = { name, password, group, role, discriminator };
|
||||||
|
return tokens;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cache the group and role
|
||||||
|
* This is called after the SessionService.setSessionGroupMember service
|
||||||
|
* operation is called.
|
||||||
|
*
|
||||||
|
* @see com.teamcenter.soa.client.CredentialManager#setGroupRole(java.lang.String,
|
||||||
|
* java.lang.String)
|
||||||
|
*/
|
||||||
|
public void SetGroupRole(String group, String role)
|
||||||
|
{
|
||||||
|
this.group = group;
|
||||||
|
this.role = role;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cache the User and Password
|
||||||
|
* This is called after the SessionService.login service operation is called.
|
||||||
|
*
|
||||||
|
* @see com.teamcenter.soa.client.CredentialManager#setUserPassword(java.lang.String,
|
||||||
|
* java.lang.String, java.lang.String)
|
||||||
|
*/
|
||||||
|
public void SetUserPassword(String user, String password, String discriminator)
|
||||||
|
{
|
||||||
|
this.name = user;
|
||||||
|
this.password = password;
|
||||||
|
this.discriminator = discriminator;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String[] PromptForCredentials()
|
||||||
|
//throws CanceledOperationException
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Console.WriteLine("Please enter user credentials (return to quit):");
|
||||||
|
Console.Write("User Name: ");
|
||||||
|
name = Console.ReadLine();
|
||||||
|
|
||||||
|
if (name.Length == 0)
|
||||||
|
throw new CanceledOperationException("");
|
||||||
|
|
||||||
|
Console.Write("Password: ");
|
||||||
|
password = Console.ReadLine();
|
||||||
|
}
|
||||||
|
catch (IOException e)
|
||||||
|
{
|
||||||
|
String message = "Failed to get the name and password.\n" + e.Message;
|
||||||
|
Console.WriteLine(message);
|
||||||
|
throw new CanceledOperationException(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
String[] tokens = { name, password, group, role, discriminator };
|
||||||
|
return tokens;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
//==================================================
|
||||||
|
//
|
||||||
|
// @<COPYRIGHT>@
|
||||||
|
//
|
||||||
|
//==================================================
|
||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
|
using Teamcenter.Soa.Client.Model;
|
||||||
|
|
||||||
|
namespace Teamcenter.ClientX
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementation of the DeleteListener, simply prints out list of all objects
|
||||||
|
* that are deleted.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class AppXDeletedObjectListener : DeleteListener
|
||||||
|
{
|
||||||
|
|
||||||
|
public void ModelObjectDelete(string[] uids)
|
||||||
|
{
|
||||||
|
if (uids.Length == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
System.Console.WriteLine("");
|
||||||
|
System.Console.WriteLine("Deleted Objects handled in com.teamcenter.clientx.AppXDeletedObjectListener.modelObjectDelete");
|
||||||
|
System.Console.WriteLine("The following objects have been deleted from the server and removed from the client data model:");
|
||||||
|
for (int i = 0; i < uids.Length; i++)
|
||||||
|
{
|
||||||
|
System.Console.WriteLine(" " + uids[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,101 @@
|
|||||||
|
//==================================================
|
||||||
|
//
|
||||||
|
// @<COPYRIGHT>@
|
||||||
|
//
|
||||||
|
//==================================================
|
||||||
|
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
using Teamcenter.Schemas.Soa._2006_03.Exceptions;
|
||||||
|
using Teamcenter.Soa.Client;
|
||||||
|
using Teamcenter.Soa.Exceptions;
|
||||||
|
|
||||||
|
namespace Teamcenter.ClientX
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementation of the ExceptionHandler. For ConnectionExceptions (server
|
||||||
|
* temporarily down .etc) prompts the user to retry the last request. For other
|
||||||
|
* exceptions convert to a RunTime exception.
|
||||||
|
*/
|
||||||
|
public class AppXExceptionHandler : ExceptionHandler
|
||||||
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
|
* @see com.teamcenter.soa.client.ExceptionHandler#handleException(com.teamcenter.schemas.soa._2006_03.exceptions.InternalServerException)
|
||||||
|
*/
|
||||||
|
public void HandleException(InternalServerException ise)
|
||||||
|
{
|
||||||
|
Console.WriteLine("");
|
||||||
|
Console.WriteLine("*****");
|
||||||
|
Console.WriteLine("Exception caught in com.teamcenter.clientx.AppXExceptionHandler.handleException(InternalServerException).");
|
||||||
|
|
||||||
|
|
||||||
|
if (ise is ConnectionException)
|
||||||
|
{
|
||||||
|
// ConnectionException are typically due to a network error (server
|
||||||
|
// down .etc) and can be recovered from (the last request can be sent again,
|
||||||
|
// after the problem is corrected).
|
||||||
|
Console.Write("\nThe server returned an connection error.\n" + ise.Message
|
||||||
|
+ "\nDo you wish to retry the last service request?[y/n]");
|
||||||
|
}
|
||||||
|
else if (ise is ProtocolException)
|
||||||
|
{
|
||||||
|
// ProtocolException are typically due to programming errors
|
||||||
|
// (content of HTTP
|
||||||
|
// request is incorrect). These are generally can not be
|
||||||
|
// recovered from.
|
||||||
|
Console.Write("\nThe server returned an protocol error.\n" + ise.Message
|
||||||
|
+ "\nThis is most likely the result of a programming error."
|
||||||
|
+ "\nDo you wish to retry the last service request?[y/n]");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("\nThe server returned an internal server error.\n"
|
||||||
|
+ ise.Message
|
||||||
|
+ "\nThis is most likely the result of a programming error."
|
||||||
|
+ "\nA RuntimeException will be thrown.");
|
||||||
|
throw new SystemException(ise.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
String retry = Console.ReadLine();
|
||||||
|
// If yes, return to the calling SOA client framework, where the
|
||||||
|
// last service request will be resent.
|
||||||
|
if (retry.ToLower().Equals("y") || retry.ToLower().Equals("yes"))
|
||||||
|
return;
|
||||||
|
|
||||||
|
throw new SystemException("The user has opted not to retry the last request");
|
||||||
|
}
|
||||||
|
catch (IOException e)
|
||||||
|
{
|
||||||
|
Console.Error.WriteLine("Failed to read user response.\nA RuntimeException will be thrown.");
|
||||||
|
throw new SystemException(e.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
|
* @see com.teamcenter.soa.client.ExceptionHandler#handleException(com.teamcenter.soa.exceptions.CanceledOperationException)
|
||||||
|
*/
|
||||||
|
public void HandleException(CanceledOperationException coe)
|
||||||
|
{
|
||||||
|
Console.WriteLine("");
|
||||||
|
Console.WriteLine("*****");
|
||||||
|
Console.WriteLine("Exception caught in com.teamcenter.clientx.AppXExceptionHandler.handleException(CanceledOperationException).");
|
||||||
|
|
||||||
|
// Expecting this from the login tests with bad credentials, and the
|
||||||
|
// AnyUserCredentials class not
|
||||||
|
// prompting for different credentials
|
||||||
|
throw new SystemException(coe.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,68 @@
|
|||||||
|
//==================================================
|
||||||
|
//
|
||||||
|
// @<COPYRIGHT>@
|
||||||
|
//
|
||||||
|
//==================================================
|
||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
|
using Teamcenter.Soa.Client.Model;
|
||||||
|
|
||||||
|
|
||||||
|
namespace Teamcenter.ClientX
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementation of the PartialErrorListener. Print out any partial errors
|
||||||
|
* returned.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class AppXPartialErrorListener : PartialErrorListener
|
||||||
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
|
* @see com.teamcenter.soa.client.model.PartialErrorListener#handlePartialError(com.teamcenter.soa.client.model.ErrorStack[])
|
||||||
|
*/
|
||||||
|
public void HandlePartialError(ErrorStack[] stacks)
|
||||||
|
{
|
||||||
|
if (stacks.Length == 0) return;
|
||||||
|
|
||||||
|
Console.WriteLine("");
|
||||||
|
Console.WriteLine("*****");
|
||||||
|
Console.WriteLine("Partial Errors caught in com.teamcenter.clientx.AppXPartialErrorListener.");
|
||||||
|
|
||||||
|
|
||||||
|
for (int i = 0; i < stacks.Length; i++)
|
||||||
|
{
|
||||||
|
ErrorValue[] errors = stacks[i].ErrorValues;
|
||||||
|
Console.Write("Partial Error for ");
|
||||||
|
|
||||||
|
// The different service implementation may optionally associate
|
||||||
|
// an ModelObject, client ID, or nothing, with each partial error
|
||||||
|
if (stacks[i].HasAssociatedObject() )
|
||||||
|
{
|
||||||
|
Console.WriteLine("object "+ stacks[i].AssociatedObject.Uid);
|
||||||
|
}
|
||||||
|
else if (stacks[i].HasClientId())
|
||||||
|
{
|
||||||
|
Console.WriteLine("client id "+ stacks[i].ClientId);
|
||||||
|
}
|
||||||
|
else if (stacks[i].HasClientIndex())
|
||||||
|
{
|
||||||
|
Console.WriteLine("client index " + stacks[i].ClientIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Each Partial Error will have one or more contributing error messages
|
||||||
|
for (int j = 0; j < errors.Length; j++)
|
||||||
|
{
|
||||||
|
Console.WriteLine(" Code: " + errors[j].Code + "\tSeverity: "
|
||||||
|
+ errors[j].Level + "\t" + errors[j].Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
//==================================================
|
||||||
|
//
|
||||||
|
// @<COPYRIGHT>@
|
||||||
|
//
|
||||||
|
//==================================================
|
||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
|
using Teamcenter.Soa.Client;
|
||||||
|
|
||||||
|
|
||||||
|
namespace Teamcenter.ClientX
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This implemenation of the RequestListener, logs each service request
|
||||||
|
* to the console.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class AppXRequestListener : RequestListener
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called before each request is sent to the server.
|
||||||
|
*/
|
||||||
|
public void ServiceRequest(ServiceInfo info)
|
||||||
|
{
|
||||||
|
// will log the service name when done
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called after each response from the server.
|
||||||
|
* Log the service operation to the console.
|
||||||
|
*/
|
||||||
|
public void ServiceResponse(ServiceInfo info)
|
||||||
|
{
|
||||||
|
Console.WriteLine(info.Id + ": " + info.Service + "." + info.Operation);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,48 @@
|
|||||||
|
//==================================================
|
||||||
|
//
|
||||||
|
// @<COPYRIGHT>@
|
||||||
|
//
|
||||||
|
//==================================================
|
||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
|
using Teamcenter.Soa.Client.Model;
|
||||||
|
using Teamcenter.Soa.Exceptions;
|
||||||
|
|
||||||
|
namespace Teamcenter.ClientX
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementation of the ChangeListener. Print out all objects that have been updated.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class AppXUpdateObjectListener : ChangeListener
|
||||||
|
{
|
||||||
|
|
||||||
|
public void ModelObjectChange(ModelObject[] objects)
|
||||||
|
{
|
||||||
|
if (objects.Length == 0) return;
|
||||||
|
System.Console.WriteLine("");
|
||||||
|
System.Console.WriteLine("Modified Objects handled in com.teamcenter.clientx.AppXUpdateObjectListener.modelObjectChange");
|
||||||
|
System.Console.WriteLine("The following objects have been updated in the client data model:");
|
||||||
|
for (int i = 0; i < objects.Length; i++)
|
||||||
|
{
|
||||||
|
String uid = objects[i].Uid;
|
||||||
|
String type = objects[i].GetType().Name;
|
||||||
|
String name = "";
|
||||||
|
if (objects[i].GetType().Name.Equals("WorkspaceObject"))
|
||||||
|
{
|
||||||
|
ModelObject wo = objects[i];
|
||||||
|
try
|
||||||
|
{
|
||||||
|
name = wo.GetProperty("object_string").StringValue;
|
||||||
|
}
|
||||||
|
catch (NotLoadedException /*e*/) {} // just ignore
|
||||||
|
}
|
||||||
|
System.Console.WriteLine(" " + uid + " " + type + " " + name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,278 @@
|
|||||||
|
//==================================================
|
||||||
|
//
|
||||||
|
// @<COPYRIGHT>@
|
||||||
|
//
|
||||||
|
//==================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Net;
|
||||||
|
|
||||||
|
using Teamcenter.Schemas.Soa._2006_03.Exceptions;
|
||||||
|
using Teamcenter.Services.Strong.Core;
|
||||||
|
using Teamcenter.Services.Strong.Core._2006_03.Session;
|
||||||
|
using Teamcenter.Soa;
|
||||||
|
using Teamcenter.Soa.Client;
|
||||||
|
using Teamcenter.Soa.Client.Model;
|
||||||
|
using Teamcenter.Soa.Exceptions;
|
||||||
|
|
||||||
|
using WorkspaceObject = Teamcenter.Soa.Client.Model.Strong.WorkspaceObject;
|
||||||
|
using User = Teamcenter.Soa.Client.Model.Strong.User;
|
||||||
|
|
||||||
|
namespace Teamcenter.ClientX
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public class Session
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Single instance of the Connection object that is shared throughtout
|
||||||
|
* the application. This Connection object is needed whenever a Service
|
||||||
|
* stub is instantiated.
|
||||||
|
*/
|
||||||
|
private static Connection connection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The credentialManager is used both by the Session class and the Teamcenter
|
||||||
|
* Services Framework to get user credentials.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static AppXCredentialManager credentialManager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an instance of the Session with a connection to the specified
|
||||||
|
* server.
|
||||||
|
*
|
||||||
|
* Add implementations of the ExceptionHandler, PartialErrorListener,
|
||||||
|
* ChangeListener, and DeleteListeners.
|
||||||
|
*
|
||||||
|
* @param host Address of the host to connect to, http://serverName:port/tc
|
||||||
|
*/
|
||||||
|
public Session(String host)
|
||||||
|
{
|
||||||
|
// Create an instance of the CredentialManager, this is used
|
||||||
|
// by the SOA Framework to get the user's credentials when
|
||||||
|
// challanged by the server (sesioin timeout on the web tier).
|
||||||
|
credentialManager = new AppXCredentialManager();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Create the Connection object, no contact is made with the server
|
||||||
|
// until a service request is made
|
||||||
|
connection = new Connection(host, new CookieCollection(), credentialManager, SoaConstants.REST,
|
||||||
|
SoaConstants.HTTP, false);
|
||||||
|
|
||||||
|
|
||||||
|
// Add an ExceptionHandler to the Connection, this will handle any
|
||||||
|
// InternalServerException, communication errors, xml marshalling errors
|
||||||
|
// .etc
|
||||||
|
connection.ExceptionHandler = new AppXExceptionHandler();
|
||||||
|
|
||||||
|
// While the above ExceptionHandler is required, all of the following
|
||||||
|
// Listeners are optional. Client application can add as many or as few Listeners
|
||||||
|
// of each type that they want.
|
||||||
|
|
||||||
|
// Add a Partial Error Listener, this will be notified when ever a
|
||||||
|
// a service returns partial errors.
|
||||||
|
connection.ModelManager.AddPartialErrorListener(new AppXPartialErrorListener());
|
||||||
|
|
||||||
|
// Add a Change Listener, this will be notified when ever a
|
||||||
|
// a service returns model objects that have been updated.
|
||||||
|
connection.ModelManager.AddChangeListener(new AppXUpdateObjectListener());
|
||||||
|
|
||||||
|
// Add a Delete Listener, this will be notified when ever a
|
||||||
|
// a service returns objects that have been deleted.
|
||||||
|
connection.ModelManager.AddDeleteListener(new AppXDeletedObjectListener());
|
||||||
|
|
||||||
|
// Add a Request Listener, this will be notified before and after each
|
||||||
|
// service request is sent to the server.
|
||||||
|
Connection.AddRequestListener(new AppXRequestListener());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the single Connection object for the application
|
||||||
|
*
|
||||||
|
* @return connection
|
||||||
|
*/
|
||||||
|
public static Connection getConnection()
|
||||||
|
{
|
||||||
|
return connection;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Login to the Teamcenter Server
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public User login()
|
||||||
|
{
|
||||||
|
// Get the service stub
|
||||||
|
SessionService sessionService = SessionService.getService(connection);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Prompt for credentials until they are right, or until user
|
||||||
|
// cancels
|
||||||
|
String[] credentials = credentialManager.PromptForCredentials();
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
// *****************************
|
||||||
|
// Execute the service operation
|
||||||
|
// *****************************
|
||||||
|
LoginResponse resp = sessionService.Login(credentials[0], credentials[1],
|
||||||
|
credentials[2], credentials[3],"",credentials[4]);
|
||||||
|
|
||||||
|
return resp.User;
|
||||||
|
}
|
||||||
|
catch (InvalidCredentialsException e)
|
||||||
|
{
|
||||||
|
credentials = credentialManager.GetCredentials(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// User canceled the operation, don't need to tell him again
|
||||||
|
catch (CanceledOperationException /*e*/) {}
|
||||||
|
|
||||||
|
// Exit the application
|
||||||
|
//System.exit(0);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
public User mylogin(string username,string password,string usergroup,string userrole)
|
||||||
|
{
|
||||||
|
// Get the service stub
|
||||||
|
SessionService sessionService = SessionService.getService(connection);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
// *****************************
|
||||||
|
// Execute the service operation
|
||||||
|
// *****************************
|
||||||
|
LoginResponse resp = sessionService.Login(username, password,
|
||||||
|
usergroup, userrole, "", "");
|
||||||
|
|
||||||
|
return resp.User;
|
||||||
|
}
|
||||||
|
catch (InvalidCredentialsException e)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// User canceled the operation, don't need to tell him again
|
||||||
|
catch (CanceledOperationException /*e*/) { }
|
||||||
|
|
||||||
|
// Exit the application
|
||||||
|
//System.exit(0);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Terminate the session with the Teamcenter Server
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void logout()
|
||||||
|
{
|
||||||
|
// Get the service stub
|
||||||
|
SessionService sessionService = SessionService.getService(connection);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// *****************************
|
||||||
|
// Execute the service operation
|
||||||
|
// *****************************
|
||||||
|
sessionService.Logout();
|
||||||
|
}
|
||||||
|
catch (ServiceException /*e*/) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print some basic information for a list of objects
|
||||||
|
*
|
||||||
|
* @param objects
|
||||||
|
*/
|
||||||
|
public static void printObjects(ModelObject[] objects)
|
||||||
|
{
|
||||||
|
if(objects == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
// Ensure that the referenced User objects that we will use below are loaded
|
||||||
|
getUsers( objects );
|
||||||
|
|
||||||
|
Console.WriteLine("Name\t\tOwner\t\tLast Modified");
|
||||||
|
Console.WriteLine("====\t\t=====\t\t=============");
|
||||||
|
for (int i = 0; i < objects.Length; i++)
|
||||||
|
{
|
||||||
|
if(!(objects[i] is WorkspaceObject ))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
WorkspaceObject wo = (WorkspaceObject)objects[i];
|
||||||
|
try
|
||||||
|
{
|
||||||
|
String name = wo.Object_string;
|
||||||
|
User owner = (User) wo.Owning_user;
|
||||||
|
DateTime lastModified =wo.Last_mod_date;
|
||||||
|
|
||||||
|
Console.WriteLine(name + "\t" + owner.User_name + "\t" + lastModified.ToString());
|
||||||
|
}
|
||||||
|
catch (NotLoadedException e)
|
||||||
|
{
|
||||||
|
// Print out a message, and skip to the next item in the folder
|
||||||
|
// Could do a DataManagementService.getProperties call at this point
|
||||||
|
Console.WriteLine(e.Message);
|
||||||
|
Console.WriteLine("The Object Property Policy ($TC_DATA/soa/policies/Default.xml) is not configured with this property.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static void getUsers(ModelObject[] objects)
|
||||||
|
{
|
||||||
|
if(objects == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
DataManagementService dmService = DataManagementService.getService(Session.getConnection());
|
||||||
|
ArrayList unKnownUsers = new ArrayList();
|
||||||
|
for (int i = 0; i < objects.Length; i++)
|
||||||
|
{
|
||||||
|
if(!(objects[i] is WorkspaceObject ))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
WorkspaceObject wo = (WorkspaceObject)objects[i];
|
||||||
|
|
||||||
|
User owner = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
owner = (User) wo.Owning_user;
|
||||||
|
String userName = owner.User_name;
|
||||||
|
}
|
||||||
|
catch (NotLoadedException /*e*/)
|
||||||
|
{
|
||||||
|
if(owner != null)
|
||||||
|
unKnownUsers.Add(owner);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
User[] users = new User[unKnownUsers.Count];
|
||||||
|
unKnownUsers.CopyTo( users );
|
||||||
|
String[] attributes = { "user_name" };
|
||||||
|
|
||||||
|
|
||||||
|
// *****************************
|
||||||
|
// Execute the service operation
|
||||||
|
// *****************************
|
||||||
|
dmService.GetProperties(users, attributes);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,134 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
AAABAAEAECAAAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
|
||||||
|
AAD///8A///////////0bm5ubm5ub/Rs6IjoiEzv9G6Pd4d3Tm/0bP/3f/dM7/Ru/45v905v9Gz/jO/3
|
||||||
|
TO/0bn/2b/dOb/Rs5///90zv9G5ubm/3Tm/0bPeIf/bs7/Rub///fm5v9Gzs53zs7O/0xsbGxsbGz/RE
|
||||||
|
RERERERP//////////8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA
|
||||||
|
//8AAP//AAD//wAA//8AAP//
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
@ -0,0 +1,212 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<data name="imageList1.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>
|
||||||
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
|
||||||
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABq
|
||||||
|
EAAAAk1TRnQBSQFMAgEBCAEAARQBAAEUAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||||
|
AwABQAMAATADA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+wEHAf8G7AEA
|
||||||
|
AnoCoAJ6AVkB+wE4AXkHAAGzAdsB3AcJAfQBCQHcAdsBvAEAAewBBwH7AQcB+wEHAewKAAHsBf8B7AcA
|
||||||
|
AnoBWQLlAcMBegJZAZkHAAG5CRkB9AMZAfACAAXsDAAF7AkAAfABGgFSAlkCegFTAXkRAAHwKAAC8AoA
|
||||||
|
AUIBTQE+BwABPgMAASgDAAFAAwABMAMAAQEBAAEBBQABgAEBFgAD/4EAAv8CAAT/Af4BHwIAAecB/wHA
|
||||||
|
AQMB4AEPAgABwAE/AcABAwGAAQECAAHAAQMBwAEDAYADAAHAAQMBwAEDAYADAAHAAQMBwAEDAYADAAHA
|
||||||
|
AQEBwAEDBAABwAEBAYABAQQAAcABAQHAAQEEAAHAAQEB4AEDAQABBwIAAcABAQHwAQcBAAEPAgABgAED
|
||||||
|
AfgBBwHAAQ8CAAHAAQMB/AEHAeABDwIAAcAB4wH+AScB4AEfAgABwQL/AWcB8AF/AgAB9wP/AYABAQX/
|
||||||
|
AYcBgAEABP8B/AEDAYABAAGAAQEB4AEAAeABAQGAAgABAQHAAgABAQGAAgABAQHAAgABAQGAAgABAQGA
|
||||||
|
AgABAQGAAgABAQGAAgABAQGAAgABAQMAAQEBgAIAAQEDAAEBAYACAAEBAwABDwGAAgABAQGAAgABPwGA
|
||||||
|
AgABAQGAAgABPwGAAgABAwGAAQEBAAE/AYABAAGAAf8BwAF/AQABPwGAAQABwQH/AeAB/wGAAT8B/wHv
|
||||||
|
BP8B8wH/Cw==
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
AAABAAEAECAAAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
|
||||||
|
AAD///8A///////////0bm5ubm5ub/Rs6IjoiEzv9G6Pd4d3Tm/0bP/3f/dM7/Ru/45v905v9Gz/jO/3
|
||||||
|
TO/0bn/2b/dOb/Rs5///90zv9G5ubm/3Tm/0bPeIf/bs7/Rub///fm5v9Gzs53zs7O/0xsbGxsbGz/RE
|
||||||
|
RERERERP//////////8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA
|
||||||
|
//8AAP//AAD//wAA//8AAP//
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
@ -0,0 +1,212 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<data name="imageList1.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>
|
||||||
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
|
||||||
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABq
|
||||||
|
EAAAAk1TRnQBSQFMAgEBCAEAARwBAAEcAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||||
|
AwABQAMAATADAAEBAQABCAYAAQwYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||||
|
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQ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AcMBegJZAZkHAAG5CRkB9AMZAfACAAXsDAAF7AkAAfABGgFSAlkCegFTAXkRAAHwKAAC8AoA
|
||||||
|
AUIBTQE+BwABPgMAASgDAAFAAwABMAMAAQEBAAEBBQABgAEBFgAD/4EAAv8CAAT/Af4BHwIAAecB/wHA
|
||||||
|
AQMB4AEPAgABwAE/AcABAwGAAQECAAHAAQMBwAEDAYADAAHAAQMBwAEDAYADAAHAAQMBwAEDAYADAAHA
|
||||||
|
AQEBwAEDBAABwAEBAYABAQQAAcABAQHAAQEEAAHAAQEB4AEDAQABBwIAAcABAQHwAQcBAAEPAgABgAED
|
||||||
|
AfgBBwHAAQ8CAAHAAQMB/AEHAeABDwIAAcAB4wH+AScB4AEfAgABwQL/AWcB8AF/AgAB9wP/AYABAQX/
|
||||||
|
AYcBgAEABP8B/AEDAYABAAGAAQEB4AEAAeABAQGAAgABAQHAAgABAQGAAgABAQHAAgABAQGAAgABAQGA
|
||||||
|
AgABAQGAAgABAQGAAgABAQGAAgABAQMAAQEBgAIAAQEDAAEBAYACAAEBAwABDwGAAgABAQGAAgABPwGA
|
||||||
|
AgABAQGAAgABPwGAAgABAwGAAQEBAAE/AYABAAGAAf8BwAF/AQABPwGAAQABwQH/AeAB/wGAAT8B/wHv
|
||||||
|
BP8B8wH/Cw==
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
AAABAAEAECAAAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
|
||||||
|
AAD///8A///////////0bm5ubm5ub/Rs6IjoiEzv9G6Pd4d3Tm/0bP/3f/dM7/Ru/45v905v9Gz/jO/3
|
||||||
|
TO/0bn/2b/dOb/Rs5///90zv9G5ubm/3Tm/0bPeIf/bs7/Rub///fm5v9Gzs53zs7O/0xsbGxsbGz/RE
|
||||||
|
RERERERP//////////8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA
|
||||||
|
//8AAP//AAD//wAA//8AAP//
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
@ -0,0 +1,212 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<data name="imageList1.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>
|
||||||
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
|
||||||
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABq
|
||||||
|
EAAAAk1TRnQBSQFMAgEBCAEAARwBAAEcAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||||
|
AwABQAMAATADAAEBAQABCAYAAQwYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||||
|
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||||
|
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||||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gAEBFgAD/4EAAv8CAAT/Af4BHwIAAecB/wHA
|
||||||
|
AQMB4AEPAgABwAE/AcABAwGAAQECAAHAAQMBwAEDAYADAAHAAQMBwAEDAYADAAHAAQMBwAEDAYADAAHA
|
||||||
|
AQEBwAEDBAABwAEBAYABAQQAAcABAQHAAQEEAAHAAQEB4AEDAQABBwIAAcABAQHwAQcBAAEPAgABgAED
|
||||||
|
AfgBBwHAAQ8CAAHAAQMB/AEHAeABDwIAAcAB4wH+AScB4AEfAgABwQL/AWcB8AF/AgAB9wP/AYABAQX/
|
||||||
|
AYcBgAEABP8B/AEDAYABAAGAAQEB4AEAAeABAQGAAgABAQHAAgABAQGAAgABAQHAAgABAQGAAgABAQGA
|
||||||
|
AgABAQGAAgABAQGAAgABAQGAAgABAQMAAQEBgAIAAQEDAAEBAYACAAEBAwABDwGAAgABAQGAAgABPwGA
|
||||||
|
AgABAQGAAgABPwGAAgABAwGAAQEBAAE/AYABAAGAAf8BwAF/AQABPwGAAQABwQH/AeAB/wGAAT8B/wHv
|
||||||
|
BP8B8wH/Cw==
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
AAABAAEAECAAAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
|
||||||
|
AAD///8A///////////0bm5ubm5ub/Rs6IjoiEzv9G6Pd4d3Tm/0bP/3f/dM7/Ru/45v905v9Gz/jO/3
|
||||||
|
TO/0bn/2b/dOb/Rs5///90zv9G5ubm/3Tm/0bPeIf/bs7/Rub///fm5v9Gzs53zs7O/0xsbGxsbGz/RE
|
||||||
|
RERERERP//////////8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA
|
||||||
|
//8AAP//AAD//wAA//8AAP//
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
@ -0,0 +1,379 @@
|
|||||||
|
//==================================================
|
||||||
|
//
|
||||||
|
// @<COPYRIGHT>@
|
||||||
|
//
|
||||||
|
//==================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
|
||||||
|
using Teamcenter.ClientX;
|
||||||
|
using Teamcenter.Schemas.Soa._2006_03.Exceptions;
|
||||||
|
|
||||||
|
// Include the Data Management Service Interface
|
||||||
|
using Teamcenter.Services.Strong.Core;
|
||||||
|
|
||||||
|
// Input and output structures for the service operations
|
||||||
|
// Note: the different namespace from the service interface
|
||||||
|
using Teamcenter.Services.Strong.Core._2006_03.DataManagement;
|
||||||
|
using Teamcenter.Services.Strong.Core._2007_01.DataManagement;
|
||||||
|
using Teamcenter.Soa.Client.Model;
|
||||||
|
using Teamcenter.Soa.Exceptions;
|
||||||
|
|
||||||
|
using Item = Teamcenter.Soa.Client.Model.Strong.Item;
|
||||||
|
using ItemRevision = Teamcenter.Soa.Client.Model.Strong.ItemRevision;
|
||||||
|
|
||||||
|
namespace Teamcenter.Hello
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform different operations in the DataManamentService
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class DataManagement
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a sequence of data management operations: Create Items, Revise
|
||||||
|
* the Items, and Delete the Items
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void createReviseAndDelete()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
int numberOfItems = 3;
|
||||||
|
|
||||||
|
// Reserve Item IDs and Create Items with those IDs
|
||||||
|
ItemIdsAndInitialRevisionIds[] itemIds = generateItemIds(numberOfItems, "Item");
|
||||||
|
CreateItemsOutput[] newItems = createItems(itemIds, "Item");
|
||||||
|
|
||||||
|
// Copy the Item and ItemRevision to separate arrays for further
|
||||||
|
// processing
|
||||||
|
Item[] items = new Item[newItems.Length];
|
||||||
|
ItemRevision[] itemRevs = new ItemRevision[newItems.Length];
|
||||||
|
for (int i = 0; i < items.Length; i++)
|
||||||
|
{
|
||||||
|
items[i] = newItems[i].Item;
|
||||||
|
itemRevs[i] = newItems[i].ItemRev;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reserve revision IDs and revise the Items
|
||||||
|
Hashtable allRevIds = generateRevisionIds(items);
|
||||||
|
reviseItems(allRevIds, itemRevs);
|
||||||
|
|
||||||
|
// Delete all objects created
|
||||||
|
deleteItems(items);
|
||||||
|
}
|
||||||
|
catch (ServiceException e)
|
||||||
|
{
|
||||||
|
System.Console.Out.WriteLine(e.Message );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reserve a number Item and Revision Ids
|
||||||
|
*
|
||||||
|
* @param numberOfIds Number of IDs to generate
|
||||||
|
* @param type Type of IDs to generate
|
||||||
|
*
|
||||||
|
* @return An array of Item and Revision IDs. The size of the array is equal
|
||||||
|
* to the input numberOfIds
|
||||||
|
*
|
||||||
|
* @throws ServiceException If any partial errors are returned
|
||||||
|
*/
|
||||||
|
public ItemIdsAndInitialRevisionIds[] generateItemIds(int numberOfIds, String type)
|
||||||
|
// throws ServiceException
|
||||||
|
{
|
||||||
|
// Get the service stub
|
||||||
|
DataManagementService dmService = DataManagementService.getService(Session.getConnection());
|
||||||
|
|
||||||
|
GenerateItemIdsAndInitialRevisionIdsProperties[] properties = new GenerateItemIdsAndInitialRevisionIdsProperties[1];
|
||||||
|
GenerateItemIdsAndInitialRevisionIdsProperties property = new GenerateItemIdsAndInitialRevisionIdsProperties();
|
||||||
|
|
||||||
|
property.Count = numberOfIds;
|
||||||
|
property.ItemType = type;
|
||||||
|
property.Item = null; // Not used
|
||||||
|
properties[0] = property;
|
||||||
|
|
||||||
|
// *****************************
|
||||||
|
// Execute the service operation
|
||||||
|
// *****************************
|
||||||
|
GenerateItemIdsAndInitialRevisionIdsResponse response = dmService.GenerateItemIdsAndInitialRevisionIds(properties);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// The AppXPartialErrorListener is logging the partial errors returned
|
||||||
|
// In this simple example if any partial errors occur we will throw a
|
||||||
|
// ServiceException
|
||||||
|
if (response.ServiceData.sizeOfPartialErrors() > 0)
|
||||||
|
throw new ServiceException( "DataManagementService.generateItemIdsAndInitialRevisionIds returned a partial error.");
|
||||||
|
|
||||||
|
// The return is a map of ItemIdsAndInitialRevisionIds keyed on the
|
||||||
|
// 0-based index of requested IDs. Since we only asked for IDs for one
|
||||||
|
// data type, the map key is '0'
|
||||||
|
Int32 bIkey = 0;
|
||||||
|
Hashtable allNewIds = response.OutputItemIdsAndInitialRevisionIds;
|
||||||
|
ItemIdsAndInitialRevisionIds[] myNewIds = (ItemIdsAndInitialRevisionIds[]) allNewIds[bIkey];
|
||||||
|
|
||||||
|
return myNewIds;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create Items
|
||||||
|
*
|
||||||
|
* @param itemIds Array of Item and Revision IDs
|
||||||
|
* @param itemType Type of item to create
|
||||||
|
*
|
||||||
|
* @return Set of Items and ItemRevisions
|
||||||
|
*
|
||||||
|
* @throws ServiceException If any partial errors are returned
|
||||||
|
*/
|
||||||
|
public CreateItemsOutput[] createItems(ItemIdsAndInitialRevisionIds[] itemIds, String itemType)
|
||||||
|
// throws ServiceException
|
||||||
|
{
|
||||||
|
// Get the service stub
|
||||||
|
DataManagementService dmService = DataManagementService.getService(Session.getConnection());
|
||||||
|
// Populate form type
|
||||||
|
GetItemCreationRelatedInfoResponse relatedResponse = dmService.GetItemCreationRelatedInfo(itemType, null);
|
||||||
|
String[] formTypes = new String[0];
|
||||||
|
if ( relatedResponse.ServiceData.sizeOfPartialErrors() > 0)
|
||||||
|
throw new ServiceException( "DataManagementService.getItemCretionRelatedInfo returned a partial error.");
|
||||||
|
|
||||||
|
formTypes = new String[relatedResponse.FormAttrs.Length];
|
||||||
|
for ( int i = 0; i < relatedResponse.FormAttrs.Length; i++ )
|
||||||
|
{
|
||||||
|
FormAttributesInfo attrInfo = relatedResponse.FormAttrs[i];
|
||||||
|
formTypes[i] = attrInfo.FormType;
|
||||||
|
}
|
||||||
|
|
||||||
|
ItemProperties[] itemProps = new ItemProperties[itemIds.Length];
|
||||||
|
for (int i = 0; i < itemIds.Length; i++)
|
||||||
|
{
|
||||||
|
// Create form in cache for form property population
|
||||||
|
ModelObject[] forms = createForms(itemIds[i].NewItemId, formTypes[0],
|
||||||
|
itemIds[i].NewRevId, formTypes[1],
|
||||||
|
null, false);
|
||||||
|
ItemProperties itemProperty = new ItemProperties();
|
||||||
|
|
||||||
|
itemProperty.ClientId = "AppX-Test";
|
||||||
|
itemProperty.ItemId = itemIds[i].NewItemId;
|
||||||
|
itemProperty.RevId = itemIds[i].NewRevId;
|
||||||
|
itemProperty.Name = "AppX-Test";
|
||||||
|
itemProperty.Type = itemType;
|
||||||
|
itemProperty.Description = "Test Item for the SOA AppX sample application.";
|
||||||
|
itemProperty.Uom = "";
|
||||||
|
|
||||||
|
// Retrieve one of form attribute value from Item master form.
|
||||||
|
ServiceData serviceData = dmService.GetProperties(forms, new String[]{"project_id"});
|
||||||
|
if ( serviceData.sizeOfPartialErrors() > 0)
|
||||||
|
throw new ServiceException( "DataManagementService.getProperties returned a partial error.");
|
||||||
|
Property property = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
property= forms[0].GetProperty("project_id");
|
||||||
|
}
|
||||||
|
catch ( NotLoadedException /*ex*/){}
|
||||||
|
|
||||||
|
|
||||||
|
// Only if value is null, we set new value
|
||||||
|
if ( property == null || property.StringValue == null || property.StringValue.Length == 0)
|
||||||
|
{
|
||||||
|
itemProperty.ExtendedAttributes = new ExtendedAttributes[1];
|
||||||
|
ExtendedAttributes theExtendedAttr = new ExtendedAttributes();
|
||||||
|
theExtendedAttr.Attributes = new Hashtable();
|
||||||
|
theExtendedAttr.ObjectType = formTypes[0];
|
||||||
|
theExtendedAttr.Attributes["project_id"] = "project_id";
|
||||||
|
itemProperty.ExtendedAttributes[0] = theExtendedAttr;
|
||||||
|
}
|
||||||
|
itemProps[i] = itemProperty;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// *****************************
|
||||||
|
// Execute the service operation
|
||||||
|
// *****************************
|
||||||
|
CreateItemsResponse response = dmService.CreateItems(itemProps, null, "");
|
||||||
|
// before control is returned the ChangedHandler will be called with
|
||||||
|
// newly created Item and ItemRevisions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// The AppXPartialErrorListener is logging the partial errors returned
|
||||||
|
// In this simple example if any partial errors occur we will throw a
|
||||||
|
// ServiceException
|
||||||
|
if (response.ServiceData.sizeOfPartialErrors() > 0)
|
||||||
|
throw new ServiceException( "DataManagementService.createItems returned a partial error.");
|
||||||
|
|
||||||
|
return response.Output;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reserve Revision IDs
|
||||||
|
*
|
||||||
|
* @param items Array of Items to reserve Ids for
|
||||||
|
*
|
||||||
|
* @return Map of RevisionIds
|
||||||
|
*
|
||||||
|
* @throws ServiceException If any partial errors are returned
|
||||||
|
*/
|
||||||
|
public Hashtable generateRevisionIds(Item[] items) //throws ServiceException
|
||||||
|
{
|
||||||
|
// Get the service stub
|
||||||
|
DataManagementService dmService = DataManagementService.getService(Session.getConnection());
|
||||||
|
|
||||||
|
GenerateRevisionIdsResponse response = null;
|
||||||
|
GenerateRevisionIdsProperties[] input = null;
|
||||||
|
input = new GenerateRevisionIdsProperties[items.Length];
|
||||||
|
for (int i = 0; i < items.Length; i++)
|
||||||
|
{
|
||||||
|
GenerateRevisionIdsProperties property = new GenerateRevisionIdsProperties();
|
||||||
|
property.Item = items[i];
|
||||||
|
property.ItemType = "";
|
||||||
|
input[i] = property;
|
||||||
|
}
|
||||||
|
|
||||||
|
// *****************************
|
||||||
|
// Execute the service operation
|
||||||
|
// *****************************
|
||||||
|
response = dmService.GenerateRevisionIds(input);
|
||||||
|
|
||||||
|
// The AppXPartialErrorListener is logging the partial errors returned
|
||||||
|
// In this simple example if any partial errors occur we will throw a
|
||||||
|
// ServiceException
|
||||||
|
if (response.ServiceData.sizeOfPartialErrors() > 0)
|
||||||
|
throw new ServiceException( "DataManagementService.generateRevisionIds returned a partial error.");
|
||||||
|
|
||||||
|
return response.OutputRevisionIds;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Revise Items
|
||||||
|
*
|
||||||
|
* @param revisionIds Map of Revsion IDs
|
||||||
|
* @param itemRevs Array of ItemRevisons
|
||||||
|
*
|
||||||
|
* @return Map of Old ItemRevsion(key) to new ItemRevision(value)
|
||||||
|
*
|
||||||
|
* @throws ServiceException If any partial errors are returned
|
||||||
|
*/
|
||||||
|
public Hashtable reviseItems(Hashtable revisionIds, ItemRevision[] itemRevs) //throws ServiceException
|
||||||
|
{
|
||||||
|
// Get the service stub
|
||||||
|
DataManagementService dmService = DataManagementService.getService(Session.getConnection());
|
||||||
|
|
||||||
|
Hashtable revs = new Hashtable();
|
||||||
|
for (int i = 0; i < itemRevs.Length; i++)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
RevisionIds rev = (RevisionIds) revisionIds[i];
|
||||||
|
|
||||||
|
ReviseProperties revProps = new ReviseProperties();
|
||||||
|
|
||||||
|
revProps.RevId = rev.NewRevId;
|
||||||
|
revProps.Name = "testRevise";
|
||||||
|
revProps.Description = "describe testRevise";
|
||||||
|
|
||||||
|
Hashtable attrs = new Hashtable();
|
||||||
|
attrs["project_id"] = "project_id_val";
|
||||||
|
revProps.ExtendedAttributes = attrs;
|
||||||
|
|
||||||
|
revs[itemRevs[i]]= revProps;
|
||||||
|
}
|
||||||
|
|
||||||
|
// *****************************
|
||||||
|
// Execute the service operation
|
||||||
|
// *****************************
|
||||||
|
ReviseResponse revised = dmService.Revise(revs);
|
||||||
|
// before control is returned the ChangedHandler will be called with
|
||||||
|
// newly created Item and ItemRevisions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// The AppXPartialErrorListener is logging the partial errors returned
|
||||||
|
// In this simple example if any partial errors occur we will throw a
|
||||||
|
// ServiceException
|
||||||
|
if (revised.ServiceData.sizeOfPartialErrors() > 0)
|
||||||
|
throw new ServiceException("DataManagementService.revise returned a partial error.");
|
||||||
|
|
||||||
|
return revised.OldItemRevToNewItemRev;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete the Items
|
||||||
|
*
|
||||||
|
* @param items Array of Items to delete
|
||||||
|
*
|
||||||
|
* @throws ServiceException If any partial errors are returned
|
||||||
|
*/
|
||||||
|
public void deleteItems(Item[] items) //throws ServiceException
|
||||||
|
{
|
||||||
|
// Get the service stub
|
||||||
|
DataManagementService dmService = DataManagementService.getService(Session.getConnection());
|
||||||
|
|
||||||
|
// *****************************
|
||||||
|
// Execute the service operation
|
||||||
|
// *****************************
|
||||||
|
ServiceData serviceData = dmService.DeleteObjects(items);
|
||||||
|
|
||||||
|
// The AppXPartialErrorListener is logging the partial errors returned
|
||||||
|
// In this simple example if any partial errors occur we will throw a
|
||||||
|
// ServiceException
|
||||||
|
if (serviceData.sizeOfPartialErrors() > 0)
|
||||||
|
throw new ServiceException("DataManagementService.deleteObjects returned a partial error.");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create ItemMasterForm and ItemRevisionMasterForm
|
||||||
|
*
|
||||||
|
* @param IMFormName Name of ItemMasterForm
|
||||||
|
* @param IMFormType Type of ItemMasterForm
|
||||||
|
* @param IRMFormName Name of ItemRevisionMasterForm
|
||||||
|
* @param IRMFormType Type of ItemRevisionMasterForm
|
||||||
|
* @param parent The container object that two
|
||||||
|
* newly-created forms will be added into.
|
||||||
|
* @return ModelObject[] Array of forms
|
||||||
|
*
|
||||||
|
* @throws ServiceException If any partial errors are returned
|
||||||
|
*/
|
||||||
|
public ModelObject[] createForms ( String IMFormName, String IMFormType,
|
||||||
|
String IRMFormName, String IRMFormType,
|
||||||
|
ModelObject parent, bool saveDB ) //throws ServiceException
|
||||||
|
{
|
||||||
|
//Get the service stub
|
||||||
|
DataManagementService dmService = DataManagementService.getService(Session.getConnection());
|
||||||
|
FormInfo[] inputs = new FormInfo[2];
|
||||||
|
inputs[0] = new FormInfo();
|
||||||
|
inputs[0].ClientId = "1";
|
||||||
|
inputs[0].Description="";
|
||||||
|
inputs[0].Name = IMFormName;
|
||||||
|
inputs[0].FormType=IMFormType;
|
||||||
|
inputs[0].SaveDB = saveDB;
|
||||||
|
inputs[0].ParentObject = parent ;
|
||||||
|
inputs[1] = new FormInfo();
|
||||||
|
inputs[1].ClientId = "2";
|
||||||
|
inputs[1].Description="";
|
||||||
|
inputs[1].Name = IRMFormName;
|
||||||
|
inputs[1].FormType=IRMFormType;
|
||||||
|
inputs[1].SaveDB = saveDB;
|
||||||
|
inputs[1].ParentObject = parent;
|
||||||
|
CreateOrUpdateFormsResponse response = dmService.CreateOrUpdateForms(inputs);
|
||||||
|
if ( response.ServiceData.sizeOfPartialErrors() > 0)
|
||||||
|
throw new ServiceException("DataManagementService.createForms returned a partial error.");
|
||||||
|
ModelObject[] forms = new ModelObject [inputs.Length];
|
||||||
|
for (int i=0; i<inputs.Length; ++i)
|
||||||
|
{
|
||||||
|
forms[i] = response.Outputs[i].Form;
|
||||||
|
}
|
||||||
|
return forms;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,79 @@
|
|||||||
|
//==================================================
|
||||||
|
//
|
||||||
|
// @<COPYRIGHT>@
|
||||||
|
//
|
||||||
|
//==================================================
|
||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
|
using Teamcenter.ClientX;
|
||||||
|
using Teamcenter.Services.Strong.Core;
|
||||||
|
using Teamcenter.Soa.Client.Model;
|
||||||
|
using Teamcenter.Soa.Exceptions;
|
||||||
|
|
||||||
|
using User = Teamcenter.Soa.Client.Model.Strong.User;
|
||||||
|
using Folder = Teamcenter.Soa.Client.Model.Strong.Folder;
|
||||||
|
using WorkspaceObject = Teamcenter.Soa.Client.Model.Strong.WorkspaceObject;
|
||||||
|
|
||||||
|
namespace Teamcenter.Hello
|
||||||
|
{
|
||||||
|
public class HomeFolder
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List the contents of the Home folder.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void listHomeFolder(User user)
|
||||||
|
{
|
||||||
|
Folder home = null;
|
||||||
|
WorkspaceObject[] contents = null;
|
||||||
|
|
||||||
|
// Get the service stub
|
||||||
|
DataManagementService dmService = DataManagementService.getService(Session.getConnection());
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// User was a primary object returned from the login command
|
||||||
|
// the Object Property Policy should be configured to include the
|
||||||
|
// 'home_folder' property. However the actuall 'home_folder' object
|
||||||
|
// was a secondary object returned from the login request and
|
||||||
|
// therefore does not have any properties associated with it. We will need to
|
||||||
|
// get those properties explicitly with a 'getProperties' service request.
|
||||||
|
home = user.Home_folder;
|
||||||
|
}
|
||||||
|
catch (NotLoadedException e)
|
||||||
|
{
|
||||||
|
Console.Out.WriteLine(e.Message);
|
||||||
|
Console.Out.WriteLine("The Object Property Policy ($TC_DATA/soa/policies/Default.xml) is not configured with this property.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ModelObject[] objects = { home };
|
||||||
|
String[] attributes = { "contents" };
|
||||||
|
|
||||||
|
// *****************************
|
||||||
|
// Execute the service operation
|
||||||
|
// *****************************
|
||||||
|
dmService.GetProperties(objects, attributes);
|
||||||
|
|
||||||
|
|
||||||
|
// The above getProperties call returns a ServiceData object, but it
|
||||||
|
// just has pointers to the same object we passed into the method, so the
|
||||||
|
// input object have been updated with new property values
|
||||||
|
contents = home.Contents;
|
||||||
|
}
|
||||||
|
// This should never be thrown, since we just explicitly asked for this
|
||||||
|
// property
|
||||||
|
catch (NotLoadedException /*e*/){}
|
||||||
|
|
||||||
|
Console.Out.WriteLine("");
|
||||||
|
Console.Out.WriteLine("Home Folder:");
|
||||||
|
Session.printObjects( contents );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,112 @@
|
|||||||
|
//==================================================
|
||||||
|
//
|
||||||
|
// @<COPYRIGHT>@
|
||||||
|
//
|
||||||
|
//==================================================
|
||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
|
using Teamcenter.ClientX;
|
||||||
|
using Teamcenter.Schemas.Soa._2006_03.Exceptions;
|
||||||
|
|
||||||
|
//Include the Saved Query Service Interface
|
||||||
|
using Teamcenter.Services.Strong.Query;
|
||||||
|
|
||||||
|
// Input and output structures for the service operations
|
||||||
|
// Note: the different namespace from the service interface
|
||||||
|
using Teamcenter.Services.Strong.Query._2006_03.SavedQuery;
|
||||||
|
|
||||||
|
using ImanQuery = Teamcenter.Soa.Client.Model.Strong.ImanQuery;
|
||||||
|
|
||||||
|
|
||||||
|
namespace Teamcenter.Hello
|
||||||
|
{
|
||||||
|
public class Query
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a simple query of the database
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void queryItems()
|
||||||
|
{
|
||||||
|
|
||||||
|
ImanQuery query = null;
|
||||||
|
|
||||||
|
// Get the service stub
|
||||||
|
SavedQueryService queryService = SavedQueryService.getService(Session.getConnection());
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
// *****************************
|
||||||
|
// Execute the service operation
|
||||||
|
// *****************************
|
||||||
|
GetSavedQueriesResponse savedQueries = queryService.GetSavedQueries();
|
||||||
|
|
||||||
|
|
||||||
|
if (savedQueries.Queries.Length == 0)
|
||||||
|
{
|
||||||
|
Console.Out.WriteLine("There are no saved queries in the system.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find one called 'Item Name'
|
||||||
|
for (int i = 0; i < savedQueries.Queries.Length; i++)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (savedQueries.Queries[i].Name.Equals("Item Name"))
|
||||||
|
{
|
||||||
|
query = savedQueries.Queries[i].Query;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (ServiceException e)
|
||||||
|
{
|
||||||
|
Console.Out.WriteLine("GetSavedQueries service request failed.");
|
||||||
|
Console.Out.WriteLine(e.Message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (query == null)
|
||||||
|
{
|
||||||
|
Console.WriteLine("There is not an 'Item Name' query.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Search for all Items, returning a maximum of 25 objects
|
||||||
|
Teamcenter.Services.Strong.Query._2007_06.SavedQuery.SavedQueryInput[] savedQueryInput = new Teamcenter.Services.Strong.Query._2007_06.SavedQuery.SavedQueryInput[1];
|
||||||
|
savedQueryInput[0] = new Teamcenter.Services.Strong.Query._2007_06.SavedQuery.SavedQueryInput();
|
||||||
|
savedQueryInput[0].Query = query;
|
||||||
|
savedQueryInput[0].MaxNumToReturn = 25;
|
||||||
|
savedQueryInput[0].LimitListCount = 0;
|
||||||
|
savedQueryInput[0].LimitList = new Teamcenter.Soa.Client.Model.ModelObject[0];
|
||||||
|
savedQueryInput[0].Entries = new String[] { "Item Name" };
|
||||||
|
savedQueryInput[0].Values = new String[1];
|
||||||
|
savedQueryInput[0].Values[0] = "*";
|
||||||
|
savedQueryInput[0].MaxNumToInflate = 25;
|
||||||
|
|
||||||
|
//*****************************
|
||||||
|
//Execute the service operation
|
||||||
|
//*****************************
|
||||||
|
Teamcenter.Services.Strong.Query._2007_06.SavedQuery.ExecuteSavedQueriesResponse savedQueryResult = queryService.ExecuteSavedQueries(savedQueryInput);
|
||||||
|
|
||||||
|
Teamcenter.Services.Strong.Query._2007_06.SavedQuery.SavedQueryResults found = savedQueryResult.ArrayOfResults[0];
|
||||||
|
|
||||||
|
System.Console.Out.WriteLine("");
|
||||||
|
System.Console.Out.WriteLine("Found Items:");
|
||||||
|
Teamcenter.ClientX.Session.printObjects( found.Objects );
|
||||||
|
}
|
||||||
|
catch (ServiceException e)
|
||||||
|
{
|
||||||
|
Console.Out.WriteLine("ExecuteSavedQuery service request failed.");
|
||||||
|
Console.Out.WriteLine(e.Message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
After Width: | Height: | Size: 318 B |
After Width: | Height: | Size: 318 B |
After Width: | Height: | Size: 768 B |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 9.9 KiB |
After Width: | Height: | Size: 9.9 KiB |
After Width: | Height: | Size: 221 KiB |
After Width: | Height: | Size: 894 B |
After Width: | Height: | Size: 766 B |
@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||||
|
<PropertyGroup>
|
||||||
|
<PublishUrlHistory>publish\</PublishUrlHistory>
|
||||||
|
<InstallUrlHistory>
|
||||||
|
</InstallUrlHistory>
|
||||||
|
<SupportUrlHistory>
|
||||||
|
</SupportUrlHistory>
|
||||||
|
<UpdateUrlHistory>
|
||||||
|
</UpdateUrlHistory>
|
||||||
|
<BootstrapperUrlHistory>
|
||||||
|
</BootstrapperUrlHistory>
|
||||||
|
<ErrorReportUrlHistory>
|
||||||
|
</ErrorReportUrlHistory>
|
||||||
|
<FallbackCulture>zh-CN</FallbackCulture>
|
||||||
|
<VerifyUploadedFiles>false</VerifyUploadedFiles>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
||||||
|
<StartAction>Program</StartAction>
|
||||||
|
<StartProgram>D:\Autodesk\AutoCAD 2014\acad.exe</StartProgram>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
@ -0,0 +1,41 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using Autodesk.AutoCAD.DatabaseServices;
|
||||||
|
using Autodesk.AutoCAD.Runtime;
|
||||||
|
using Autodesk.AutoCAD.Geometry;
|
||||||
|
using Autodesk.AutoCAD.ApplicationServices;
|
||||||
|
using Autodesk.AutoCAD.EditorInput;
|
||||||
|
using Autodesk.AutoCAD.Windows;
|
||||||
|
using HelloTeamcenter.hello;
|
||||||
|
|
||||||
|
// General Information about an assembly is controlled through the following
|
||||||
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
// associated with an assembly.
|
||||||
|
[assembly: AssemblyTitle("HelloTeamcenter")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("Siemens Product Lifecycle Management Software Inc.")]
|
||||||
|
[assembly: AssemblyProduct("HelloTeamcenter")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright 2008 Siemens Product Lifecycle Management Software Inc.")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid("6ce4adbe-4247-464b-8d53-e3ecb88955fd")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
@ -0,0 +1,145 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
|
<data name="autocad_01" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\res\autocad_01.ico;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="FOLDER" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\res\FOLDER.ICO;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="FOLDEROP" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\res\FOLDEROP.ICO;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="item" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\res\item.ico;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="itemrev" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\res\itemrev.ico;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="login" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\res\login.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="Newstuff_Folder" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\res\Newstuff_Folder.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="tai" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\res\tai.ico;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
@ -0,0 +1,61 @@
|
|||||||
|
|
||||||
|
This sample demonstrates the basic functionality of the Teamcenter Services.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Before running the sample application, you must have a Teamcenter Web Tier server
|
||||||
|
and Pool Manager up and running.
|
||||||
|
|
||||||
|
To build this project from Visual Studio 2005(8.0).
|
||||||
|
1. Load the project
|
||||||
|
Open the Open dialog ( File --> Open --> Project... )
|
||||||
|
Browse to .../soa_clients/net/samples/HelloTeamcenter/HelloTeamcenter.csproj
|
||||||
|
3. Compile the project
|
||||||
|
4. Execute the client application
|
||||||
|
To connect to a server other than http://localhost:7001/tc, change this URI
|
||||||
|
on Project Properties dialog ( Project --> Properties). On the Debug tab
|
||||||
|
modify the In the 'Command line arguments' field add '-host http://server:port/tc'.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
The source file Hello.cxx has the main function for the application. This is the
|
||||||
|
best place to start browsing the code. There are serveral classes prefixed with
|
||||||
|
the name AppX (AppXCredentialManager), these classes are implemenations of
|
||||||
|
Teamcenter Services framework interfaces. Each client application is responsible
|
||||||
|
for providing an implemenation to these interfaces:
|
||||||
|
|
||||||
|
CredentialManager Used by the framework to re-authenticate as user.
|
||||||
|
ExceptionHandler Provide a mechanism for the client application to
|
||||||
|
handle low level exception in the communication framework.
|
||||||
|
PartialErrorListener Optional listener for notification when a service operation
|
||||||
|
has returned partial errors.
|
||||||
|
ChangeListener Optional listener for notification when a service operation
|
||||||
|
has returned ModelObject with updated property values.
|
||||||
|
DeleteListener Optional listener for notification when a service operation
|
||||||
|
has returned ModelObject that have been deleted from
|
||||||
|
the database and from the client data model.
|
||||||
|
|
||||||
|
The remaining classes in this sample show the use of a few of the service operations
|
||||||
|
to demonstrate some basic features of Teamcenter Services.
|
||||||
|
|
||||||
|
Session This class shows how to establish a session with the
|
||||||
|
Teamcenter Server using the SessionService login and
|
||||||
|
logout methods. A session must be established before
|
||||||
|
any other service operation are called.
|
||||||
|
HomeFolder This class lists the contents of the user's home folder
|
||||||
|
Query This class performs a simple query.
|
||||||
|
DataManagement This class creates, revises, and deletes a set of Items
|
||||||
|
|
||||||
|
Each of these examples performs the same basic steps
|
||||||
|
1. Construct the desired service stub.
|
||||||
|
2. Gather the data for the opeation's input arguments,
|
||||||
|
3. Call the service operation
|
||||||
|
4. Process the results.
|
||||||
|
|
||||||
|
A few of the service operations will make use of the Change and Delete listeners.
|
||||||
|
Under normal circomstances the ExeptionHandler and PartialErrorListner will not
|
||||||
|
be called.
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type='text/xsl' href='_UpgradeReport_Files/UpgradeReport.xslt'?><UpgradeLog>
|
||||||
|
<Properties><Property Name="Solution" Value="HelloTeamcenter">
|
||||||
|
</Property><Property Name="解决方案文件" Value="D:\soa_client\net\samples\HelloTeamcenter\HelloTeamcenter.sln">
|
||||||
|
</Property><Property Name="Date" Value="2011年8月29日星期一">
|
||||||
|
</Property><Property Name="Time" Value="19:15:39">
|
||||||
|
</Property></Properties><Event ErrorLevel="0" Project="HelloTeamcenter" Source="HelloTeamcenter.csproj" Description="项目文件已成功备份为 D:\soa_client\net\samples\HelloTeamcenter\Backup\HelloTeamcenter.csproj">
|
||||||
|
</Event><Event ErrorLevel="0" Project="HelloTeamcenter" Source="clientx\AppXCredentialManager.cs" Description="文件已成功备份为 D:\soa_client\net\samples\HelloTeamcenter\Backup\clientx\AppXCredentialManager.cs">
|
||||||
|
</Event><Event ErrorLevel="0" Project="HelloTeamcenter" Source="clientx\AppXDeletedObjectListener.cs" Description="文件已成功备份为 D:\soa_client\net\samples\HelloTeamcenter\Backup\clientx\AppXDeletedObjectListener.cs">
|
||||||
|
</Event><Event ErrorLevel="0" Project="HelloTeamcenter" Source="clientx\AppXExceptionHandler.cs" Description="文件已成功备份为 D:\soa_client\net\samples\HelloTeamcenter\Backup\clientx\AppXExceptionHandler.cs">
|
||||||
|
</Event><Event ErrorLevel="0" Project="HelloTeamcenter" Source="clientx\AppXPartialErrorListener.cs" Description="文件已成功备份为 D:\soa_client\net\samples\HelloTeamcenter\Backup\clientx\AppXPartialErrorListener.cs">
|
||||||
|
</Event><Event ErrorLevel="0" Project="HelloTeamcenter" Source="clientx\AppXRequestListener.cs" Description="文件已成功备份为 D:\soa_client\net\samples\HelloTeamcenter\Backup\clientx\AppXRequestListener.cs">
|
||||||
|
</Event><Event ErrorLevel="0" Project="HelloTeamcenter" Source="clientx\AppXUpdateObjectListener.cs" Description="文件已成功备份为 D:\soa_client\net\samples\HelloTeamcenter\Backup\clientx\AppXUpdateObjectListener.cs">
|
||||||
|
</Event><Event ErrorLevel="0" Project="HelloTeamcenter" Source="clientx\Session.cs" Description="文件已成功备份为 D:\soa_client\net\samples\HelloTeamcenter\Backup\clientx\Session.cs">
|
||||||
|
</Event><Event ErrorLevel="0" Project="HelloTeamcenter" Source="hello\DataManagement.cs" Description="文件已成功备份为 D:\soa_client\net\samples\HelloTeamcenter\Backup\hello\DataManagement.cs">
|
||||||
|
</Event><Event ErrorLevel="0" Project="HelloTeamcenter" Source="hello\Hello.cs" Description="文件已成功备份为 D:\soa_client\net\samples\HelloTeamcenter\Backup\hello\Hello.cs">
|
||||||
|
</Event><Event ErrorLevel="0" Project="HelloTeamcenter" Source="hello\HomeFolder.cs" Description="文件已成功备份为 D:\soa_client\net\samples\HelloTeamcenter\Backup\hello\HomeFolder.cs">
|
||||||
|
</Event><Event ErrorLevel="0" Project="HelloTeamcenter" Source="hello\Query.cs" Description="文件已成功备份为 D:\soa_client\net\samples\HelloTeamcenter\Backup\hello\Query.cs">
|
||||||
|
</Event><Event ErrorLevel="0" Project="HelloTeamcenter" Source="Properties\AssemblyInfo.cs" Description="文件已成功备份为 D:\soa_client\net\samples\HelloTeamcenter\Backup\Properties\AssemblyInfo.cs">
|
||||||
|
</Event><Event ErrorLevel="0" Project="HelloTeamcenter" Source="HelloTeamcenter.csproj" Description="项目已成功转换">
|
||||||
|
</Event><Event ErrorLevel="3" Project="HelloTeamcenter" Source="HelloTeamcenter.csproj" Description="Converted">
|
||||||
|
</Event><Event ErrorLevel="0" Project="HelloTeamcenter" Source="HelloTeamcenter.csproj" Description="扫描完成: 项目文件不需要升级。">
|
||||||
|
</Event></UpgradeLog>
|
@ -0,0 +1,232 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
|
||||||
|
|
||||||
|
<xsl:key name="ProjectKey" match="Event" use="@Project"/>
|
||||||
|
|
||||||
|
<xsl:template match="Events" mode="createProjects">
|
||||||
|
<projects>
|
||||||
|
<xsl:for-each select="Event">
|
||||||
|
<!--xsl:sort select="@Project" order="descending"/-->
|
||||||
|
<xsl:if test="(1=position()) or (preceding-sibling::*[1]/@Project != @Project)">
|
||||||
|
|
||||||
|
<xsl:variable name="ProjectName" select="@Project"/>
|
||||||
|
|
||||||
|
<project>
|
||||||
|
<xsl:attribute name="name">
|
||||||
|
<xsl:value-of select="@Project"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
|
||||||
|
<xsl:if test="@Project=''">
|
||||||
|
<xsl:attribute name="solution">
|
||||||
|
<xsl:value-of select="@Solution"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:if>
|
||||||
|
|
||||||
|
<xsl:for-each select="key('ProjectKey', $ProjectName)">
|
||||||
|
<!--xsl:sort select="@Source" /-->
|
||||||
|
<xsl:if test="(1=position()) or (preceding-sibling::*[1]/@Source != @Source)">
|
||||||
|
|
||||||
|
<source>
|
||||||
|
<xsl:attribute name="name">
|
||||||
|
<xsl:value-of select="@Source"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
|
||||||
|
<xsl:variable name="Source">
|
||||||
|
<xsl:value-of select="@Source"/>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
|
<xsl:for-each select="key('ProjectKey', $ProjectName)[ @Source = $Source ]">
|
||||||
|
|
||||||
|
<event>
|
||||||
|
<xsl:attribute name="error-level">
|
||||||
|
<xsl:value-of select="@ErrorLevel"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="description">
|
||||||
|
<xsl:value-of select="@Description"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</event>
|
||||||
|
</xsl:for-each>
|
||||||
|
</source>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:for-each>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:for-each>
|
||||||
|
</projects>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="projects">
|
||||||
|
<xsl:for-each select="project">
|
||||||
|
<xsl:sort select="@Name" order="ascending"/>
|
||||||
|
<h2>
|
||||||
|
<xsl:if test="@solution"><a _locID="Solution">解决方案</a>: <xsl:value-of select="@solution"/></xsl:if>
|
||||||
|
<xsl:if test="not(@solution)"><a _locID="Project">项目</a>: <xsl:value-of select="@name"/>
|
||||||
|
<xsl:for-each select="source">
|
||||||
|
<xsl:variable name="Hyperlink" select="@name"/>
|
||||||
|
<xsl:for-each select="event[@error-level='4']">
|
||||||
|
<A class="note"><xsl:attribute name="HREF"><xsl:value-of select="$Hyperlink"/></xsl:attribute><xsl:value-of select="@description"/></A>
|
||||||
|
</xsl:for-each>
|
||||||
|
</xsl:for-each>
|
||||||
|
</xsl:if>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<table cellpadding="2" cellspacing="0" width="98%" border="1" bordercolor="white" class="infotable">
|
||||||
|
<tr>
|
||||||
|
<td nowrap="1" class="header" _locID="Filename">文件名</td>
|
||||||
|
<td nowrap="1" class="header" _locID="Status">状态</td>
|
||||||
|
<td nowrap="1" class="header" _locID="Errors">错误</td>
|
||||||
|
<td nowrap="1" class="header" _locID="Warnings">警告</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<xsl:for-each select="source">
|
||||||
|
<xsl:sort select="@name" order="ascending"/>
|
||||||
|
<xsl:variable name="source-id" select="generate-id(.)"/>
|
||||||
|
|
||||||
|
<xsl:if test="count(event)!=count(event[@error-level='4'])">
|
||||||
|
|
||||||
|
<tr class="row">
|
||||||
|
<td class="content">
|
||||||
|
<A HREF="javascript:"><xsl:attribute name="onClick">javascript:document.images['<xsl:value-of select="$source-id"/>'].click()</xsl:attribute><IMG border="0" _locID="IMG.alt" _locAttrData="alt" alt="展开/折叠节" class="expandable" height="11" onclick="changepic()" src="_UpgradeReport_Files/UpgradeReport_Plus.gif" width="9"><xsl:attribute name="name"><xsl:value-of select="$source-id"/></xsl:attribute><xsl:attribute name="child">src<xsl:value-of select="$source-id"/></xsl:attribute></IMG></A> <xsl:value-of select="@name"/>
|
||||||
|
</td>
|
||||||
|
<td class="content">
|
||||||
|
<xsl:if test="count(event[@error-level='3'])=1">
|
||||||
|
<xsl:for-each select="event[@error-level='3']">
|
||||||
|
<xsl:if test="@description='Converted'"><a _locID="Converted1">已转换</a></xsl:if>
|
||||||
|
<xsl:if test="@description!='Converted'"><xsl:value-of select="@description"/></xsl:if>
|
||||||
|
</xsl:for-each>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:if test="count(event[@error-level='3'])!=1 and count(event[@error-level='3' and @description='Converted'])!=0"><a _locID="Converted2">已转换</a>
|
||||||
|
</xsl:if>
|
||||||
|
</td>
|
||||||
|
<td class="content"><xsl:value-of select="count(event[@error-level='2'])"/></td>
|
||||||
|
<td class="content"><xsl:value-of select="count(event[@error-level='1'])"/></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr class="collapsed" bgcolor="#ffffff">
|
||||||
|
<xsl:attribute name="id">src<xsl:value-of select="$source-id"/></xsl:attribute>
|
||||||
|
|
||||||
|
<td colspan="7">
|
||||||
|
<table width="97%" border="1" bordercolor="#dcdcdc" rules="cols" class="issuetable">
|
||||||
|
<tr>
|
||||||
|
<td colspan="7" class="issuetitle" _locID="ConversionIssues">转换报告 - <xsl:value-of select="@name"/>:</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<xsl:for-each select="event[@error-level!='3']">
|
||||||
|
<xsl:if test="@error-level!='4'">
|
||||||
|
<tr>
|
||||||
|
<td class="issuenone" style="border-bottom:solid 1 lightgray">
|
||||||
|
<xsl:value-of select="@description"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:for-each>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:for-each>
|
||||||
|
|
||||||
|
<tr valign="top">
|
||||||
|
<td class="foot">
|
||||||
|
<xsl:if test="count(source)!=1">
|
||||||
|
<xsl:value-of select="count(source)"/><a _locID="file1"> 个文件</a>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:if test="count(source)=1">
|
||||||
|
<a _locID="file2">1 个文件</a>
|
||||||
|
</xsl:if>
|
||||||
|
</td>
|
||||||
|
<td class="foot">
|
||||||
|
<a _locID="Converted3">已转换</a>: <xsl:value-of select="count(source/event[@error-level='3' and @description='Converted'])"/><BR/>
|
||||||
|
<a _locID="NotConverted">未转换</a>: <xsl:value-of select="count(source) - count(source/event[@error-level='3' and @description='Converted'])"/>
|
||||||
|
</td>
|
||||||
|
<td class="foot"><xsl:value-of select="count(source/event[@error-level='2'])"/></td>
|
||||||
|
<td class="foot"><xsl:value-of select="count(source/event[@error-level='1'])"/></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</xsl:for-each>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="Property">
|
||||||
|
<xsl:if test="@Name!='Date' and @Name!='Time' and @Name!='LogNumber' and @Name!='Solution'">
|
||||||
|
<tr><td nowrap="1"><b><xsl:value-of select="@Name"/>: </b><xsl:value-of select="@Value"/></td></tr>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="UpgradeLog">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<META HTTP-EQUIV="Content-Type" content="text/html; charset=utf-8"/>
|
||||||
|
<link rel="stylesheet" href="_UpgradeReport_Files\UpgradeReport.css"/>
|
||||||
|
<title _locID="ConversionReport0">转换报告
|
||||||
|
<xsl:if test="Properties/Property[@Name='LogNumber']">
|
||||||
|
<xsl:value-of select="Properties/Property[@Name='LogNumber']/@Value"/>
|
||||||
|
</xsl:if>
|
||||||
|
</title>
|
||||||
|
<script language="javascript">
|
||||||
|
function outliner () {
|
||||||
|
oMe = window.event.srcElement
|
||||||
|
//get child element
|
||||||
|
var child = document.all[event.srcElement.getAttribute("child",false)];
|
||||||
|
//if child element exists, expand or collapse it.
|
||||||
|
if (null != child)
|
||||||
|
child.className = child.className == "collapsed" ? "expanded" : "collapsed";
|
||||||
|
}
|
||||||
|
|
||||||
|
function changepic() {
|
||||||
|
uMe = window.event.srcElement;
|
||||||
|
var check = uMe.src.toLowerCase();
|
||||||
|
if (check.lastIndexOf("upgradereport_plus.gif") != -1)
|
||||||
|
{
|
||||||
|
uMe.src = "_UpgradeReport_Files/UpgradeReport_Minus.gif"
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
uMe.src = "_UpgradeReport_Files/UpgradeReport_Plus.gif"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body topmargin="0" leftmargin="0" rightmargin="0" onclick="outliner();">
|
||||||
|
<h1 _locID="ConversionReport">转换报告 - <xsl:value-of select="Properties/Property[@Name='Solution']/@Value"/></h1>
|
||||||
|
|
||||||
|
<p><span class="note">
|
||||||
|
<b _locID="TimeOfConversion">转换时间:</b> <xsl:value-of select="Properties/Property[@Name='Date']/@Value"/> <xsl:value-of select="Properties/Property[@Name='Time']/@Value"/><br/>
|
||||||
|
</span></p>
|
||||||
|
|
||||||
|
<xsl:variable name="SortedEvents">
|
||||||
|
<Events>
|
||||||
|
<xsl:for-each select="Event">
|
||||||
|
<xsl:sort select="@Project" order="ascending"/>
|
||||||
|
<xsl:sort select="@Source" order="ascending"/>
|
||||||
|
<xsl:sort select="@ErrorLevel" order="ascending"/>
|
||||||
|
<Event>
|
||||||
|
<xsl:attribute name="Project"><xsl:value-of select="@Project"/> </xsl:attribute>
|
||||||
|
<xsl:attribute name="Solution"><xsl:value-of select="/UpgradeLog/Properties/Property[@Name='Solution']/@Value"/> </xsl:attribute>
|
||||||
|
<xsl:attribute name="Source"><xsl:value-of select="@Source"/> </xsl:attribute>
|
||||||
|
<xsl:attribute name="ErrorLevel"><xsl:value-of select="@ErrorLevel"/> </xsl:attribute>
|
||||||
|
<xsl:attribute name="Description"><xsl:value-of select="@Description"/> </xsl:attribute>
|
||||||
|
</Event>
|
||||||
|
</xsl:for-each>
|
||||||
|
</Events>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
|
<xsl:variable name="Projects">
|
||||||
|
<xsl:apply-templates select="msxsl:node-set($SortedEvents)/*" mode="createProjects"/>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
|
<xsl:apply-templates select="msxsl:node-set($Projects)/*"/>
|
||||||
|
|
||||||
|
<p></p><p>
|
||||||
|
<table class="note">
|
||||||
|
<tr>
|
||||||
|
<td nowrap="1">
|
||||||
|
<b _locID="ConversionSettings">转换设置</b>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<xsl:apply-templates select="Properties"/>
|
||||||
|
</table></p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
</xsl:template>
|
||||||
|
</xsl:stylesheet>
|
After Width: | Height: | Size: 69 B |
After Width: | Height: | Size: 71 B |
@ -0,0 +1,64 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
|
||||||
|
</startup>
|
||||||
|
<runtime>
|
||||||
|
<loadFromRemoteSources enabled="true"/>
|
||||||
|
</runtime>
|
||||||
|
<appSettings>
|
||||||
|
<add key="CHINT-TITLE-A0-CN-X" value="2239.0336"/>
|
||||||
|
<add key="CHINT-TITLE-A0-CN-Y" value="-313.5048"/>
|
||||||
|
<add key="CHINT-TITLE-A0-EN-X" value="766.3449"/>
|
||||||
|
<add key="CHINT-TITLE-A0-EN-Y" value="-1092.2177"/>
|
||||||
|
<add key="GC-CHINT-TITLE-A0-CN-X" value="2268.4361"/>
|
||||||
|
<add key="GC-CHINT-TITLE-A0-CN-Y" value="-380.0687"/>
|
||||||
|
<add key="GC-CHINT-TITLE-A0-EN-X" value="2122.6918"/>
|
||||||
|
<add key="GC-CHINT-TITLE-A0-EN-Y" value="-311.0528"/>
|
||||||
|
<add key="CHINT-TITLE-A1-CN-X" value="2016.6554"/>
|
||||||
|
<add key="CHINT-TITLE-A1-CN-Y" value="-356.938"/>
|
||||||
|
<add key="CHINT-TITLE-A1-EN-X" value="3874.9229"/>
|
||||||
|
<add key="CHINT-TITLE-A1-EN-Y" value="-442.1908"/>
|
||||||
|
<add key="GC-CHINT-TITLE-A1-CN-X" value="2001.4803"/>
|
||||||
|
<add key="GC-CHINT-TITLE-A1-CN-Y" value="-318.9944"/>
|
||||||
|
<add key="GC-CHINT-TITLE-A1-EN-X" value="3874.9229"/>
|
||||||
|
<add key="GC-CHINT-TITLE-A1-EN-Y" value="-432.1908"/>
|
||||||
|
<add key="CHINT-TITLE-A2-CN-X" value="286.1828"/>
|
||||||
|
<add key="CHINT-TITLE-A2-CN-Y" value="-853.9018"/>
|
||||||
|
<add key="CHINT-TITLE-A2-EN-X" value="1815.9079"/>
|
||||||
|
<add key="CHINT-TITLE-A2-EN-Y" value="-291.1625"/>
|
||||||
|
<add key="GC-CHINT-TITLE-A2-CN-X" value="333.6702"/>
|
||||||
|
<add key="GC-CHINT-TITLE-A2-CN-Y" value="-814.4684"/>
|
||||||
|
<add key="GC-CHINT-TITLE-A2-EN-X" value="1815.9079"/>
|
||||||
|
<add key="GC-CHINT-TITLE-A2-EN-Y" value="-281.1625"/>
|
||||||
|
<add key="CHINT-TITLE-A3-CN-X" value="283.1309"/>
|
||||||
|
<add key="CHINT-TITLE-A3-CN-Y" value="-284.1189"/>
|
||||||
|
<add key="CHINT-TITLE-A3-EN-X" value="283.1309"/>
|
||||||
|
<add key="CHINT-TITLE-A3-EN-Y" value="-284.1189"/>
|
||||||
|
<add key="GC-CHINT-TITLE-A3-CN-X" value="-225.9579"/>
|
||||||
|
<add key="GC-CHINT-TITLE-A3-CN-Y" value="-274.1189"/>
|
||||||
|
<add key="GC-CHINT-TITLE-A3-EN-X" value="283.1309"/>
|
||||||
|
<add key="GC-CHINT-TITLE-A3-EN-Y" value="-274.1189"/>
|
||||||
|
<add key="CHINT-TITLE-A4-CN-X" value="14.0998"/>
|
||||||
|
<add key="CHINT-TITLE-A4-CN-Y" value="-240.4484"/>
|
||||||
|
<add key="CHINT-TITLE-A4-EN-X" value="-95.1342"/>
|
||||||
|
<add key="CHINT-TITLE-A4-EN-Y" value="-235.1224"/>
|
||||||
|
<add key="GC-CHINT-TITLE-A4-CN-X" value="261.4192"/>
|
||||||
|
<add key="GC-CHINT-TITLE-A4-CN-Y" value="-226.4351"/>
|
||||||
|
<add key="GC-CHINT-TITLE-A4-EN-X" value="-95.1342"/>
|
||||||
|
<add key="GC-CHINT-TITLE-A4-EN-Y" value="-225.1224"/>
|
||||||
|
<add key="ClientSettingsProvider.ServiceUri" value=""/>
|
||||||
|
</appSettings>
|
||||||
|
<system.web>
|
||||||
|
<membership defaultProvider="ClientAuthenticationMembershipProvider">
|
||||||
|
<providers>
|
||||||
|
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri=""/>
|
||||||
|
</providers>
|
||||||
|
</membership>
|
||||||
|
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
|
||||||
|
<providers>
|
||||||
|
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400"/>
|
||||||
|
</providers>
|
||||||
|
</roleManager>
|
||||||
|
</system.web>
|
||||||
|
</configuration>
|