def do_POST(self):
soapAction = self.headers.getheader('<STR_LIT>')<EOL>post = self.path<EOL>if not post:<EOL><INDENT>raise PostNotSpecified('<STR_LIT>')<EOL><DEDENT>if soapAction:<EOL><INDENT>soapAction = soapAction.strip('<STR_LIT>')<EOL><DEDENT>post = post.strip('<STR_LIT>')<EOL>try:<EOL><INDENT>ct = self.headers['<STR_LIT>']<EOL>if ct.startswith('<STR_LIT>'):<EOL><INDENT>cid = resolvers.MIMEResolver(ct, self.rfile)<EOL>xml = cid.GetSOAPPart()<EOL>ps = ParsedSoap(xml, resolver=cid.Resolve)<EOL><DEDENT>else:<EOL><INDENT>length = int(self.headers['<STR_LIT>'])<EOL>xml = self.rfile.read(length)<EOL>ps = ParsedSoap(xml)<EOL><DEDENT><DEDENT>except ParseException as e:<EOL><INDENT>self.send_fault(FaultFromZSIException(e))<EOL><DEDENT>except Exception as e:<EOL><INDENT>self.send_fault(FaultFromException(e, <NUM_LIT:1>, sys.exc_info()[<NUM_LIT:2>]))<EOL><DEDENT>else:<EOL><INDENT>thread_id = _thread.get_ident()<EOL>_contexts[thread_id] = SOAPContext(self.server, xml, ps,<EOL>self.connection,<EOL>self.headers, soapAction)<EOL>try:<EOL><INDENT>_Dispatch(ps, self.server, self.send_xml, self.send_fault,<EOL>post=post, action=soapAction)<EOL><DEDENT>except Exception as e:<EOL><INDENT>self.send_fault(FaultFromException(e, <NUM_LIT:0>, sys.exc_info()[<NUM_LIT:2>]))<EOL><DEDENT>if thread_id in _contexts:<EOL><INDENT>del _contexts[thread_id]<EOL><DEDENT><DEDENT>
The POST command.
        action -- SOAPAction(HTTP header) or wsa:Action(SOAP:Header)