packing dicts into typecode pyclass, may fail if typecodes are
        used in the body (when asdict=True)

def add_headers(self, **headers):
        """packing dicts into typecode pyclass, may fail if typecodes are
        used in the body (when asdict=True)
        """
        class _holder: pass
        def _remap(pyobj, **d):
            pyobj.__dict__ = d
            for k,v in pyobj.__dict__.items():
                if type(v) is not dict: continue
                pyobj.__dict__[k] = p = _holder()
                _remap(p, **v)
    
        for k,v in headers.items():
            h = filter(lambda i: k in i.type, self.callinfo.inheaders)[0]
            if h.element_type != 1: 
                raise RuntimeError, 'not implemented'

            typecode = GED(*h.type)
            if typecode is None: 
                raise RuntimeError, 'no matching element for %s' %str(h.type)

            pyclass = typecode.pyclass
            if pyclass is None: 
                raise RuntimeError, 'no pyclass for typecode %s' %str(h.type)

            if type(v) is not dict:
                pyobj = pyclass(v)
            else:
                pyobj = pyclass()
                _remap(pyobj, **v)

            self.soapheaders.append(pyobj)