コード例 #1
0
ファイル: wsdl2dispatch.py プロジェクト: mikedougherty/ZSI
    def getTypesModuleName(self):
        '''return module name.
        '''
        assert self.wsdl is not None, 'initialize, call fromWSDL'
        if self.types_module_name is not None:
            return self.types_module_name

        wsm = WriteServiceModule(self.wsdl)
        return wsm.getTypesModuleName()
コード例 #2
0
    def getTypesModuleName(self):
        '''return module name.
        '''
        assert self.wsdl is not None, 'initialize, call fromWSDL'
        if self.types_module_name is not None:
            return self.types_module_name

        wsm = WriteServiceModule(self.wsdl)
        return wsm.getTypesModuleName()
コード例 #3
0
ファイル: utility.py プロジェクト: 360ed/ZSI
def GetPartsSubNames(args, wsdl):
    do_extended = True
    from wsdl2python import WriteServiceModule, SchemaDescription
    wsm = WriteServiceModule(wsdl, do_extended=do_extended)
    wsm.gatherNamespaces()
    toReturn = []
    for arg in args:
        argSubnames = []
        for l in wsm.usedNamespaces.values():
            for schema in l:
                sd = SchemaDescription(do_extended=do_extended)
                sd.fromSchema(schema)
                argNamespace = arg.element[0]
                if (sd.targetNamespace == argNamespace):
                    for i in sd.items:
                        # arg.name is the part name, but we want it's type
                        argElementType = arg.element[1]
                        if str(argElementType) == str(i.content.name):
                            argSubnames = []
			    # I'm not sure when the name attribute was dropped
			    # but at some point, or in some circumstance it's not
			    # there, but instead a ref attribute is there which is
		     	    # tuple of (namespace, name). This hack fixes things, 
			    # but I'm not sure why this happens or has happened.
			    # IRJ - 2005-05-25
                            if i.content.mgContent != None:
                                for c in i.content.mgContent:
                                    nValue = "None"
                                    if c.isWildCard():
                                        nValue="any"
                                    elif c.attributes.has_key("name"):
                                        nValue = c.attributes["name"]
                                    elif c.attributes.has_key("ref"):
                                        nValue = c.attributes["ref"][1]
                                    argSubnames.append(nValue)

        toReturn.append(argSubnames)
    return toReturn
コード例 #4
0
ファイル: utility.py プロジェクト: amishHammer/pyremotevbox
def GetPartsSubNames(args, wsdl):
    do_extended = True
    from wsdl2python import WriteServiceModule, SchemaDescription
    wsm = WriteServiceModule(wsdl, do_extended=do_extended)
    wsm.gatherNamespaces()
    toReturn = []
    for arg in args:
        argSubnames = []
        for l in wsm.usedNamespaces.values():
            for schema in l:
                sd = SchemaDescription(do_extended=do_extended)
                sd.fromSchema(schema)
                argNamespace = arg.element[0]
                if (sd.targetNamespace == argNamespace):
                    for i in sd.items:
                        # arg.name is the part name, but we want it's type
                        argElementType = arg.element[1]
                        if str(argElementType) == str(i.content.name):
                            argSubnames = []
                            # I'm not sure when the name attribute was dropped
                            # but at some point, or in some circumstance it's not
                            # there, but instead a ref attribute is there which is
                            # tuple of (namespace, name). This hack fixes things,
                            # but I'm not sure why this happens or has happened.
                            # IRJ - 2005-05-25
                            if i.content.mgContent != None:
                                for c in i.content.mgContent:
                                    nValue = "None"
                                    if c.isWildCard():
                                        nValue = "any"
                                    elif c.attributes.has_key("name"):
                                        nValue = c.attributes["name"]
                                    elif c.attributes.has_key("ref"):
                                        nValue = c.attributes["ref"][1]
                                    argSubnames.append(nValue)

        toReturn.append(argSubnames)
    return toReturn