'send a SOAP request and get the response'

def sendSOAP(self, hostName, serviceType, controlURL, actionName, actionArguments, hideErr=False):

    argList = ''
    if (not controlURL):
        self.discovery()
    for (arg, (val, dt)) in actionArguments.iteritems():
        argList += ('<%s>%s</%s>' % (arg, val, arg))
    soapBody = '<?xml    version="1.0"?><SOAP-ENV:Envelope    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope"    SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><m:{}    xmlns:m="{}">{}</m:{}></SOAP-ENV:Body></SOAP-ENV:Envelope>'.format(actionName, serviceType, argList, actionName)
    try:
        response = urllib2.urlopen(urllib2.Request(controlURL, soapBody, {'Content-Type': 'text/xml', 'SOAPAction': '"{}#{}"'.format(serviceType, actionName)}))
    except urllib2.HTTPError as e:
        (err_code, err_desc) = self._parseErrMsg(e.read())
        raise UPNPError(e.code, err_code, err_desc)
    return response.read()
