You are probably sending a request without the appropriate headers. You have to declare the type of data your client accepts as a response using the Accept
header:
Accept: application/xml; application/json;
Additionally, if you are sending data, you have to declare the Content-type of what you are sending, and it should be compatible with the data your service accepts.
Content-type: application/xml
If you are sending payload in XML, for example.