MapGuide API Reference
 All Classes Functions Variables Enumerations Enumerator Friends
MgService* MgSiteConnection::CreateService ( INT32  serviceType)

Returns a new instance of the specified service from the site. A connection to the machine hosting the service will be created if required. Configuration information determines whether the service is hosted locally or not. The configuration information is stored in a file named webconfig.ini which is located in the same folder as the map agent. The parameters in this file can be modified using the web administration application.

.NET Syntax
MgService CreateService(int serviceType);
Java Syntax
MgService CreateService(int serviceType);
PHP Syntax
MgService CreateService(int serviceType);
Parameters:
serviceType(int) Type of service to create. See MgServiceType for valid service names.
Returns:
Returns the created service
Exceptions:
MgServiceNotSupportedExceptionif service type is not supported
MgConnectionNotOpenExceptionif connection has not been opened