Moxi Media Inc.
<WMS-SERVICE> Tree View | Discussion Forum
IMF Developer's Guide » Map Configuration » <WMS-SERVICE>  

The <WMS-SERVICE> element defines the communication protocols used to get images and data from a WMS server. Multiple WMS services can be defined in the <SERVICES> section, each assigned a unique name that is referenced when adding layers to the map.

Frequency Parent Elements (this element is valid within):
PRS+ <SERVICES>
   

Attributes Description
authentication The user name and password of the logon to a protected server, separated by a colon and no spaces, example "doug:secret". Optional. Consider setting authentication using the authentication.properties file instead for better security.
authentication-id The authentication id as specified in imf.properties to hold a username and password. Optional. Consider setting authentication using the authentication.properties file instead for better security.
forward An indicator of whether the image should be forwarded by the IMF server instead of being read directly from the WMS service. This is useful where a secure server are involved and the user doesn't have permission to access it. Valid values are "true" or "false". Optional, defaults to "false".
service-id A unique name that you assign to this WMS service that will be referenced in the wms-service-id attribute entries of <WMS-LAYER> elements in the Layers section. The value should start with a character, contain only alphabetic characters and numers, and no spaces. Required.
srs The spatial reference system code that defines the projection of this service. For best performance, use the same SRS as the one defined in the <MAP> element. If a service is unable to respond in the same SRS as the desired map projection, and a different SRS is defined for the service, the data will be automatically projected. The SRS used must be one of the ones defined in the <SRS-LIST> element, example "EPSG:4326". Required.
version The WMS version number for this service. The WMS version refers to the OGC specification that the server uses. Typical values are "1.0.0", "1.1.0", and "1.1.1". This value should match the value reported from the WMS server in its capabilities response. Required.
   

Frequency Child Elements
RS1 <GET-MAP>
OS1 <GET-FEATURE-INFO>
   

Frequency Description (in this context)
PRS+ The <WMS-SERVICE> element must appear one or more times in the <SERVICES> element.
RS1 The <GET-MAP> element must appear exactly once.
OS1 Because not all WMS servers support feature info requests, the <GET-FEATURE-INFO> element is optional, and may appear zero or one time within the <WMS-LAYER> element in the specified sequence.
   

Example:

<WMS-SERVICE
 service-id="GISI"
 version="1.1.0"
 srs="EPSG:42102">
   <GET-MAP
    format="image/png"
    exception-format="application/vnd.ogc.se_blank"
    href="http://moximedia.com/cgi-bin/wms_gisi" />
   <GET-FEATURE-INFO 
    format="application/vnd.ogc.gml"
    parser="com.moximedia.ows.xml.GetFeatureInfoMapServer"
    exception-format="application/vnd.ogc.se_xml"
    href="http://moximedia.com/cgi-bin/wms_gisi" /> 
</WMS-Service>

Valid HTML 4.01!