def _call(self, name, soapheaders):
def call_closure(*args, **kwargs):<EOL><INDENT>"""<STR_LIT>"""<EOL>if len(args) and len(kwargs):<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT>if len(args) > <NUM_LIT:0>:<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT>if len(kwargs): <EOL><INDENT>args = kwargs<EOL><DEDENT>callinfo = getattr(self, name).callinfo<EOL>for method in self._methods[name]:<EOL><INDENT>if len(method.callinfo.inparams) == len(kwargs):<EOL><INDENT>callinfo = method.callinfo<EOL><DEDENT><DEDENT>binding = _Binding(url=self._url or callinfo.location,<EOL>soapaction=callinfo.soapAction,<EOL>**self._kw)<EOL>kw = dict(unique=True)<EOL>if callinfo.use == '<STR_LIT>':<EOL><INDENT>kw['<STR_LIT>'] = False<EOL><DEDENT>if callinfo.style == '<STR_LIT>':<EOL><INDENT>request = TC.Struct(None, ofwhat=[], <EOL>pname=(callinfo.namespace, name), **kw)<EOL>response = TC.Struct(None, ofwhat=[], <EOL>pname=(callinfo.namespace, name+"<STR_LIT>"), **kw)<EOL>if len(callinfo.getInParameters()) != len(args):<EOL><INDENT>raise RuntimeError('<STR_LIT>' %(<EOL>str(callinfo.getInParameters(), str(args))))<EOL><DEDENT>for msg,pms in ((request,callinfo.getInParameters()), <EOL>(response,callinfo.getOutParameters())):<EOL><INDENT>msg.ofwhat = []<EOL>for part in pms:<EOL><INDENT>klass = GTD(*part.type)<EOL>if klass is None:<EOL><INDENT>if part.type:<EOL><INDENT>klass = [gt for gt in TC.TYPES if part.type==gt.type]<EOL>if len(klass) == <NUM_LIT:0>:<EOL><INDENT>klass = [gt for gt in TC.TYPES if part.type[<NUM_LIT:1>]==gt.type[<NUM_LIT:1>]]<EOL>if not len(klass):klass = [TC.Any]<EOL><DEDENT>if len(klass) > <NUM_LIT:1>: <EOL><INDENT>klass = [i for i in klass if '<STR_LIT:type>' in i.__dict__]<EOL><DEDENT>klass = klass[<NUM_LIT:0>]<EOL><DEDENT>else:<EOL><INDENT>klass = TC.Any<EOL><DEDENT><DEDENT>msg.ofwhat.append(klass(part.name))<EOL><DEDENT>msg.ofwhat = tuple(msg.ofwhat)<EOL><DEDENT>if not args: args = {}<EOL><DEDENT>else:<EOL><INDENT>ipart,opart = callinfo.getInParameters(),callinfo.getOutParameters()<EOL>if ( len(ipart) != <NUM_LIT:1> or not ipart[<NUM_LIT:0>].element_type or <EOL>ipart[<NUM_LIT:0>].type is None ):<EOL><INDENT>raise RuntimeError('<STR_LIT>' %callinfo.name)<EOL><DEDENT>if ( len(opart) not in (<NUM_LIT:0>,<NUM_LIT:1>) or not opart[<NUM_LIT:0>].element_type or <EOL>opart[<NUM_LIT:0>].type is None ):<EOL><INDENT>raise RuntimeError('<STR_LIT>' %callinfo.name)<EOL>
return the Call to the named remote web service method.
        closure used to prevent multiple values for name and soapheaders 
        parameters