Hi Raj,
can you assign this role (id = 2) to this user (id = 4) in this course (id = 121) in Moodle (when logged as the exact same user linked to the token you are using for your web service call). If you can it's a web service bug (in this case file a tracker issue), if no then the web service work well and your issue is on the Moodle side (you can browse the role forum: http://moodle.org/mod/forum/view.php?id=6826 or google Moodledocs + role).
Cheers,
Jerome