def get_response(self, action, params, page=0, itemSet=None):
        """
        Utility method to handle calls to ECS and parsing of responses.
        """
        params['Service'] = "AWSECommerceService"
        params['Operation'] = action
        if page:
            params['ItemPage'] = page
        response = self.make_request(None, params, "/onca/xml")
        body = response.read()
        boto.log.debug(body)

        if response.status != 200:
            boto.log.error('%s %s' % (response.status, response.reason))
            boto.log.error('%s' % body)
            raise self.ResponseError(response.status, response.reason, body)

        if itemSet == None:
            rs = ItemSet(self, action, params, page)
        else:
            rs = itemSet
        h = handler.XmlHandler(rs, self)
        xml.sax.parseString(body, h)
        return rs
def get_response ( self , action , params , page = 0 , itemSet = None ) : params [ 'Service' ] = "AWSECommerceService" params [ 'Operation' ] = action if page : params [ 'ItemPage' ] = page response = self . make_request ( None , params , "/onca/xml" ) body = response . read ( ) boto . log . debug ( body ) if response . status != 200 : boto . log . error ( '%s %s' % ( response . status , response . reason ) ) boto . log . error ( '%s' % body ) raise self . ResponseError ( response . status , response . reason , body ) if itemSet == None : rs = ItemSet ( self , action , params , page ) else : rs = itemSet h = handler . XmlHandler ( rs , self ) xml . sax . parseString ( body , h ) return rs
Utility method to handle calls to ECS and parsing of responses.