#NEWLINE# def get_method_name( self , raw_post_data , request_format = 'xml' ) : #NEWLINE# #INDENT# '\n        Gets the name of the method to be called given the post data\n        and the format of the data\n        ' #NEWLINE# if ( request_format == 'xml' ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# ( params , method ) = xmlrpclib . loads ( raw_post_data ) #NEWLINE# return method #NEWLINE# #UNINDENT# except Fault : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# jsondict = json . loads ( raw_post_data ) #NEWLINE# if ( ( not isinstance ( jsondict , dict ) ) or ( 'method' not in jsondict ) ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return jsondict [ 'method' ] #NEWLINE# #UNINDENT# #UNINDENT# except ValueError : #NEWLINE# #INDENT# return None