SOAP Interface

Estimated reading: 15 minutes


The SOAP functionality must be available for both communication partners of PHP. (–with-soap) Prepared functions for the client and the server are available for LIMBAS. The server functions can be found in ‘extra/soap/server.php’. For the client, you can use the complete ‘public’ directory as a template. All basic settings in ‘lib/config.lib’ can be customized.


# Autentication
$LIM["username"] = "limbasusername";
$LIM["pass"] = "pass";
// absolute path to LIMBAS
$LIM["lmpath"] = "/usr/local/httpd/htdocs/limbas_2/dependent";  
// Serveraddress to Limbas
$LIM["lim_server"] = ""; 
// Server URL to LIMBAS
$LIM["lim_urlPath"] = "/limbas_2/dependent"; 
$LIM["lim_url"] = "http://" . $LIM["lim_server"] . "/" . $LIM["lim_urlPath"];
// session name
$LIM["session_name"] = "limbas_".rtrim(base64_encode($LIM["username"]),"=");
$LIM["session_soap_name"] = $LIM["session_name"];
// soap activ / inactiv
$LIM["use_soap"] = 1; 
// cookie activ / inactiv
$LIM["use_cookie"] = 0; 
// name of cacheCookie
$LIM["cookieCache_name"] = "cacheCookie";
// absolute path to public root
$LIM["cache_home"] = "/usr/local/limbas/htdocs/limbas_2/public/";
// absolute path to cookie file
 $LIM["cookie_path"] = $LIM["cache_home"]."/cache/".$LIM["cookieCache_name"];
// relative path to file cache
$LIM["cacheFolder"] = "cache/";
// relative path to data cache
$LIM["dbFolder"] = "db"; 
// the number of the ram disk (should be set manually by admin   
$LIM["ramDisk"] = 15;
// if true files are cached and downloaded from the cache when available   
$LIM["cacheFile"] = false;
// if true files are cached and downloaded from the cache when available   
$LIM["cacheQuery"] = false;
// Max size in MB for the cache
$LIM["cacheSizeLimit"] = 200; 
// seconds without checking if a new version of the file exists
$LIM["cacheMinExpiration"] =  48 * 60 * 60; 
// %
$LIM["cacheToFree"] = 20; 
// for md5 encryption of url
$LIM["key"] = "PASWORD";



call_client – Initializes the SOAP Request This function executes a request to the SOAP server and returns a result array.

mixed call_client  ( Array $lmpar)


cache_call_client – initializes the SOAP query and caches the content. This function executes a request to the SOAP server and returns a result array.

mixed cache_call_client  ( Array $lmpar)

The functions call_client and cache_call_client can also be mixed in one call.

Parameter definition of $lmpar

The array $lmpar defines the parameter properties. Using [$lmpar[0]] .. [$lmpar[1]] with only one SOAP call, multiple requests can be transferred at once. A single request is defined by [$lmpar[0]].


Use real table and field names instead of IDs (applies globally)

["use_noids"] = boolean $use_noids

Parameters for the return of Environment Variables from LIMBAS.

["getvars"] = array('fresult'[,'gtab'][,'gfield'][,'umgvar'][,'gselect'][,'userdat'][,'groupdat'][,'gmimetypes'][,'greminder'][,'workflow']);

Parameters for the action to be carried out.

["action"] = ['gtab_erg']['explorer_main'];

$TABID of the required table

["gtabid"] = number $TABID;

Required fields in the table $TABID; Specification required!

[$TABID]["showfields"] = array($FIELDID,$FIELDID...)

Parameter for search criteria (see ‘search’)

[$TABID]["gsr"] = array($gsr)

Show number of hits: If no value is entered the LIMBAS default setting is taken.

[$TABID]["count"] = number $count

Show page: If no value is entered, the first page is displayed.

[$TABID]["res_next"] = number $page

Sort: If no value is entered, it is sorted according to the LIMBAS default setting.

[$gtabid]["order"] = Array ['$FIELDID,ASC']

Limitation of the field contents of the Text or Long field type Long content can be limited on the server side.

[$TABID]["fieldlimit"][$FIELDID] = number $digits

Thumbnail generation of images of the upload field type. Images can be reduced on the server side.

[$TABID]["thumbsize"][$FIELDID] = mixed [$width] [$width x $height] [$width x] [x $height]

Convert all applicable characters to HTML entities

[$TABID]["noencode"] = 1


Find Tables

Search criteria are defined by the parameter [“gsr”].
A maximum of as many and / or searches can be placed over a field as specified in the $umgvar [“searchcount”].

["gsr"][$TABID][$FIELDID][$listid] = mixed $seachrvalue
$gsrres = $gsr[$gtabid][$key][$key1];			# searchvalue
$gsstxt = $gsr[$gtabid][$key]["txt"][$key1];		# text sensitive		
$gssnum = $gsr[$gtabid][$key]["num"][$key1];		# numeric
$gsscs = $gsr[$gtabid][$key]["cs"][$key1];		# case sensitive
$gsandor = $gsr[$gtabid][$key]["andor"][$key1]; 	# and or
$gsstring = $gsr[$gtabid][$key]["string"][$key1];	# find all words
$gsneg = $gsr[$gtabid][$key]["neg"][$key1];		# negotiation
$gsr[$gtabid]['ID'] = ;				# get record with specific ID


Filter Reminder

Data sets that are provided with reminders can be filtered with additional search criteria:

  • reminder : # Wiedervorlagen ID
  • reminder_group : # Group assigned the reminder (group_id)
  • reminder_user : # User to whom the reminder was assigned (user_id)
  • reminder_create : # User who created the reminder (user_id | user_name)
  • reminder_date : # Date of the reminder (date)
  • reminder_from : # from date (date)
  • reminder_to : # to date (date)

Recursive Result

The result array can be supplemented with contents of linked tables.
Where $VTABID is the table ID of the linked table. Multiple tables and recursive sublinks can be specified. Tables with links to themselves dissolve completely. The search parameter can also be applied to the linkage tables.

Returns the number of linked records:

[$VTABID]["showfields"] = array($FIELDID,$FIELDID);

Returns an array with the IDs of linked records:

$lmpar[0][$gtabid]["relationval"] = 1;

A table query can be filtered on existing links. For example, all correspondences of a specific person.

[$VTABID]["relation"]["gtabid"] = $GTABID;
[$VTABID]["relation"]["fieldid"] = $FIELDID;
[$VTABID]["relation"]["ID"] = $ID;
[$VTABID]["relation"]["type"] = [1][2];


In this example, the order table should have the ID 1 and the customer table the ID 2. Customer is linked via the field with ID 10 to order.


Data can also be written via the SOAP interface.

Create Record

["gnup"][$FIELDID] = mixed value
["gtabid"] = numeric $TABID;
["action"] = "gtab_new"

For further actions, the return value “new_x” (new_0) is available on the server.

Archive/delete Record

["gtabid"] = numeric $TABID;
["action"] = "gtab_hide" | "gtab_delete"
["id"] = numeric $DATAID

Edit Record

["gup"][$TABID,$FIELDID,$DATID] = mixed value
["gtabid"] = numeric $TABID;
["action"] = "gtab_change"

If one has the respective IDs of two data sets of different tables for which a link exists, these can be linked together. The link is defined by the field ID of the respective field. At least in one table, a field with the type “link” must be defined. The parameter “verkn_add_ID” creates a link; where “verkn_del_ID” deletes a link. Mind you, only the links, not the associated records.

["gnup"]["verknpf"][] = 1
["gnup"]["verkn_tabid"][] = numeric $TABID of source table
["gnup"]["verkn_fieldid"][] = numeric $FIELDID of source table
["gnup"]["verkn_ID"][] = numeric $DATID of source table
["gnup"]["verkn_add_ID"][] = numeric/Array) $DATID of destination table / create relation
["gnup"]["verkn_del_ID"][] = (numeric/Array) $DATID of destination table / drop relation
["gnup"]["verkn_linkParam"][] = array() # special params for extended fields; array("FIELDNAME_1"=>"CONTENT_1","FIELDNAME_2"=>"CONTENT_2")
["gtabid"] = numeric $TABID of source table
["action"] = "gtab_change"


Search Reminder

Create Reminder

Delete Reminder


Content of field type “file upload”

If the uploaded table contains fields of type Upload, the result will be the metadata of the file.

Simple File Upload

The simple file upload allows uploading a file to the “/tmp” directory of the server. This file can then be processed further. This file upload has nothing to do with the DMS functionality of Limbas. To load a file into the Limbas-DMS the corresponding DMS file upload function can be used.
The file content to be uploaded must be encoded with base64_encode. The name of the file is freely selectable.

The content of the files to be uploaded must be encoded with base64_encode. The names of the files are freely selectable.


File Query

The query of the DMS system works via the action “explorer_main”.

["action"] = "explorer_main"
["LID"] = numeric $folderID
["typ"] = numeric
["sub"] = boolean
["ffilter"] = array

Folder Structure

If requested via the parameter “getvars”, the folder structure is defined via the array “filestruct”. The folder structure is put out as a list. The value “level” defines the higher order. level “0” denotes the root directory.

Upload Files

Download Files

In order to retrieve the contents of a file, the detour via the LIMBAS proxy is necessary. All we need is the “ID” of the file, which is available through the output array. The “proxy.php” is part of the LIMBAS SOAP client. A URL to retrieve a file can be created as follows:

$url = base64_encode("main.php?action=download&ID=2");
$md5 = md5($LIM["key"].$url);
$url = proxy.php?key=$md5&url=$url

Direct Backend Access

If direct access to the LIMBAS backend is available, the simplified download call can be used:

$url = "main.php?action=download&ID=2";

In addition, images can be converted to thumbnails. For this we need another soap call parameter that describes the size of the thumbnail.


As a result we get an additional link.

[link] => "URL TO THE FILE"

Upload files and link via advanced FileManager

To link an uploaded file directly to a record via the extendedFileManager, the following code has to be added in the example above (upload file):

$lmpar[0]["upload_file"]["link"]["verkn_tabid"][0] = $tabid; //target table
$lmpar[0]["upload_file"]["link"]["verkn_fieldid"][0] = $fieldid; //target field
$lmpar[0]["upload_file"]["link"]["verkn_ID"][0] = $datid; //target record


The soap interface of LIMBAS can be supplemented with own extensions. These must be in one of the extension files named “”. The function has three optional parameters:

  • $param_string = total parameter as string
  • $param_array = Parameters separated by an array by “,”
  • $lmb = current SOAP output array

The soap return is the return value of the function.

The call is done by:

$lmpar[0]["extension"][function] = params []
Share this Doc

SOAP Interface

Or copy link