Changeset 1645 for TI07-MOLES


Ignore:
Timestamp:
29/10/06 19:47:33 (13 years ago)
Author:
lawrence
Message:

More changes associated with move of discovery to wsgi

Location:
TI07-MOLES/trunk/PythonCode/browse/portal/cgi
Files:
1 added
7 edited
2 moved

Legend:

Unmodified
Added
Removed
  • TI07-MOLES/trunk/PythonCode/browse/portal/cgi/browse/config.test

    r1644 r1645  
    22[SEARCH] 
    33script:             discovery.py 
    4 server:             http://localhost.localdomain:8000/cgi/ 
     4server:             http://localhost.localdomain/ 
    55advancedURL:        %(server)s%(script)s?advanced=1 
    66discoveryURL:       %(server)s%(script)s 
  • TI07-MOLES/trunk/PythonCode/browse/portal/cgi/browse/serviceMap.config

    r1182 r1645  
    44# 
    55[DEFAULT] 
    6 localhost: http://localhost.localdomain:8000/cgi 
    7 layout:    /layout 
     6localhost: http://localhost.localdomain/ 
     7layout:    layout 
    88#localhost: http://glue.badc.rl.ac.uk/cgi-bin/ 
    99 
  • TI07-MOLES/trunk/PythonCode/browse/portal/cgi/browse/stubB.py

    r1644 r1645  
    9292        ''' Holds the stub-b document and provides methods which get and manipulate it ''' 
    9393         
    94         def __init__(self,xml,ServiceBinding=ServiceBinding,serviceFile='cgi/serviceMap.config'): 
     94        def __init__(self,xml,ServiceBinding=ServiceBinding,serviceFile='serviceMap.config'): 
    9595                 
    9696                '''Instantiate by parsing an xml document passed in as a string ''' 
  • TI07-MOLES/trunk/PythonCode/browse/portal/cgi/discovery.py

    r1586 r1645  
    88from browse.Utilities import Request, Response 
    99 
    10 config=myConfig('cgi/browse/config.test') 
     10configDir='cgi/browse/' 
    1111 
    1212env=os.environ 
    13 discovery=DiscoveryGUI(Request(env,cgi),config) 
     13 
     14 
     15discovery=DiscoveryGUI(Request(env,cgi),configDir) 
    1416 
    1517response=Response() 
  • TI07-MOLES/trunk/PythonCode/browse/portal/cgi/discovery/DiscoveryService_services.py

    r1577 r1645  
    3737        # no output wsaction 
    3838        response = self.binding.Receive(doFullTextSearchResponse.typecode) 
    39         if isinstance(response, doFullTextSearchResponse.typecode.pyclass) is False: 
    40             raise TypeError, "%s incorrect response type" % (response.__class__) 
     39        return response 
     40 
     41    # op: doAuthorSearch 
     42    def doAuthorSearch(self, request): 
     43        if isinstance(request, doAuthorSearchRequest) is False: 
     44            raise TypeError, "%s incorrect request type" % (request.__class__) 
     45        kw = {} 
     46        # no input wsaction 
     47        self.binding.Send(None, None, request, soapaction="None", **kw) 
     48        # no output wsaction 
     49        response = self.binding.Receive(doAuthorSearchResponse.typecode) 
     50        return response 
     51 
     52    # op: doParameterSearch 
     53    def doParameterSearch(self, request): 
     54        if isinstance(request, doParameterSearchRequest) is False: 
     55            raise TypeError, "%s incorrect request type" % (request.__class__) 
     56        kw = {} 
     57        # no input wsaction 
     58        self.binding.Send(None, None, request, soapaction="None", **kw) 
     59        # no output wsaction 
     60        response = self.binding.Receive(doParameterSearchResponse.typecode) 
     61        return response 
     62 
     63    # op: doSpatioTemporalSearch 
     64    def doSpatioTemporalSearch(self, request): 
     65        if isinstance(request, doSpatioTemporalSearchRequest) is False: 
     66            raise TypeError, "%s incorrect request type" % (request.__class__) 
     67        kw = {} 
     68        # no input wsaction 
     69        self.binding.Send(None, None, request, soapaction="None", **kw) 
     70        # no output wsaction 
     71        response = self.binding.Receive(doSpatioTemporalSearchResponse.typecode) 
    4172        return response 
    4273 
     
    5081        # no output wsaction 
    5182        response = self.binding.Receive(doPresentResponse.typecode) 
    52         if isinstance(response, doPresentResponse.typecode.pyclass) is False: 
    53             raise TypeError, "%s incorrect response type" % (response.__class__) 
    5483        return response 
    5584 
     
    5887doFullTextSearchResponse = ns0.doFullTextSearchReturn_Dec().pyclass 
    5988 
     89doAuthorSearchRequest = ns0.doAuthorSearch_Dec().pyclass 
     90 
     91doAuthorSearchResponse = ns0.doAuthorSearchReturn_Dec().pyclass 
     92 
     93doParameterSearchRequest = ns0.doParameterSearch_Dec().pyclass 
     94 
     95doParameterSearchResponse = ns0.doParameterSearchReturn_Dec().pyclass 
     96 
     97doSpatioTemporalSearchRequest = ns0.doSpatioTemporalSearch_Dec().pyclass 
     98 
     99doSpatioTemporalSearchResponse = ns0.doSpatioTemporalSearchReturn_Dec().pyclass 
     100 
    60101doPresentRequest = ns0.doPresent_Dec().pyclass 
    61102 
  • TI07-MOLES/trunk/PythonCode/browse/portal/cgi/discovery/DiscoveryService_services_types.py

    r1577 r1645  
    88import ZSI.TCcompound 
    99from ZSI.TC import ElementDeclaration,TypeDefinition 
     10from ZSI.TC import _get_type_definition as GTD, _get_global_element_declaration as GED 
    1011from ZSI.generate.pyclass import pyclass_type 
    1112 
     
    2324        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw): 
    2425            ns = ns0.FullTextSearchType_Def.schema 
    25             TClist = [ZSI.TC.String(pname=(ns,"term"), aname="_term", minOccurs=1, maxOccurs=1, nillable=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname=(ns,"start"), aname="_start", minOccurs=0, maxOccurs=1, nillable=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname=(ns,"howMany"), aname="_howMany", minOccurs=0, maxOccurs=1, nillable=False, encoded=kw.get("encoded")), ns0.orderByType_Def(pname=(ns,"orderBy"), aname="_orderBy", minOccurs=0, maxOccurs=1, nillable=False, encoded=kw.get("encoded"))] 
     26            TClist = [ZSI.TC.String(pname=(ns,"term"), aname="_term", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname=(ns,"start"), aname="_start", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname=(ns,"howMany"), aname="_howMany", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","orderByType",lazy=False)(pname=(ns,"orderBy"), aname="_orderBy", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","scopeType",lazy=False)(pname=(ns,"scope"), aname="_scope", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded"))] 
    2627            self.attribute_typecode_dict = attributes or {} 
    2728            if extend: TClist += ofwhat 
     
    3738                    self._howMany = None 
    3839                    self._orderBy = None 
     40                    self._scope = [] 
    3941                    return 
    4042            Holder.__name__ = "FullTextSearchType_Holder" 
    4143            self.pyclass = Holder 
    4244 
     45    class AuthorSearchType_Def(ZSI.TCcompound.ComplexType, TypeDefinition): 
     46        schema = "urn:DiscoveryServiceAPI" 
     47        type = (schema, "AuthorSearchType") 
     48        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw): 
     49            ns = ns0.AuthorSearchType_Def.schema 
     50            TClist = [ZSI.TC.String(pname=(ns,"term"), aname="_term", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname=(ns,"start"), aname="_start", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname=(ns,"howMany"), aname="_howMany", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","orderByType",lazy=False)(pname=(ns,"orderBy"), aname="_orderBy", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","scopeType",lazy=False)(pname=(ns,"scope"), aname="_scope", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded"))] 
     51            self.attribute_typecode_dict = attributes or {} 
     52            if extend: TClist += ofwhat 
     53            if restrict: TClist = ofwhat 
     54            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
     55            class Holder: 
     56                __metaclass__ = pyclass_type 
     57                typecode = self 
     58                def __init__(self): 
     59                    # pyclass 
     60                    self._term = None 
     61                    self._start = None 
     62                    self._howMany = None 
     63                    self._orderBy = None 
     64                    self._scope = [] 
     65                    return 
     66            Holder.__name__ = "AuthorSearchType_Holder" 
     67            self.pyclass = Holder 
     68 
     69    class ParameterSearchType_Def(ZSI.TCcompound.ComplexType, TypeDefinition): 
     70        schema = "urn:DiscoveryServiceAPI" 
     71        type = (schema, "ParameterSearchType") 
     72        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw): 
     73            ns = ns0.ParameterSearchType_Def.schema 
     74            TClist = [ZSI.TC.String(pname=(ns,"term"), aname="_term", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname=(ns,"start"), aname="_start", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname=(ns,"howMany"), aname="_howMany", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","orderByType",lazy=False)(pname=(ns,"orderBy"), aname="_orderBy", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","scopeType",lazy=False)(pname=(ns,"scope"), aname="_scope", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded"))] 
     75            self.attribute_typecode_dict = attributes or {} 
     76            if extend: TClist += ofwhat 
     77            if restrict: TClist = ofwhat 
     78            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
     79            class Holder: 
     80                __metaclass__ = pyclass_type 
     81                typecode = self 
     82                def __init__(self): 
     83                    # pyclass 
     84                    self._term = None 
     85                    self._start = None 
     86                    self._howMany = None 
     87                    self._orderBy = None 
     88                    self._scope = [] 
     89                    return 
     90            Holder.__name__ = "ParameterSearchType_Holder" 
     91            self.pyclass = Holder 
     92 
     93    class SpatioTemporalSearchType_Def(ZSI.TCcompound.ComplexType, TypeDefinition): 
     94        schema = "urn:DiscoveryServiceAPI" 
     95        type = (schema, "SpatioTemporalSearchType") 
     96        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw): 
     97            ns = ns0.SpatioTemporalSearchType_Def.schema 
     98            TClist = [ZSI.TC.String(pname=(ns,"term"), aname="_term", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname=(ns,"start"), aname="_start", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname=(ns,"howMany"), aname="_howMany", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","orderByType",lazy=False)(pname=(ns,"orderBy"), aname="_orderBy", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","scopeType",lazy=False)(pname=(ns,"scope"), aname="_scope", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded"))] 
     99            self.attribute_typecode_dict = attributes or {} 
     100            if extend: TClist += ofwhat 
     101            if restrict: TClist = ofwhat 
     102            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
     103            class Holder: 
     104                __metaclass__ = pyclass_type 
     105                typecode = self 
     106                def __init__(self): 
     107                    # pyclass 
     108                    self._term = None 
     109                    self._start = None 
     110                    self._howMany = None 
     111                    self._orderBy = None 
     112                    self._scope = [] 
     113                    return 
     114            Holder.__name__ = "SpatioTemporalSearchType_Holder" 
     115            self.pyclass = Holder 
     116 
    43117    class PresentType_Def(ZSI.TCcompound.ComplexType, TypeDefinition): 
    44118        schema = "urn:DiscoveryServiceAPI" 
     
    46120        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw): 
    47121            ns = ns0.PresentType_Def.schema 
    48             TClist = [ZSI.TC.String(pname=(ns,"document"), aname="_document", minOccurs=0, maxOccurs=1, nillable=False, encoded=kw.get("encoded"))] 
     122            TClist = [ZSI.TC.String(pname=(ns,"document"), aname="_document", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","PresentFormatType",lazy=False)(pname=(ns,"format"), aname="_format", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))] 
    49123            self.attribute_typecode_dict = attributes or {} 
    50124            if extend: TClist += ofwhat 
     
    57131                    # pyclass 
    58132                    self._document = None 
     133                    self._format = None 
    59134                    return 
    60135            Holder.__name__ = "PresentType_Holder" 
     
    66141        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw): 
    67142            ns = ns0.PresentReturnType_Def.schema 
    68             TClist = [ZSI.TC.Boolean(pname=(ns,"status"), aname="_status", minOccurs=1, maxOccurs=1, nillable=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"statusMessage"), aname="_statusMessage", minOccurs=1, maxOccurs=1, nillable=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"document"), aname="_document", minOccurs=0, maxOccurs=1, nillable=False, encoded=kw.get("encoded"))] 
     143            TClist = [ZSI.TC.Boolean(pname=(ns,"status"), aname="_status", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"statusMessage"), aname="_statusMessage", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"document"), aname="_document", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))] 
    69144            self.attribute_typecode_dict = attributes or {} 
    70145            if extend: TClist += ofwhat 
     
    88163        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw): 
    89164            ns = ns0.SearchReturnType_Def.schema 
    90             TClist = [ZSI.TC.Boolean(pname=(ns,"status"), aname="_status", minOccurs=1, maxOccurs=1, nillable=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"statusMessage"), aname="_statusMessage", minOccurs=1, maxOccurs=1, nillable=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname=(ns,"resultId"), aname="_resultId", minOccurs=0, maxOccurs=1, nillable=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname=(ns,"hits"), aname="_hits", minOccurs=0, maxOccurs=1, nillable=False, encoded=kw.get("encoded")), ns0.DocumentsType_Def(pname=(ns,"documents"), aname="_documents", minOccurs=0, maxOccurs=1, nillable=False, encoded=kw.get("encoded"))] 
     165            TClist = [ZSI.TC.Boolean(pname=(ns,"status"), aname="_status", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"statusMessage"), aname="_statusMessage", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname=(ns,"resultId"), aname="_resultId", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.Iint(pname=(ns,"hits"), aname="_hits", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","DocumentsType",lazy=False)(pname=(ns,"documents"), aname="_documents", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))] 
    91166            self.attribute_typecode_dict = attributes or {} 
    92167            if extend: TClist += ofwhat 
     
    112187        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw): 
    113188            ns = ns0.DocumentsType_Def.schema 
    114             TClist = [ZSI.TC.String(pname=(ns,"document"), aname="_document", minOccurs=1, maxOccurs="unbounded", nillable=False, encoded=kw.get("encoded"))] 
     189            TClist = [ZSI.TC.String(pname=(ns,"document"), aname="_document", minOccurs=1, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded"))] 
    115190            self.attribute_typecode_dict = attributes or {} 
    116191            if extend: TClist += ofwhat 
     
    130205        schema = "urn:DiscoveryServiceAPI" 
    131206        type = (schema, "orderByType") 
     207        def __init__(self, pname, **kw): 
     208            ZSI.TC.String.__init__(self, pname, pyclass=None, **kw) 
     209            class Holder(str): 
     210                typecode = self 
     211            self.pyclass = Holder 
     212 
     213    class PresentFormatType_Def(ZSI.TC.String, TypeDefinition): 
     214        schema = "urn:DiscoveryServiceAPI" 
     215        type = (schema, "PresentFormatType") 
     216        def __init__(self, pname, **kw): 
     217            ZSI.TC.String.__init__(self, pname, pyclass=None, **kw) 
     218            class Holder(str): 
     219                typecode = self 
     220            self.pyclass = Holder 
     221 
     222    class scopeType_Def(ZSI.TC.String, TypeDefinition): 
     223        schema = "urn:DiscoveryServiceAPI" 
     224        type = (schema, "scopeType") 
    132225        def __init__(self, pname, **kw): 
    133226            ZSI.TC.String.__init__(self, pname, pyclass=None, **kw) 
     
    150243            if self.pyclass is not None: self.pyclass.__name__ = "doFullTextSearch_Dec_Holder" 
    151244 
     245    class doAuthorSearch_Dec(ElementDeclaration): 
     246        literal = "doAuthorSearch" 
     247        schema = "urn:DiscoveryServiceAPI" 
     248        def __init__(self, **kw): 
     249            kw["pname"] = ("urn:DiscoveryServiceAPI","doAuthorSearch") 
     250            kw["aname"] = "_doAuthorSearch" 
     251            if ns0.FullTextSearchType_Def not in ns0.doAuthorSearch_Dec.__bases__: 
     252                bases = list(ns0.doAuthorSearch_Dec.__bases__) 
     253                bases.insert(0, ns0.FullTextSearchType_Def) 
     254                ns0.doAuthorSearch_Dec.__bases__ = tuple(bases) 
     255 
     256            ns0.FullTextSearchType_Def.__init__(self, **kw) 
     257            if self.pyclass is not None: self.pyclass.__name__ = "doAuthorSearch_Dec_Holder" 
     258 
     259    class doParameterSearch_Dec(ElementDeclaration): 
     260        literal = "doParameterSearch" 
     261        schema = "urn:DiscoveryServiceAPI" 
     262        def __init__(self, **kw): 
     263            kw["pname"] = ("urn:DiscoveryServiceAPI","doParameterSearch") 
     264            kw["aname"] = "_doParameterSearch" 
     265            if ns0.ParameterSearchType_Def not in ns0.doParameterSearch_Dec.__bases__: 
     266                bases = list(ns0.doParameterSearch_Dec.__bases__) 
     267                bases.insert(0, ns0.ParameterSearchType_Def) 
     268                ns0.doParameterSearch_Dec.__bases__ = tuple(bases) 
     269 
     270            ns0.ParameterSearchType_Def.__init__(self, **kw) 
     271            if self.pyclass is not None: self.pyclass.__name__ = "doParameterSearch_Dec_Holder" 
     272 
     273    class doSpatioTemporalSearch_Dec(ElementDeclaration): 
     274        literal = "doSpatioTemporalSearch" 
     275        schema = "urn:DiscoveryServiceAPI" 
     276        def __init__(self, **kw): 
     277            kw["pname"] = ("urn:DiscoveryServiceAPI","doSpatioTemporalSearch") 
     278            kw["aname"] = "_doSpatioTemporalSearch" 
     279            if ns0.SpatioTemporalSearchType_Def not in ns0.doSpatioTemporalSearch_Dec.__bases__: 
     280                bases = list(ns0.doSpatioTemporalSearch_Dec.__bases__) 
     281                bases.insert(0, ns0.SpatioTemporalSearchType_Def) 
     282                ns0.doSpatioTemporalSearch_Dec.__bases__ = tuple(bases) 
     283 
     284            ns0.SpatioTemporalSearchType_Def.__init__(self, **kw) 
     285            if self.pyclass is not None: self.pyclass.__name__ = "doSpatioTemporalSearch_Dec_Holder" 
     286 
    152287    class doPresent_Dec(ElementDeclaration): 
    153288        literal = "doPresent" 
     
    178313            if self.pyclass is not None: self.pyclass.__name__ = "doFullTextSearchReturn_Dec_Holder" 
    179314 
     315    class doAuthorSearchReturn_Dec(ElementDeclaration): 
     316        literal = "doAuthorSearchReturn" 
     317        schema = "urn:DiscoveryServiceAPI" 
     318        def __init__(self, **kw): 
     319            kw["pname"] = ("urn:DiscoveryServiceAPI","doAuthorSearchReturn") 
     320            kw["aname"] = "_doAuthorSearchReturn" 
     321            if ns0.SearchReturnType_Def not in ns0.doAuthorSearchReturn_Dec.__bases__: 
     322                bases = list(ns0.doAuthorSearchReturn_Dec.__bases__) 
     323                bases.insert(0, ns0.SearchReturnType_Def) 
     324                ns0.doAuthorSearchReturn_Dec.__bases__ = tuple(bases) 
     325 
     326            ns0.SearchReturnType_Def.__init__(self, **kw) 
     327            if self.pyclass is not None: self.pyclass.__name__ = "doAuthorSearchReturn_Dec_Holder" 
     328 
     329    class doParameterSearchReturn_Dec(ElementDeclaration): 
     330        literal = "doParameterSearchReturn" 
     331        schema = "urn:DiscoveryServiceAPI" 
     332        def __init__(self, **kw): 
     333            kw["pname"] = ("urn:DiscoveryServiceAPI","doParameterSearchReturn") 
     334            kw["aname"] = "_doParameterSearchReturn" 
     335            if ns0.SearchReturnType_Def not in ns0.doParameterSearchReturn_Dec.__bases__: 
     336                bases = list(ns0.doParameterSearchReturn_Dec.__bases__) 
     337                bases.insert(0, ns0.SearchReturnType_Def) 
     338                ns0.doParameterSearchReturn_Dec.__bases__ = tuple(bases) 
     339 
     340            ns0.SearchReturnType_Def.__init__(self, **kw) 
     341            if self.pyclass is not None: self.pyclass.__name__ = "doParameterSearchReturn_Dec_Holder" 
     342 
     343    class doSpatioTemporalSearchReturn_Dec(ElementDeclaration): 
     344        literal = "doSpatioTemporalSearchReturn" 
     345        schema = "urn:DiscoveryServiceAPI" 
     346        def __init__(self, **kw): 
     347            kw["pname"] = ("urn:DiscoveryServiceAPI","doSpatioTemporalSearchReturn") 
     348            kw["aname"] = "_doSpatioTemporalSearchReturn" 
     349            if ns0.SearchReturnType_Def not in ns0.doSpatioTemporalSearchReturn_Dec.__bases__: 
     350                bases = list(ns0.doSpatioTemporalSearchReturn_Dec.__bases__) 
     351                bases.insert(0, ns0.SearchReturnType_Def) 
     352                ns0.doSpatioTemporalSearchReturn_Dec.__bases__ = tuple(bases) 
     353 
     354            ns0.SearchReturnType_Def.__init__(self, **kw) 
     355            if self.pyclass is not None: self.pyclass.__name__ = "doSpatioTemporalSearchReturn_Dec_Holder" 
     356 
    180357    class doPresentReturn_Dec(ElementDeclaration): 
    181358        literal = "doPresentReturn" 
  • TI07-MOLES/trunk/PythonCode/browse/portal/cgi/env.py

    r991 r1645  
    66env=os.environ 
    77print env 
    8 for i in env.keys(): 
    9     print '<p>#%s:%s#</p>'%i,env[i] 
     8#for i in env.keys(): 
     9#    print '<p>#%s:%s#</p>'%i,env[i] 
    1010 
  • TI07-MOLES/trunk/PythonCode/browse/portal/cgi/test_server.py

    r764 r1645  
    11# File: cgi_server.py 
     2import sys 
    23 
    34import CGIHTTPServer 
     
    56 
    67class Handler(CGIHTTPServer.CGIHTTPRequestHandler): 
    7     cgi_directories = ["/cgi"] 
     8    cgi_directories = ["/"] 
    89 
    9 PORT = 8000 
     10try: 
     11 port = int(sys.argv[1]) 
     12except: 
     13 port = 8000 
    1014 
    11 httpd = BaseHTTPServer.HTTPServer(("", PORT), Handler) 
    12 print "serving at port", PORT 
     15httpd = BaseHTTPServer.HTTPServer(("", port), Handler) 
     16print "serving at port", port 
    1317httpd.serve_forever() 
Note: See TracChangeset for help on using the changeset viewer.