comet.CSOAP

class comet.CSOAP

This section describes all functions for the comet.CSOAP class.

Methods

CSOAP.getServer()

Get the server name of this connection.

Returns

The server name

Return type

str

Raises

CometError – On internal error

Available

CScript

soap::server

CSOAP.getUser()

Get the user name this connection was established with.

Returns

The user name

Return type

str

Raises

CometError – On internal error

Available

CScript

soap::user

CSOAP.getLanguage()

Get the language this connection was established with.

Returns

The language

Return type

str

Raises

CometError – On internal error

Available

CScript

soap::language

CSOAP.getClient()

Get the client name this connection was established with.

Returns

The client name

Return type

str

Raises

CometError – On internal error

Available

CScript

soap::client

CSOAP.getCharset()

Get the character set this connection was established with.

Returns

The character set

  • 0: System charset

  • 1: UTF-8

  • 2: Unicode 16 Bit

  • 3: Unicode 32 Bit

Return type

int

Raises

CometError – On internal error

Available

CScript

soap::charset

CSOAP.uploadFile(ID, path, description='', mimeType='')

Upload a file to the SOAP connection.

Parameters
  • ID (str) – The unique ID to store the data with

  • path (str) – The absolute file path to the file to be uploaded

  • description (str) – Description for the data

  • mimeType (str) – Custom mime type

Return type

None

Raises
  • TypeError – When parameter types are invalid

  • ValueError

    • When parameter ID is empty

    • When parameter path is empty

  • CometError – On internal error

Available

CScript

soap::upload

CSOAP.uploadData(ID, data, dataName, description='', mimeType='')

Upload data to the SOAP connection.

Parameters
  • ID (str) – The unique ID to store the data with

  • data (str | bytearray) –

    The data to upload. This can either be text or binary data.

  • dataName (str) – Data name for the SOAP service

  • description (str) – Description for the data

  • mimeType (str) –

    Custom mime type.

    When uploading text data, this defaults to ‘text/plain’

Return type

None

Raises
  • TypeError – When parameter types are invalid

  • ValueError

    • When parameter ID is empty

    • When parameter dataName is empty

  • CometError – On internal error

Available

CScript

soap::upload

CSOAP.uploadFolder(path, prefix='')

Upload a local folder and all contained files and folders recursively to the SOAP connection.

Parameters
  • path (str) – Full system path to the folder to upload

  • prefix (str) –

    Base for the ID of the SOAP record.

    If the parameter is not empty, ‘/’ will automatically be appended.

Return type

None

Raises
Available

CScript

soap::upload_folder

CSOAP.download(ID)

Download data from the SOAP connection which is identified by a unique ID.

Parameters

ID (str) – The unique ID for the SOAP service to identify the data to download.

Returns

The downloaded data

Return type

str | bytearray, depending on the data on the service

Raises
Available

CScript

soap::download

CSOAP.createQuery()

Creates a new transaction query object for this connection.

Returns

A new query object

Return type

CQuery

Raises

CometError – On internal error

Available

CScript

sql::query