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:

InDesign® comet_pdf® Illustrator®

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:

InDesign® comet_pdf® Illustrator®

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:

InDesign® comet_pdf® Illustrator®

CScript:

soap::language

CSOAP.setLanguage(language)

Set the connection language.

Parameters:

language (str) – The language

Return type:

None

Raises:
Available:

InDesign® comet_pdf® Illustrator®

CScript:

soap::setlanguage

CSOAP.getClient()

Get the client name this connection was established with.

Returns:

The client name

Return type:

str

Raises:

CometError – On internal error

Available:

InDesign® comet_pdf® Illustrator®

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:

InDesign® comet_pdf® Illustrator®

CScript:

soap::charset

CSOAP.getMessage(code)

Get the description for a result or errorcode.

Parameters:

code (int) – The error or result code to get a description for.

Raises:
Available:

InDesign® comet_pdf® Illustrator®

CScript:

soap::getmessage

CSOAP.call(method)

Create a new transaction query for calls of the generic SOAP operation call.

Calling this function is the same as calling createQuery() followed by CQuery.send() with the command parameter set to ‘call method’.

The call has exactly one column of type constants.kString as the result.

Parameters:

method (str) – Method that should be called.

Returns:

A newly created query with the provided method call.

Return type:

CQuery

Raises:
Available:

InDesign® comet_pdf® Illustrator®

CScript:

soap::call

CSOAP.getList(method)

Create a transaction for the SOAP operation getList.

Calling this function is the same as calling createQuery() followed by CQuery.send() with the command parameter set to ‘getList method’.

All SQL and SOAP key words are case IN sensitive.

Parameters:

method (str) – Method that should be called.

Returns:

A newly created query with the provided method call.

Return type:

CQuery

Raises:
Available:

InDesign® comet_pdf® Illustrator®

CScript:

soap::getlist

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:

InDesign® comet_pdf® Illustrator®

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:

InDesign® comet_pdf® Illustrator®

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:

InDesign® comet_pdf® Illustrator®

CScript:

soap::upload_folder

CSOAP.uploadMetaData(path)

Upload of all description data required for the comet plugins for placeholders, scripts, … .

Parameters:

path (str) – Path of the description data.

Return type:

None

Raises:
Available:

InDesign® comet_pdf® Illustrator®

CScript:

soap::upload_metadata

CSOAP.uploadTemplates(path)

Upload all templates to the server.

Parameters:

path (str) – Path of the description data.

Return type:

None

Raises:
Available:

InDesign® comet_pdf® Illustrator®

CScript:

soap::upload_pageitems

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:

InDesign® comet_pdf® Illustrator®

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:

InDesign® comet_pdf® Illustrator®

CScript:

sql::query

Special methods

CSOAP.__repr__()

String representation.

Returns:

<CSOAP> Label: Label

Example
<CSOAP> Label: http://127.0.0.1:40080/CometBridge/Comet3Service

Return type:

str