HTTP Client API for ActiveX Version 8.2.2
 —  HTTP Client API for ActiveX  —

Samples

This section provides examples for the HTTP Client for ActiveX using Visual Basic.


sampleVBXML

The following shows the main dialog of the sampleVBXML TaminoX executable on initial execution. All operations are checked for error and if an error is detected the corresponding error message is displayed.

sampleVBXML

The command buttons on the dialog perform the following operations:

Command Description
SetTamURL Sets the Tamino database URL and collection (e.g. http://localhost/tamino/mydb/ino:etc). This is used to set the property csDatabaseURL.
Hex Big Chars Option that, if selected, causes response XML documents that have non-printing characters to be output as hex values.
ClearResults Clears the results text box.
Version Performs a TaminoX.GetVersion() operation and displays the result.
Ping Performs a TaminoX.Ping() operation and displays the result.
Echo Performs a TaminoX.Echo() operation and displays the result.
StartSession Performs a TaminoX.StartSession() operation and displays the result. Note that StartSession calls may not be nested – try it and see the error!
Commit Performs a TaminoX.Commit() operation and displays the result. Note that a previous StartSession is required – try it and see the error!
Rollback Performs a TaminoX.Rollback() operation and displays the result. Note that a previous StartSession is required – try it and see the error!
EndSession Performs a TaminoX.EndSession() operation and displays the result. Note that a previous StartSession is required – try it and see the error!
PutDocument Performs a TaminoX.PutDocument() operation and displays the resulting HTTP headers (see GetDocument below). Inserts a document into the database.
GetDocument Performs a TaminoX.GetDocument() operation and displays the result. Gets a document from the database. The document type and name should correspond to the preceding PutDocument (or a known document in the database). This means that the ino:id (@n) should match a preceding PutDocument X-INO-id HTTP header value.
DoQuery Performs a TaminoX.DoQuery() operation followed by a ReturnNodes operation and displays the node values.
XQuery Performs a TaminoX.XQuery() operation and displays the node values.

Top of page

sampleVBNonXML

The following shows the main dialog of the sampleVBNonXML TaminoNonXml executable on initial execution. All operations are checked for error and if an error is detected the corresponding error message is displayed. Note that to be able to use the BIN/BIN collection/doctype the programmer must first define the schema given in bin-schema.tsd.

sampleVBNonXML

The command buttons on the dialog perform the following operations:

Command Description
Tamino base Url and Set Sets the Tamino database base URL (e.g. http://localhost/tamino/mydb). This is combined with the relative URL to produce an absolute URL to specify the non-XML document to be used.Use the Set button when changing the base URL.
Tamino relative Url Relative URL combined with the base URL to fully specify the non-XML document to be used.
Upload Non XML Uploads the user specified document to “base URL/relative URL”. The user specified document is obtained via a file browsing dialog.
Download Downloads "base URL/relative URL" to the user specified document. The user specified document is obtained via a file browsing dialog.
Start Session Starts a transactional session.
Commit Commits all processed commands.
Rollback Rolls back all processed commands.
End Session Ends a transactional session.

Top of page