Beispiel #1
0
    def reset_interface(self):
        self.namespaces = odict()
        self.classes = {}
        self.imports = {}

        self.nsmap = dict(rpclib.const.xml_ns.const_nsmap)
        self.prefmap = dict(rpclib.const.xml_ns.const_prefmap)

        self.nsmap['tns'] = self.get_tns()
        self.prefmap[self.get_tns()] = 'tns'
Beispiel #2
0
    def reset_interface(self):
        self.namespaces = odict()
        self.classes = {}
        self.imports = {}

        self.nsmap = dict(rpclib.const.xml_ns.const_nsmap)
        self.prefmap = dict(rpclib.const.xml_ns.const_prefmap)

        self.nsmap['tns'] = self.get_tns()
        self.prefmap[self.get_tns()] = 'tns'
Beispiel #3
0
def etree_to_dict(element, iterable=(list, list.append)):
    if (element.text is None) or element.text.isspace():
        retval = odict()
        for elt in element:
            if not (elt.tag in retval):
                retval[elt.tag] = iterable[0]()
            iterable[1](retval[elt.tag], etree_to_dict(elt, iterable))

    else:
        retval = element.text

    return retval
Beispiel #4
0
def etree_to_dict(element, iterable=(list,list.append)):
    if (element.text is None) or element.text.isspace():
        retval = odict()
        for elt in element:
            if not (elt.tag in retval):
                retval[elt.tag] = iterable[0]()
            iterable[1](retval[elt.tag], etree_to_dict(elt, iterable))

    else:
        retval = element.text

    return retval
Beispiel #5
0
def etree_to_dict(element, iterable=(list, list.append)):
    """Takes an xml root element and returns the corresponding dict. The second
    argument is a pair of iterable type and the function used to add elements to
    the iterable. The xml attributes are ignored.
    """

    if (element.text is None) or element.text.isspace():
        retval = odict()
        for elt in element:
            if not (elt.tag in retval):
                retval[elt.tag] = iterable[0]()
            iterable[1](retval[elt.tag], etree_to_dict(elt, iterable))

    else:
        retval = element.text

    return retval
Beispiel #6
0
def etree_to_dict(element, iterable=(list, list.append)):
    """Takes an xml root element and returns the corresponding dict. The second
    argument is a pair of iterable type and the function used to add elements to
    the iterable. The xml attributes are ignored.
    """

    if (element.text is None) or element.text.isspace():
        retval = odict()
        for elt in element:
            if not (elt.tag in retval):
                retval[elt.tag] = iterable[0]()
            iterable[1](retval[elt.tag], etree_to_dict(elt, iterable))

    else:
        retval = element.text

    return retval
Beispiel #7
0
    def __init__(self, parent, services, tns, name=None):
        self.__ns_counter = 0

        self.parent = parent
        self.services = services
        self.__tns = tns
        self.__name = name

        self.call_routes = {}
        self.namespaces = odict()
        self.classes = {}
        self.imports = {}

        self.nsmap = dict(rpclib.const_nsmap)
        self.prefmap = dict(rpclib.const_prefmap)

        self.nsmap['tns'] = tns
        self.prefmap[tns] = 'tns'

        self.populate_interface()
Beispiel #8
0
    def __init__(self, parent, services, tns, name=None):
        self.__ns_counter = 0

        self.parent = parent
        self.services = services
        self.__tns = tns
        self.__name = name

        self.call_routes = {}
        self.namespaces = odict()
        self.classes = {}
        self.imports = {}

        self.nsmap = dict(rpclib.const_nsmap)
        self.prefmap = dict(rpclib.const_prefmap)

        self.nsmap['tns']=tns
        self.prefmap[tns]='tns'

        self.populate_interface()
Beispiel #9
0
    def __init__(self, parent, services, tns, name=None, import_base_namespaces=False):
        self.__ns_counter = 0

        # FIXME: this belongs in the wsdl class
        self.import_base_namespaces = import_base_namespaces

        self.parent = parent
        self.services = services
        self.__tns = tns
        self.__name = name
        self.url = None

        self.call_routes = {}
        self.namespaces = odict()
        self.classes = {}
        self.imports = {}

        self.nsmap = dict(rpclib.const.xml_ns.const_nsmap)
        self.prefmap = dict(rpclib.const.xml_ns.const_prefmap)

        self.nsmap['tns']=tns
        self.prefmap[tns]='tns'

        self.populate_interface()
Beispiel #10
0
 def __init__(self):
     self.elements = odict()
     self.types = odict()
Beispiel #11
0
 def __init__(self):
     self.elements = odict()
     self.types = odict()
Beispiel #12
0
    def __init__(self, interface):
        InterfaceDocumentBase.__init__(self, interface)

        self.schema_dict = {}
        self.validation_schema = None
        self.namespaces = odict()