Web API Reference | MapGuide Open Source

- Overview
- Modules
- Classes

CreateService
GetSite
MgSiteConnection
Open
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:
  | MgServiceNotSupportedException | if service type is not supported
  | MgConnectionNotOpenException | if connection has not been opened

Comments or suggestions? Send us feedback.