Ignore:
Timestamp:
22/05/07 16:05:53 (13 years ago)
Author:
spascoe
Message:

Operations metadata inserted correctly for CSML WMS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/csml_wms.py

    r2502 r2507  
    1313from ows_common import exceptions as OWS_E 
    1414from ows_common.decorators import * 
    15 from ows_server.lib.csml import get_csml_doc 
     15from ows_server.lib.csml_util import get_csml_doc 
    1616 
    1717class CsmlWmsController(OwsController): 
     
    3030    @operation 
    3131    @parameter('Format', possibleValues=['text/xml']) 
    32     def GetCapabilities(self, file, service, version=None): 
     32    def GetCapabilities(self, file, service=None, version=None): 
    3333        """ 
    3434        @note: format and updatesequence parameters are not supported 
     
    3636 
    3737        """ 
     38 
     39        if service is None: 
     40            raise OWS_E.MissingParameterValue('SERVICE parameter not specified', 
     41                                              'SERVICE') 
    3842        if service != 'WMS': 
    39             raise OWS_E.MissingParameterValue('SERVICE parameter not specified', 
     43            raise OWS_E.InvalidParameterValue('SERVICE parameter must be "WMS"', 
    4044                                              'SERVICE') 
    4145         
     
    4347        c.ows_c = ET.parse(ows_c_file).getroot() 
    4448        c.dataset = get_csml_doc(file) 
     49        c.ows_capabilities = self._load_capabilities( 
     50            h.url_for(controller='csml_wms', file=file) 
     51            ) 
    4552         
    4653        return render_response('wms_service_metadata', format='xml') 
Note: See TracChangeset for help on using the changeset viewer.