def setUp(self, tp):
self._item = tp<EOL>assert tp.isComplex() is True and tp.content.isSimple() is True,'<STR_LIT>' %tp.content.getItemTrace()<EOL>simple = tp.content<EOL>dv = simple.content<EOL>assert dv.isExtension() is True or dv.isRestriction() is True,'<STR_LIT>'%tp.content.getItemTrace()<EOL>self.name = tp.getAttribute('<STR_LIT:name>')<EOL>self.ns = tp.getTargetNamespace()<EOL>self.content.attributeContent = dv.getAttributeContent()<EOL>base = dv.getAttribute('<STR_LIT>')<EOL>if base is not None:<EOL><INDENT>self.sKlass = BTI.get_typeclass( base[<NUM_LIT:1>], base[<NUM_LIT:0>] )<EOL>if not self.sKlass:<EOL><INDENT>self.sKlass,self.sKlassNS = base[<NUM_LIT:1>], base[<NUM_LIT:0>]<EOL><DEDENT>self.attrComponents = self._setAttributes(<EOL>self.content.attributeContent<EOL>)<EOL>return<EOL><DEDENT>raise Wsdl2PythonError('<STR_LIT>' %tp.getItemTrace())<EOL>
tp -- complexType/simpleContent/[Exention,Restriction]