def invoke(self, headers, body):
xml = Service._create_request(headers, body)<EOL>try:<EOL><INDENT>response = self.session.post(self.endpoint, verify=False, data=xml)<EOL>logging.debug(response.content)<EOL><DEDENT>except Exception as e:<EOL><INDENT>traceback.print_exc()<EOL>raise WSManException(e)<EOL><DEDENT>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>return Service._parse_response(response.content)<EOL><DEDENT>if response.status_code == <NUM_LIT>:<EOL><INDENT>raise WSManAuthenticationException('<STR_LIT>')<EOL><DEDENT>raise WSManException('<STR_LIT>' % response.status_code)<EOL>
Invokes the soap service