Tamino Non-XML Interface

Defines the interface to the Tamino Non XML control. Transactionality is valid with Tamino Version 2.1 or higher. Please see also the section Command and Response Structure in the chapter X-Machine Programming, which is part of the documentation for the Tamino XML server.

 

Properties
BSTR csDatabaseURL
          The database URL.
BSTR csUserName
          The username for authentication.
BSTR csPassword
          The password for authentication.
BSTR SessionID
          The current session ID if a transactional session is in progress.
BSTR SessionKey
          The current session key if a transactional session is in progress.

Note:
In C++ the properties are access using Get/Put method pairs, for example GetProperty/PutProperty.

Methods

Initialize

long Initialize()
Initializes the control. This method should be called before calling any other method.
Returns:
1 - SUCCESS
0 - FAILURE

GetNonXml

LPDISPATCH GetNonXml(BSTR lpszRelURL, BSTR lpszFile)
Gets a document or file from the Tamino database.
Parameters:
lpszRelURL - NULL, or the relative URL added to the database URL if it does not begin with "http://"
lpszFile - the document or file
Return Type:
IXMLDOMDocument: DOM tree corresponding to response [if NULL use GetErrorStatus]

SetNonXmlWithFilename

LPDISPATCH SetNonXmlWithFilename(BSTR lpszRelURL, BSTR lpszInputFile, BSTR lpszContentType)
Puts a document or file into the Tamino database.
Parameters:
lpszRelURL - NULL, or the relative URL added to the database URL if it does not begin with "http://"
lpszFile - the name of the document or file to be read
lpszContentType - the value of the HTTP header "Content-Type" (e.g., "application/msword")
Return Type:
IXMLDOMDocument: DOM tree corresponding to response [if NULL use GetErrorStatus]

GetErrorStatus

long GetErrorStatus(VARIANT* ErrorText)
If the last Tamino ActiveX command fails this command returns the error number and the parameter ErrorText contains the error text. In the case of success the parameter ErrorText contains the Message-Text/Line from Tamino.
Parameter Type:
VARIANT by reference
Returns:
0 - SUCCESS
not 0 - error number

StartSession

LPDISPATCH StartSession(long IsolationTypes, long LockWaitTypes)
Starts a new transactional session.
Parameters:
IsolationTypes - This is one of the following:
   InoIsolationDefault = 1 (take the default defined in Tamino),
   InoUnprotected = 2,
   InoShared = 3,
   InoProtected = 4
LockWaitTypes - This is one of the following:
   InoLockWaitDefault = 1 (take the default defined in Tamino),
   InoLockWaitYes = 2,
   InoLockWaitNo = 3
Return Type:
IXMLDOMDocument: DOM tree corresponding to response [if NULL use GetErrorStatus]

EndSession

LPDISPATCH EndSession()
Finishes the transactional session.
Return Type:
IXMLDOMDocument: DOM tree corresponding to response [if NULL use GetErrorStatus]

Commit

LPDISPATCH Commit()
Commits the transaction.
Return Type:
IXMLDOMDocument: DOM tree corresponding to response [if NULL use GetErrorStatus]

Rollback

LPDISPATCH Rollback()
Rolls back the transaction.
Return Type:
IXMLDOMDocument

Echo

LPDISPATCH Echo()
Returns a positive response (a pre-defined string) if the inner X-Machine layer is reachable by the connection layer. Otherwise an error message is generated by the connection layer.
Return Type:
IXMLDOMElement

Ping

LPDISPATCH Ping()
Establishes a HTTP connection and returns a positive answer (something like "Database ID=099 is alive") in case of success.
Return Type:
IXMLDOMElement

SetIsolationLevel

long SetIsolationLevel(long isolation)
Set new isolation level command modifier for all subsequent commands.
Parameters:
isolation - This is one of the following:
   InoIsolationDefault = 1 (take the default defined in Tamino),
   InoUnprotected = 2,
   InoShared = 3,
   InoProtected = 4,
   IsolationUncommittedDocument = 5,
   IsolationCommittedCommand = 6,
   IsolationStableCursor = 7,
   IsolationStableDocument = 8,
   IsolationSerializable = 9
Returns:
previous value

SetLockWait

long SetLockWait(long wait)
Set new lockwait command modifier for all subsequent commands.
Parameters:
wait - This is one of the following:
   InoLockWaitDefault = 1 (take the default defined in Tamino),
   InoLockWaitYes = 2,
   InoLockWaitNo = 3
Returns:
previous value

SetLockMode

long SetLockMode(long mode)
Set new lockmode command modifier for all subsequent commands.
Parameters:
mode - This is one of the following:
   LockModeDefault = 1 (take the default defined in Tamino),
   LockModeUnprotected = 2,
   LockModeShared = 3,
   LockModeProtected = 4
Returns:
previous value

UseGlobalTransactions

long UseGlobalTransactions(long flag)
Automatically use declarative DTC transactions or not.
This flag is TRUE by default.
Parameters:
flag - TRUE or FALSE
Returns:
previous value

SetGlobalTransactionId

LPDISPATCH SetGlobalTransactionId(VARIANT id, GlobalTransactionTypes type)
Parameters:
id - BSTR for TipTransaction, BYTE[64] for UtxTransaction
type - This is one of the following:
   TipTransaction = 1,
   UtxTransaction = 2
Returns:
IXMLDOMDocument: DOM tree corresponding to response [if NULL use GetErrorStatus]

BeginSession

LPDISPATCH BeginSession(IsolationTypes isolation, LockWaitTypes wait, LockModeTypes mode)
Begin a transactional session using the specified command modifiers for the transaction.
Parameters:
isolation - see SetIsolationLevel for possible values
wait - see SetLockWait for possible values
mode - see SetLockMode for possible values
Returns:
IXMLDOMDocument: DOM tree corresponding to response [if NULL use GetErrorStatus]

BeginSessionWithGlobalTransaction

LPDISPATCH BeginSessionWithGlobalTransaction(IsolationTypes isolation, LockWaitTypes wait, LockModeTypes mode, VARIANT id, GlobalTransactionTypes type)
Begin a transactional session using the specified global transaction id and the specified command modifiers for the transaction.
Parameters:
isolation - see SetIsolationLevel for possible values
wait - see SetLockWait for possible values
mode - see SetLockMode for possible values
id - see SetGlobalTransactionId for possible values
type - see SetGlobalTransactionId for possible values
Returns:
IXMLDOMDocument: DOM tree corresponding to response [if NULL use GetErrorStatus]

Top of page