Sorry to insist, but I see zero answers. My company is an IBM partner. What should I do or what should my company do to get some help on this nightmare? I can't believe .net with VS2015 can't connect to "personality insight" in BlueMix and this is becoming critical to us. In addition to the IBM sdk for .net I tried a simple rest client taken from Microsoft examples and got the same answer from BlueMix (unsupported media type). Next I tried RestSharp (one of the most recommended ways in Stack Overflow to build a Rest API client with Microsoft technology) and again, the damn "unsupported media type" appeared. Probably posting about this at @IBMBluemix in Twitter would be a bad netiquette. This is what I posted originally:
While executing the project IBM.WatsonDeveloperCloud.PersonalityInsights.Example that comes with the .net SDK, I found an exception: StatusCode: 415, ReasonPhrase: 'Unsupported Media Type'
I've not modified the SDK in any way. My only change to the example project is the needed values for the user and password. I figured out the SDK is sending this to the API:
accept: application/json, text/json, application/xml, text/xml User-Agent: 0.0.1-alpha
How can the SDK generate headers that the API doesn't recognize? Can someone explain what should be changed? I find strange that the SDK doesn't work. I downloaded the SDK just a few days ago so I think I have the latest. Thanks.
@claudio_santiago we have a .NET SDK https://github.com/watson-developer-cloud/dotnet-standard-sdk
It's in Beta and not all the services are supported.
Here is the url for Personality Insights: https://github.com/watson-developer-cloud/dotnet-standard-sdk/tree/development/src/IBM.WatsonDeveloperCloud.PersonalityInsights
I can't find a way to reply specifically to each people that kindly offered their advice, so I will do it here.
As I said, I tried a simple REST client with .net but got the same message about the unsupported media type. Now that I was given the URL of the API documentation, I will try again the next week.
In the meantime I used cURL for .net following an example with PHP and it works. I think the problem might be that the Bluemix API is too strict with the HTTP headers and rejects an extra space or newline when one specifies the Content-Type and the other tags (charset, accept-language, etc). With cURL it's possible to shape the headers exactly as desired.
Thanks for the replies and in the future I will go back to the .net API to see if a new version has been released.