Purpose
Returns information about the Library Services, such as the current mode of operation, version, or default URL for the Library Service. It also gives the list of CSW URL's exposed by the MapInfo Manager server.
Syntax
LibraryServiceInfo( attribute )
attribute is a code indicating the type of information to return; see table below.
Description
The LibraryServiceInfo() function returns one piece of information about the Library Services.
The attribute parameter is a value from the table below. Codes in the left column are defined in MAPBASIC.DEF.
attribute code | ID | LibraryServiceInfo() returns |
---|---|---|
LIBSRVC_INFO_LIBSRVCMODE | 1 | Integer result, indicating the current mode of operation of the Library Service. |
LIBSRVC_INFO_LIBVERSION | 2 | String result, indicating the version of the Library Service. The default Library Service URL should be set before calling this function. |
LIBSRVC_INFO_DEFURLPATH | 3 | String result, indicating the default URL for the Library Service. The default value for the Library URL is an empty string. |
LIBSRVC_INFO_LISTCSWURL | 4 | String result, gives the list of CSW URL's exposed by the MapInfo Manager sever as a single string delimited by a semi-colon ( ; ). |
Example
The following example shows how to use this function:
include "mapbasic.def"
declare sub main
sub main
dim liburlpath as string
dim libversion as string
liburlpath = LibraryServiceInfo(LIBSRVC_INFO_DEFURLPATH)if
StringCompare(liburlpath, "") == 0 then
Set LibraryServiceInfo URL
"http://localhost:8080/LibraryService/LibraryService"
endif
libversion = LibraryServiceInfo(LIBSRVC_INFO_LIBVERSION)
end sub
See Also:
Set LibraryServiceInfo statement