docs: def setUp(self, tp):
          '''complexContent/[extension,restriction]
              restriction
              extension
              extType -- used in figuring attrs for extensions
          '''
          self._item = tp
          assert tp.content.isComplex() is True and \
              (tp.content.content.isRestriction() or tp.content.content.isExtension() is True),\
              'expecting complexContent/[extension,restriction]'
              
          self.extType = None
          self.restriction = False
          self.extension = False
          self._kw_array = None
          self._is_array = False
          self.name = tp.getAttribute('name')
          self.ns = tp.getTargetNamespace()
          
          # xxx: what is this for?
          #self.attribute_typecode = 'attributes'
          
          derivation = tp.content.content
          # Defined in Schema instance?
          try:
              base = derivation.getTypeDefinition('base')
          except XMLSchema.SchemaError, ex:
              base = None
  
          # anyType, arrayType, etc...
          if base is None:
              base = derivation.getAttributeQName('base')
              if base is None:
                  raise ContainerError, 'Unsupported derivation: %s'\
                          %derivation.getItemTrace()
                          
              if base != (SOAP.ENC,'Array') and base != (SCHEMA.XSD3,'anyType'):
                  raise ContainerError, 'Unsupported base(%s): %s' %(
                      base, derivation.getItemTrace()
                      )
                  
          if base == (SOAP.ENC,'Array'):
              # SOAP-ENC:Array expecting arrayType attribute reference
              self.logger.debug("Derivation of soapenc:Array")
              self._is_array = True
              self._kw_array = {'atype':None, 'id3':ID3, 'ofwhat':None}
              self.sKlass = BTI.get_typeclass(base[1], base[0])
              self.sKlassNS = base[0]
  
              for a in derivation.getAttributeContent():
  
                  assert a.isAttribute() is True,\
                      'only attribute content expected: %s' %a.getItemTrace()
  
                  if a.isReference() is False:
                      continue
  
                  if a.getAttribute('ref') != (SOAP.ENC,'arrayType'):
                      continue
  
                  attr = a.getAttributeQName((WSDL.BASE, 'arrayType'))
                  if attr is None:
                      warnings.warn('soapenc:array derivation declares attribute reference ("%s","%s"), does not define attribute ("%s","%s")' %(
                          SOAP.ENC,'arrayType',WSDL.BASE, 'arrayType'))
                      break
                  
                  self._kw_array['atype'] = attr
                  qname = self._kw_array.get('atype')
                  if a is not None:
                      ncname = qname[1].strip('[]')
                      namespace = qname[0]
                      try:
                          ofwhat = a.getSchemaItem(XMLSchema.TYPES, namespace, ncname)
                      except XMLSchema.SchemaError, ex:
                          ofwhat = None
  
                      if ofwhat is None:
                          self._kw_array['ofwhat'] = BTI.get_typeclass(ncname, namespace)
                      else:
                          self._kw_array['ofwhat'] = GetClassNameFromSchemaItem(ofwhat, do_extended=self.do_extended)
  
                      if self._kw_array['ofwhat'] is None:
                          raise ContainerError, 'For Array could not resolve ofwhat typecode(%s,%s): %s'\
                              %(namespace, ncname, derivation.getItemTrace())
                      
                      self.logger.debug('Attribute soapenc:arrayType="%s"' %
                                        str(self._kw_array['ofwhat']))
  
                      break
  
              #else:
              #    raise Wsdl2PythonError, \
              #        'derivation of soapenc:array must declare attribute reference ("%s","%s")' %(
              #        SOAP.ENC,'arrayType')
  
         
          elif isinstance(base, XMLSchema.XMLSchemaComponent):
              self.sKlass = base.getAttribute('name')
              self.sKlassNS = base.getTargetNamespace()
          else:
              # TypeDescriptionComponent
              self.sKlass = base.getName()
              self.sKlassNS = base.getTargetNamespace()
  
          attrs = []
          if derivation.isRestriction():
              self.restriction = True
              self.extension = False
              # derivation.getAttributeContent subset of tp.getAttributeContent 
              attrs += derivation.getAttributeContent() or ()
          else:
              self.restriction = False
              self.extension = True
              attrs += tp.getAttributeContent() or ()
              if isinstance(derivation, XMLSchema.XMLSchemaComponent):
                  attrs += derivation.getAttributeContent() or ()
                  
          # XXX: not sure what this is doing
          if attrs:
              self.extType = derivation
  
          if derivation.content is not None \
              and derivation.content.isModelGroup():
              group = derivation.content
              if group.isReference():
                  group = group.getModelGroupReference()
              self.mgContent = group.content
          elif derivation.content:
              raise Wsdl2PythonError, \
                  'expecting model group, not: %s' %derivation.content.getItemTrace()
          else:
              self.mgContent = ()
  
          self.attrComponents = self._setAttributes(tuple(attrs))