Kannan,
Have you eliminated the server-side script as the source of the problem? Can you post via some other method and get a valid reply? I usually see error 500s when my server scripts have syntax or run-time issues that prevent them from returning a valid http reply.
Alternatively, if your script will work with a get method, does that URL work from a browser?