rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
process = subprocess.Popen(['python %s' %cmd, port], env=ENVIRON) | process = subprocess.Popen(['python', cmd, port], env=ENVIRON) | def _LaunchContainer(cmd): ''' Parameters: cmd -- executable, sets up a ServiceContainer or ? ''' host = CONFIG_PARSER.get(SECTION_DISPATCH, 'host') port = CONFIG_PARSER.get(SECTION_DISPATCH, 'port') try: process = subprocess.Popen(['python %s' %cmd, port], env=ENVIRON) except: print >>sys.stderr, 'error executing: %s'... |
print >>sw, \ '<%s%s%s%s>%s' % (n, attrtext, idstr, tstr, pyobj) | def serialize(self, sw, pyobj, name=None, attrtext='', orig=None, **kw): objid = '%x' % id(pyobj) n = name or self.oname or ('E' + objid) if type(pyobj) in _seqtypes: print >>sw, '<%s%s href="%s"/>' % (n, attrtext, pyobj[0]) return if not self.unique and sw.Known(orig or pyobj): print >>sw, '<%s%s href="#%s"/>' % (n, a... | |
print >>sw, '</%s>' % n[:i - 1] else: print >>sw, '</%s>' % n | ctag = '</%s>' % n[:i - 1] else: ctag = '</%s>' % n print >>sw, \ '<%s%s%s%s>%s%s' % (n, attrtext, idstr, tstr, pyobj, ctag) | def serialize(self, sw, pyobj, name=None, attrtext='', orig=None, **kw): objid = '%x' % id(pyobj) n = name or self.oname or ('E' + objid) if type(pyobj) in _seqtypes: print >>sw, '<%s%s href="%s"/>' % (n, attrtext, pyobj[0]) return if not self.unique and sw.Known(orig or pyobj): print >>sw, '<%s%s href="#%s"/>' % (n, a... |
except: | except Exception, e: | def do_POST(self): status = 500 try: if self.server.config.dumpHeadersIn: s = 'Incoming HTTP headers' debugHeader(s) print self.raw_requestline.strip() print "\n".join(map (lambda x: x.strip(), self.headers.headers)) debugFooter(s) |
s = 'Internal exception' | def do_POST(self): status = 500 try: if self.server.config.dumpHeadersIn: s = 'Incoming HTTP headers' debugHeader(s) print self.raw_requestline.strip() print "\n".join(map (lambda x: x.strip(), self.headers.headers)) debugFooter(s) | |
traceback.print_exc () | info = sys.exc_info() traceback.print_exception(info[0], info[1], info[2]) | def do_POST(self): status = 500 try: if self.server.config.dumpHeadersIn: s = 'Incoming HTTP headers' debugHeader(s) print self.raw_requestline.strip() print "\n".join(map (lambda x: x.strip(), self.headers.headers)) debugFooter(s) |
self.__class__.MessageWriter(self.aname_func) | self.__class__.MessageWriter(aname_func=self.aname_func) | myBinding['defs']['__init__'] = '\n%sdef __init__(self, addr, **kw):' %(ID1) |
'\n%sresponse = self.binding.Receive(%sWrapper())' % \ | '\n%sresponse = self.binding.Receive(%sWrapper)' % \ | '\n%sdef %s(self, request):' % \ |
% ( ID2, p.getName() ) | % ( ID2, self.aname_func(p.getName())) | self.typecode += '\n%sdef __init__(self, name=None, ns=None):'\ %(ID1) |
% ( ID2, self.aname(p.getName()), | % ( ID2, p.getName(), | self.typecode += '\n%sdef __init__(self, name=None, ns=None):'\ %(ID1) |
if self.aname_func: f = self.aname_func name = f(name) | self.typecode += '\n%sdef __init__(self, name=None, ns=None):'\ %(ID1) | |
if content_length == None: | if not content_length: | def call(self, addr, data, namespace, soapaction = None, encoding = None, http_proxy = None, config = Config): |
self._schema = reader.readFromUrl(url) | self._schema = reader.loadFromURL(url) | def getSchema(self): """if schema is not defined, first look for a Schema class instance in parent Schema. Else if not defined resolve schemaLocation and create a new Schema class instance, and keep a hard reference. """ if not self._schema: ns = self.attributes['namespace'] schema = self._parent().getImportSchemas().... |
self._schema = reader.readFromUrl(url) | self._schema = reader.loadFromURL(url) | def getSchema(self): """if schema is not defined, first look for a Schema class instance in parent Schema. Else if not defined resolve schemaLocation and create a new Schema class instance. """ if not self._schema: schema = self._parent()._parent() self._schema = schema.getIncludeSchemas(\ self.attributes['schemaLocat... |
self.assertEquals(z._1._elemsname, 'item') self.assertEquals(z._1, x) | self.assertEquals(z.v1._elemsname, 'item') self.assertEquals(z.v1, x) | def testStringArray1(self): x = arrayType(['a', 'b', 'c']) y = buildSOAP(x) z = parseSOAP(y) self.assertEquals(z._1._elemsname, 'item') self.assertEquals(z._1, x) |
self.assertEquals(z._1._elemsname, 'elementals') self.assertEquals(z._1, x) | self.assertEquals(z.v1._elemsname, 'elementals') self.assertEquals(z.v1, x) | def testStringArray2(self): x = arrayType(['d', 'e', 'f'], elemsname = 'elementals') y = buildSOAP(x) z = parseSOAP(y) self.assertEquals(z._1._elemsname, 'elementals') self.assertEquals(z._1, x) |
<SOAP-ENC:Array SOAP-ENC:arrayType="xsd:string[][2]"> | <SOAP-ENC:Array SOAP-ENC:arrayType="xsd:string[3]"> | def testArray(self): env = '''<?xml version="1.0" encoding="UTF-8"?> |
self.assertEquals( x , [['r1c1', 'r1c2', 'r1c3'], ['r2c1', 'r2c2']]) | self.assertEquals( x , [['r1c1', 'r1c2', 'r1c3'], ['r2c1', 'r2c2'], ['r2c1', 'r2c2']]) | def testArray(self): env = '''<?xml version="1.0" encoding="UTF-8"?> |
for i in path.split('/'): if i: node = node[i] | dir = path.split('/')[1:] for i in dir: node = node[i] | def getNode(self, url): node = self.__dict scheme,netloc,path,query,fragment = urlparse.urlsplit(url) try: for i in path.split('/'): if i: node = node[i] except KeyError, ex: raise NoSuchService, 'No service(%s) in ServiceContainer' %path return node |
dir = path.split('/') | dir = path.split('/')[1:] | def setNode(self, service, url): if not isinstance(service, ServiceSOAPBinding): raise TypeError, 'A Service must implement class ServiceSOAPBinding' scheme,netloc,path,query,fragment = urlparse.urlsplit(url) self.__post_dict[path] = service node = self.__dict dir = path.split('/') for i in dir[:-1]: if not i: continue... |
if not i: continue | def setNode(self, service, url): if not isinstance(service, ServiceSOAPBinding): raise TypeError, 'A Service must implement class ServiceSOAPBinding' scheme,netloc,path,query,fragment = urlparse.urlsplit(url) self.__post_dict[path] = service node = self.__dict dir = path.split('/') for i in dir[:-1]: if not i: continue... | |
Content-length: 1568 Content-type: text/xml; charset="utf-8" | Content-Length: 1568 Content-Type: text/xml; charset="utf-8" | def test_net_SessionCreate(self): """ |
% ID4) | self.initdef.set('\n\n%sdef __init__(self, name=None, ns=None, **kw):' % ID2) | |
myBinding['defs'][op.getName()] += '\n%sself.binding.Send(None, None, request )' %(ID2) | myBinding['defs'][op.getName()] += '\n%sself.binding.Send(None, None, request, soapaction="%s", **kw )' %(ID2, soapAction) | '\n%sdef %s(self, request):' % \ |
'.' + qualifiedtc[0] | '.' + qualifiedtc[0][0:idx] + \ '_Def' + qualifiedtc[0][idx:] | self.typecode += '\n%sdef __init__(self, name=None, ns=None):'\ %(ID1) |
defclass = defclass[0:defclass.find('(')] + '()' | defclass = defclass[0:defclass.find('(')] + '_Def()' | self.typecode += '\n%sdef __init__(self, name=None, ns=None):'\ %(ID1) |
tp.name) self.typecode += '\n%sif not hasattr( %s.%s(), "typecode" ):' % (ID1, nsp, tp.name) | tp.name + '_Dec') self.typecode += '\n%sif not hasattr( %s.%s(), "typecode" ):' % (ID1, nsp, tp.name + '_Dec') | self.typecode += '\n%sdef __init__(self):' %(ID1) |
% (ID2, nsp, tp.name ) | % (ID2, nsp, tp.name + \ '_Dec' ) | self.typecode += '\n%sdef __init__(self):' %(ID1) |
% (ID2, nsp, tp.name) | % (ID2, nsp, tp.name + '_Dec') | self.typecode += '\n\n%sdef __init__(self, name=None, ns=None):'\ %(ID1) self.typecode += '\n%s%s.%s.__init__(self, name=None, ns=None)'\ % (ID2, nsp, tp.name) else: |
tp.getName(), tpc) | tp.getName() \ + '_Def', tpc) | self.classdef = '\n\n%sclass %s(%s):' % (ID1, tp.getName(), tpc) |
tp.getName()) | tp.getName() + '_Def') | self.classdef = '\n\n%sclass %s(ZSI.TC.Any):' % (ID1, tp.getName()) |
self.classdef = '\n\n%sclass %s(%s):' % (ID1, tp.getName(), | self.classdef = '\n\n%sclass %s(%s):' % (ID1, tp.getName() \ + '_Dec', | self.classdef = '\n\n%sclass %s(%s):' % (ID1, tp.getName(), tpc) |
% (ID1, tp.getName(), | % (ID1, tp.getName() + '_Dec', | self.classdef = '\n\n%sclass %s(%s.%s):' \ % (ID1, tp.getName(), self.nsh.getAlias(nsp), etp.getName()) |
etp.getName()) | etp.getName() + '_Def') | self.classdef = '\n\n%sclass %s(%s.%s):' \ % (ID1, tp.getName(), self.nsh.getAlias(nsp), etp.getName()) |
self.classdef = '\n\n%sclass %s(%s):' % (ID1, tp.getName(), etp.getName()) | self.classdef = '\n\n%sclass %s(%s):' % (ID1, tp.getName() \ + '_Dec', etp.getName() \ + '_Def') | self.classdef = '\n\n%sclass %s(%s):' % (ID1, tp.getName(), etp.getName()) |
etp.getName()) self.initdef += '\n%sself.typecode = %s.%s(name=name, ns=ns)' % (ID3, self.nsh.getAlias(nsp), etp.getName()) | etp.getName() + '_Def') self.initdef += '\n%sself.typecode = %s.%s(name=name, ns=ns)' % (ID3, self.nsh.getAlias(nsp), etp.getName() + '_Def') | self.initdef += '\n\n%s%s.%s.__init__(self)' \ %(ID3, self.nsh.getAlias(nsp), etp.getName()) |
tp.getName(), | tp.getName() + '_Dec', | self.initdef += '\n\n%sclass %s(%s):' % (ID1, tp.getName(), tp.getName()\ + 'LOCAL' ) |
+ 'LOCAL' ) | + 'LOCAL_Def' ) | self.initdef += '\n\n%sclass %s(%s):' % (ID1, tp.getName(), tp.getName()\ + 'LOCAL' ) |
%(ID3, nsp, tp.getName() + 'LOCAL') | %(ID3, nsp, tp.getName() + 'LOCAL_Def') | self.initdef += '\n\n%s%s.%s.__init__(self, name=name, ns=ns)'\ %(ID3, nsp, tp.getName() + 'LOCAL') |
self.initdef += '\n%sself.typecode = %s.%s(name=name, ns=ns)' % (ID3, nsp, tp.getName() + 'LOCAL' ) | self.initdef += '\n%sself.typecode = %s.%s(name=name, ns=ns)' % (ID3, nsp, tp.getName() + 'LOCAL_Def' ) | self.initdef += '\n%sself.typecode = %s.%s(name=name, ns=ns)' % (ID3, nsp, tp.getName() + 'LOCAL' ) |
self.classdef = '\n\n%sclass %s:' %(ID1, tp.getName()) | self.classdef = '\n\n%sclass %s:' %(ID1, tp.getName() + '_Def') | self.classdef = '\n\n%sclass %s:' %(ID1, tp.getName()) |
%(ID1, tp.getName()) | %(ID1, tp.getName() + '_Def') | self.classdef = '\n\n%sclass %s(ZSI.TCcompound.Struct):'\ %(ID1, tp.getName()) |
self.classdef = '\n\n%sclass %s(%s):' %(ID1, tp.getName(), | self.classdef = '\n\n%sclass %s(%s):' %(ID1, tp.getName() \ + '_Def', | def _complexTypeComplexContent(self, tp): |
self.classdef = '\n\n%sclass %s:' % (ID1, tp.getName()) | self.classdef = '\n\n%sclass %s:' % (ID1, tp.getName() \ + '_Dec') | self.classdef = '\n\n%sclass %s:' % (ID1, tp.getName()) |
tp.getName(),tc) | tp.getName() \ + '_Def', tc) | self.classdef = '\n\n%sclass %s(%s):' % (ID1, tp.getName(),tc) |
arrayinfo[1], | atype, | self.initdef +=\ "\n%s%s.__init__(self, '%s', %s%s(name='element'), pname=name, aname='_%%s' %% name, oname='%%s xmlns=\"%s\"' %% name, **kw)" \ % (ID3, tc, arrayinfo[0], nsp, arrayinfo[1], tp.getTargetNamespace()) |
self.classdef = '\n\n%sclass %s:' % (ID1, tp.getName()) | self.classdef = '\n\n%sclass %s:' % (ID1, tp.getName() \ + '_Def') | self.classdef = '\n\n%sclass %s:' % (ID1, tp.getName()) |
%(nsp,etp.getName(), | %(nsp,etp.getName() + '_Def', | self.initdef += '\n%sself._%s = None' % (ID3, etp.getName()) |
notation = Notation(n.nodeName, n.publicId, n.systemId) | notation = xml.dom.minidom.Notation(n.nodeName, n.publicId, n.systemId) | def _clone_node(node, deep, newOwnerDocument): |
entity = Entity(e.nodeName, e.publicId, e.systemId, | entity = xml.dom.minidom.Entity(e.nodeName, e.publicId, e.systemId, | def _clone_node(node, deep, newOwnerDocument): |
minOccurs = element.getAttribute('minOccurs') maxOccurs = element.getAttribute('maxOccurs') | minOccurs = int(element.getAttribute('minOccurs')) maxOccurs = int(element.getAttribute('maxOccurs')) | def _getElement(self, element, literal=False, local=False, namespaceURI=None): """Returns a typecode instance representing the passed in element. element -- XMLSchema.ElementDeclaration instance literal -- literal encoding? local -- is locally defined? namespaceURI -- namespace """ if not element.isElement(): raise Typ... |
print "-- XML", sep[7:] print c.xmldata | print "-- Header", sep[10:] print c.header | def echo_wc(s, _SOAPContext): c = _SOAPContext sep = '-' * 72 # The Context object has extra info about the call print "-- XML", sep[7:] print c.xmldata # The original XML request print "-- Header", sep[10:] print c.header # The SOAP Header or None if not present if c.header: print "-- Header.mystring", s... |
print "-- Header", sep[10:] print c.header | if c.header: print "-- Header.mystring", sep[19:] print c.header.mystring | def echo_wc(s, _SOAPContext): c = _SOAPContext sep = '-' * 72 # The Context object has extra info about the call print "-- XML", sep[7:] print c.xmldata # The original XML request print "-- Header", sep[10:] print c.header # The SOAP Header or None if not present if c.header: print "-- Header.mystring", s... |
if c.header: print "-- Header.mystring", sep[19:] print c.header.mystring | print "-- Body", sep[8:] print c.body | def echo_wc(s, _SOAPContext): c = _SOAPContext sep = '-' * 72 # The Context object has extra info about the call print "-- XML", sep[7:] print c.xmldata # The original XML request print "-- Header", sep[10:] print c.header # The SOAP Header or None if not present if c.header: print "-- Header.mystring", s... |
print "-- Body", sep[8:] print c.body | print "-- Peer", sep[8:] if not GSI: print c.connection.getpeername() else: print c.connection.get_remote_address() ctx = c.connection.get_security_context() print ctx.inquire()[0].display() | def echo_wc(s, _SOAPContext): c = _SOAPContext sep = '-' * 72 # The Context object has extra info about the call print "-- XML", sep[7:] print c.xmldata # The original XML request print "-- Header", sep[10:] print c.header # The SOAP Header or None if not present if c.header: print "-- Header.mystring", s... |
print "-- Peer", sep[8:] if not GSI: print c.connection.getpeername() else: print c.connection.get_remote_address() ctx = c.connection.get_security_context() print ctx.inquire()[0].display() | print "-- SOAPAction", sep[14:] print c.soapaction | def echo_wc(s, _SOAPContext): c = _SOAPContext sep = '-' * 72 # The Context object has extra info about the call print "-- XML", sep[7:] print c.xmldata # The original XML request print "-- Header", sep[10:] print c.header # The SOAP Header or None if not present if c.header: print "-- Header.mystring", s... |
print "-- SOAPAction", sep[14:] print c.soapaction print "-- HTTP headers", sep[16:] print c.httpheaders | print "-- HTTP headers", sep[16:] print c.httpheaders | def echo_wc(s, _SOAPContext): c = _SOAPContext sep = '-' * 72 # The Context object has extra info about the call print "-- XML", sep[7:] print c.xmldata # The original XML request print "-- Header", sep[10:] print c.header # The SOAP Header or None if not present if c.header: print "-- Header.mystring", s... |
server.registerFunction(echo) | def echo_wkw(**kw): return kw['first'] + kw['second'] + kw['third'] | |
server.registerFunction(echo) | def echo_wkw(**kw): return kw['first'] + kw['second'] + kw['third'] | |
message_len = int(headers.get("Content-length", 0)) data = r.getfile().read(message_len) | content_length = headers.get("Content-length") if content_length == None: data = r.getfile().read() message_len = len(data) else: message_len = int(content_length) data = r.getfile().read(message_len) | def call(self, addr, data, namespace, soapaction = None, encoding = None, http_proxy = None, config = Config): |
_LoggerClass = ILogger | def setLevel(cls, level): cls.level = level | |
if self.level < 1: return | if self.warnOn() is False: return | def warning(self, msg, *args): if self.level < 1: return print >>self, BasicLogger.WARN, self.msg, print >>self, msg %args |
if self.level < 2: return | if self.debugOn() is False: return | def debug(self, msg, *args): if self.level < 2: return print >>self, BasicLogger.DEBUG, self.msg, print >>self, msg %args |
if not content_length: | comma=content_length.find(',') if comma>0: content_length = content_length[:comma] try: message_len = int(content_length) except: message_len = -1 if message_len < 0: | def call(self, addr, data, namespace, soapaction = None, encoding = None, http_proxy = None, config = Config): |
message_len = int(content_length) | def call(self, addr, data, namespace, soapaction = None, encoding = None, http_proxy = None, config = Config): | |
parent = self while not isinstance(parent, Schema): parent = parent._parent() | parent = GetSchema(self) | type_def = None |
for k,v in self.attributes.items(): if (not v) and (k != 'xmlns'): default_attr = getattr(self.__class__.attributes, k) if isinstance(default_attr, types.FunctionType): default_attr = default_attr() self.attributes[k] = default_attr | for k,v in self.__class__.attributes.items(): if v and not self.attributes.has_key(k): if isinstance(v, types.FunctionType): self.attributes[k] = v(self) else: self.attributes[k] = v | def __setAttributeDefaults(self): """Looks for default values for unset attributes. If class variable representing attribute is None, then it must be defined as a instance variable. """ for k,v in self.attributes.items(): if (not v) and (k != 'xmlns'): default_attr = getattr(self.__class__.attributes, k) if isinstance... |
'form':lambda: self._parent.parent().getAttributeFormDefault(), | 'form':lambda self: GetSchema(self).getAttributeFormDefault(), | def fromDom(self, node): """ No list or union support """ self.setAttributes(node) contents = self.getContents(node) |
'block':lambda: self.parent.parent().getBlockDefault(), 'final':lambda: self.parent.parent().getFinalDefault()} | 'block':lambda self: self._parent().getBlockDefault(), 'final':lambda self: self._parent().getFinalDefault()} | def fromDom(node): self.setAttributes(node) contents = self.getContents(node) |
'form':lambda: self._parent.parent().getElementFormDefault(), | 'form':lambda self: GetSchema(self).getElementFormDefault(), | def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node) constraints = [] |
'block':lambda: self.parent.parent().getBlockDefault()} | 'block':lambda self: GetSchema(self).getBlockDefault()} | def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node) constraints = [] |
'block':lambda: self._parent.parent().getBlockDefault(), 'final':lambda: self._parent.parent().getFinalDefault()} | 'block':lambda self: self._parent().getBlockDefault(), 'final':lambda self: self._parent().getFinalDefault()} | def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node) |
'final':lambda: self._parent.parent().getFinalDefault()} | 'final':lambda self: self._parent().getFinalDefault()} | def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node) |
return inclusive | elif n.startswith('xmlns:'): unused_namespace_dict[n] = attr.value return inclusive, unused_namespace_dict | def _inclusiveNamespacePrefixes(node, context, unsuppressedPrefixes): '''http://www.w3.org/TR/xml-exc-c14n/ InclusiveNamespaces PrefixList parameter, which lists namespace prefixes that are handled in the manner described by the Canonical XML Recommendation''' inclusive = [] if node.prefix: usedPrefixes = ['xmlns:%s' %... |
self.state = (nsdict, {'xml':''}, {}) | self.state = (nsdict, {'xml':''}, {}, {}) | def __init__(self, node, write, **kw): '''Create and run the implementation.''' self.write = write self.subset = kw.get('subset') self.comments = kw.get('comments', 0) self.unsuppressedPrefixes = kw.get('unsuppressedPrefixes') nsdict = kw.get('nsdict', { 'xml': XMLNS.XML, 'xmlns': XMLNS.BASE }) # Processing state. sel... |
inherited = _inclusiveNamespacePrefixes(node, self._inherit_context(node), | inherited,unused = _inclusiveNamespacePrefixes(node, self._inherit_context(node), | def __init__(self, node, write, **kw): '''Create and run the implementation.''' self.write = write self.subset = kw.get('subset') self.comments = kw.get('comments', 0) self.unsuppressedPrefixes = kw.get('unsuppressedPrefixes') nsdict = kw.get('nsdict', { 'xml': XMLNS.XML, 'xmlns': XMLNS.BASE }) # Processing state. sel... |
self._do_element(node, inherited) | self._do_element(node, inherited, unused=unused) | def __init__(self, node, write, **kw): '''Create and run the implementation.''' self.write = write self.subset = kw.get('subset') self.comments = kw.get('comments', 0) self.unsuppressedPrefixes = kw.get('unsuppressedPrefixes') nsdict = kw.get('nsdict', { 'xml': XMLNS.XML, 'xmlns': XMLNS.BASE }) # Processing state. sel... |
def _do_element(self, node, initial_other_attrs = []): '''_do_element(self, node, initial_other_attrs = []) -> None | def _do_element(self, node, initial_other_attrs = [], unused = None): '''_do_element(self, node, initial_other_attrs = [], unused = {}) -> None | def _do_element(self, node, initial_other_attrs = []): '''_do_element(self, node, initial_other_attrs = []) -> None Process an element (and its children).''' |
if _inclusive(self) or (in_subset and _in_subset(self.subset, a)): | if inclusive or (in_subset and _in_subset(self.subset, a)): | def _do_element(self, node, initial_other_attrs = []): '''_do_element(self, node, initial_other_attrs = []) -> None Process an element (and its children).''' |
if (n,v) not in ns_rendered.items() \ and (_inclusive(self) or \ _utilized(n, node, other_attrs, self.unsuppressedPrefixes)): ns_to_render.append((n, v)) | if (n,v) not in ns_rendered.items(): if inclusive or _utilized(n, node, other_attrs, self.unsuppressedPrefixes): ns_to_render.append((n, v)) elif not inclusive: ns_unused_inherited[n] = v | def _do_element(self, node, initial_other_attrs = []): '''_do_element(self, node, initial_other_attrs = []) -> None Process an element (and its children).''' |
if not _inclusive(self) or _in_subset(self.subset,node.parentNode): | if not inclusive or _in_subset(self.subset,node.parentNode): | def _do_element(self, node, initial_other_attrs = []): '''_do_element(self, node, initial_other_attrs = []) -> None Process an element (and its children).''' |
state, self.state = self.state, (ns_local, ns_rendered, xml_attrs) | state, self.state = self.state, (ns_local, ns_rendered, xml_attrs, ns_unused_inherited) | def _do_element(self, node, initial_other_attrs = []): '''_do_element(self, node, initial_other_attrs = []) -> None Process an element (and its children).''' |
typecode = 'attribute_typecode_dict' | attribute_typecode = 'self.attribute_typecode_dict' | def FromMessageGetSimpleElementDeclaration(message): '''If message consists of one part with an element attribute, and this element is a simpleType return a string representing the python type, else return None. ''' assert isinstance(message, WSDLTools.Message), 'expecting WSDLTools.Message' if len(message.parts) == ... |
atd = AttributeMixIn.typecode | atd = self.attribute_typecode | def _setAttributes(self, attributes): '''parameters attributes -- a flattened list of all attributes, from this list all items in attribute_typecode_dict will be generated into attrComponents. returns a list of strings representing the attribute_typecode_dict. ''' atd = AttributeMixIn.typecode atd_list = formatted_att... |
'self.%s[("%s","anyAttribute")] = ZSI.TC.AnyElement()'\ | '%s[("%s","anyAttribute")] = ZSI.TC.AnyElement()'\ | def _setAttributes(self, attributes): '''parameters attributes -- a flattened list of all attributes, from this list all items in attribute_typecode_dict will be generated into attrComponents. returns a list of strings representing the attribute_typecode_dict. ''' atd = AttributeMixIn.typecode atd_list = formatted_att... |
'self.%s[%s] = %s' % (atd, key, tc) | '%s[%s] = %s' % (atd, key, tc) | if tdef is not None: tc = '%s.%s(None)' %(NAD.getAlias(tdef.getTargetNamespace()), self.mangle(type_class_name(tdef.getAttributeName())) ) |
'self.%s[%s] = ZSI.TC.String()' %(atd, key) | '%s[%s] = ZSI.TC.String()' %(atd, key) | if tdef is not None: tc = '%s.%s(None)' %(NAD.getAlias(tdef.getTargetNamespace()), self.mangle(type_class_name(tdef.getAttributeName())) ) |
'self.%s[%s] = %s()' %(atd, key, | '%s[%s] = %s()' %(atd, key, | if tdef is not None: tc = '%s.%s(None)' %(NAD.getAlias(tdef.getTargetNamespace()), self.mangle(type_class_name(tdef.getAttributeName())) ) |
'self.%s[%s] = %s.%s(None)' \ | '%s[%s] = %s.%s(None)' \ | if tdef is not None: tc = '%s.%s(None)' %(NAD.getAlias(tdef.getTargetNamespace()), self.mangle(type_class_name(tdef.getAttributeName())) ) |
element.append('%sself.%s = {}'%(ID3, AttributeMixIn.typecode)) | element.append('%s%s = {}'%(ID3, self.attribute_typecode)) | def _setContent(self): |
definition.append('%sself.%s = {}'%(ID3, AttributeMixIn.typecode)) | def _setContent(self): '''JRB What is the difference between instance data ns, name, -- type definition? sKlass, sKlassNS? -- element declaration? ''' definition = [] if self._is_array is True: # # SOAP-ENC:Array if _is_xsd_or_soap_ns(self.sKlassNS) is False and self.sKlass == 'Array': raise ContainerError, 'unknown ty... | |
'%s%s.%s.__init__(self, pname, **kw)' \ %(ID3, NAD.getAlias(self.sKlassNS), type_class_name(self.sKlass) ), | '%sattributes = {}'%(ID3) | def _setContent(self): '''JRB What is the difference between instance data ns, name, -- type definition? sKlass, sKlassNS? -- element declaration? ''' definition = [] if self._is_array is True: # # SOAP-ENC:Array if _is_xsd_or_soap_ns(self.sKlassNS) is False and self.sKlass == 'Array': raise ContainerError, 'unknown ty... |
'%sself.ofwhat = tuple(TClist)' %ID3, ) | '%s%s.%s.__init__(self, pname, ofwhat=TClist, attributes=%s, restrict=True, **kw)' \ %(ID3, NAD.getAlias(self.sKlassNS), type_class_name(self.sKlass), self.attribute_typecode ), ) elif self.extension: definition.append(\ '%s%s.%s.__init__(self, pname, ofwhat=TClist, attributes=%s, extend=True, **kw)' \ %(ID3, NAD.getAl... | def _setContent(self): '''JRB What is the difference between instance data ns, name, -- type definition? sKlass, sKlassNS? -- element declaration? ''' definition = [] if self._is_array is True: # # SOAP-ENC:Array if _is_xsd_or_soap_ns(self.sKlassNS) is False and self.sKlass == 'Array': raise ContainerError, 'unknown ty... |
definition.append(\ '%sself.ofwhat += tuple(TClist)' %ID3, ) for l in self.attrComponents: definition.append('%s%s'%(ID3, l)) | raise Wsdl2PythonError,\ 'ComplexContent must be a restriction or extension' | def _setContent(self): '''JRB What is the difference between instance data ns, name, -- type definition? sKlass, sKlassNS? -- element declaration? ''' definition = [] if self._is_array is True: # # SOAP-ENC:Array if _is_xsd_or_soap_ns(self.sKlassNS) is False and self.sKlass == 'Array': raise ContainerError, 'unknown ty... |
def pnameConstructor(self, superclass=None): if superclass: return '%s.__init__(self, pname, ofwhat=(), extend=False, restrict=False, **kw)' % superclass return 'def __init__(self, pname, ofwhat=(), extend=False, restrict=False, **kw):' | def _setContent(self): '''JRB What is the difference between instance data ns, name, -- type definition? sKlass, sKlassNS? -- element declaration? ''' definition = [] if self._is_array is True: # # SOAP-ENC:Array if _is_xsd_or_soap_ns(self.sKlassNS) is False and self.sKlass == 'Array': raise ContainerError, 'unknown ty... | |
definition.append('%sself.%s = {}'%(ID3, AttributeMixIn.typecode)) | definition.append('%s%s = attributes or {}' %(ID3, self.attribute_typecode)) definition.append('%sif extend: TClist += ofwhat'%(ID3)) definition.append('%sif restrict: TClist = ofwhat' %(ID3)) if len(self.attrComponents) > 0: definition.append('%selse:' %(ID3)) for l in self.attrComponents: definition.append('%s%s'... | def _setContent(self): definition = [ '%sclass %s(ZSI.TCcompound.ComplexType, TypeDefinition):' % (ID1, self.getClassName()), '%s%s' % (ID2, self.schemaTag()), '%s%s' % (ID2, self.typeTag()), '%s%s' % (ID2, self.pnameConstructor()), #'%s' % self.getElements(), '%s%s' % (ID3, self.nsuriLogic()), '%sTClist = [%s]' % (I... |
for l in self.attrComponents: definition.append('%s%s'%(ID3, l)) | def _setContent(self): definition = [ '%sclass %s(ZSI.TCcompound.ComplexType, TypeDefinition):' % (ID1, self.getClassName()), '%s%s' % (ID2, self.schemaTag()), '%s%s' % (ID2, self.typeTag()), '%s%s' % (ID2, self.pnameConstructor()), #'%s' % self.getElements(), '%s%s' % (ID3, self.nsuriLogic()), '%sTClist = [%s]' % (I... | |
def pnameConstructor(self, superclass=None): ''' TODO: Logic is a little tricky. If superclass is ComplexType this is not used. ''' if superclass: return '%s.__init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw)' % superclass return 'def __init__(self, pname, ofwhat=(), attributes=None... | def _setContent(self): definition = [ '%sclass %s(ZSI.TCcompound.ComplexType, TypeDefinition):' % (ID1, self.getClassName()), '%s%s' % (ID2, self.schemaTag()), '%s%s' % (ID2, self.typeTag()), '%s%s' % (ID2, self.pnameConstructor()), #'%s' % self.getElements(), '%s%s' % (ID3, self.nsuriLogic()), '%sTClist = [%s]' % (I... | |
definition.append('%sself.%s = {}'%(ID3, AttributeMixIn.typecode)) | definition.append('%s%s = {}'%(ID3, self.attribute_typecode)) | def _setContent(self): if type(self.sKlass) in (types.ClassType, type): definition = [ '%sclass %s(%s, TypeDefinition):' \ % (ID1, self.getClassName(), self.sKlass), '%s%s' % (ID2, self.schemaTag()), '%s%s' % (ID2, self.typeTag()), '%s%s' % (ID2, self.pnameConstructor()), ] if self.getPythonType() is None: definition.... |
'%sself.%s = {}'%(ID3, AttributeMixIn.typecode), | '%s%s = {}'%(ID3, self.attribute_typecode), | def _setContent(self): if type(self.sKlass) in (types.ClassType, type): definition = [ '%sclass %s(%s, TypeDefinition):' \ % (ID1, self.getClassName(), self.sKlass), '%s%s' % (ID2, self.schemaTag()), '%s%s' % (ID2, self.typeTag()), '%s%s' % (ID2, self.pnameConstructor()), ] if self.getPythonType() is None: definition.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.