code: def parseSOAP(xml_str, rules = None):
      
      try:
          from cStringIO import StringIO
      except ImportError:
          from StringIO import StringIO
  
      parser = xml.sax.make_parser()
      t = ZimbraSOAPParser(rules = rules)
      parser.setContentHandler(t)
      e = xml.sax.handler.ErrorHandler()
      parser.setErrorHandler(e)
  
      inpsrc = xml.sax.xmlreader.InputSource()
      inpsrc.setByteStream(StringIO(xml_str))
  
      # turn on namespace mangeling
      parser.setFeature(xml.sax.handler.feature_namespaces,1)
  
      try:
          parser.parse(inpsrc)
      except xml.sax.SAXParseException, e:
          parser._parser = None
          raise e
  
      return t
docs: Replacement for SOAPpy._parseSOAP method to spoof SOAPParser.