Esempio n. 1
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()
Esempio n. 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()
Esempio n. 3
0
File: utility.py Progetto: 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
Esempio n. 4
0
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