I\'m getting 406 when i invoke the rest web service via android application.Can any one suggest me what is the error in this code and why i am getting this error ??
That error is not acceptable.
Literally.
Here is some documentation on it:
It generally means that the service sent stuff back to you in an unrecognizable format. It could be the wrong kind of data, or the headers could just be screwed up. You should try to use a packet sniffer like WireShark to see what is getting sent back. Also, it could be that you just need to specify the content type.
If you are doing webservice calls, and you've never used a packet sniffer, it would be a great idea to figure out how to do it.