So @user2636834 did you figure this one out already?
I remember when I was setting up a test scenario that I got the sames error(s). Seemed that I didn't have Oauth installed :O. So in short I did (running Ubuntu and following these instructions, also running into this error):
pecl install oauth
Then add extension=oauth.so
to php.ini
's "Dynamic Extensions" section.
Then restart Apache
I tried the examples from the Magento site and got an error from the API:
"Invalid auth/bad request"
I had to add a 'Accept' => '*/*'
header to the $oauthClient->fetch()
call. After that it worked all just fine.
Hope you can get things running if you hadn't already.
The problem you're experiencing is that .NET/C# is having trouble parsing the content type Magento is sending along with it's response. SOAP is notoriously finicky about receiving just the right stuff in just the right format. Couple that with PHP's rather poor implementation of the protocol and you're in for a lot of fun.
I'm looking at a Magento 1.9 for the following information:
After some digging I found that the header for the SOAP calls are set in app/code/core/Mage/Api/Model/Server/V2/Adapter/Soap.php
on line 52.
51. ->clearHeaders()
52. ->setHeader('Content-Type','text/xml; charset='.$apiConfigCharset)
53. ->setBod...
Note that that Content-Type header matches your text/xml; charset=utf-8
desired charset. Adjusting line 52 to:
52. ->setHeader('Content-Type','text/xml; charset='.$apiConfigCharset, true)
tells Magento to force overwriting that header if it's already set.
Make sure to make a copy of the file with it's full path to the app/code/local/Mage/...
to avoid overwriting core files. You'll thank me when you want to upgrade Magento at some point.
Also, make sure to look carefully, there's two setHeader() calls in that file.
And finally, there's also a WS-I compliant SOAP adapter available, the same fix applies to that file. You can find it in app/code/core/Mage/Api/Model/Server/Wsi/Adapter/Soap.php
.
Best Answer
The answer you referenced was straight from the horse's mouth, so it should work. Everything else is environment related.
Enable php error printing to find out the cause of your blank page. My guess is that you may just have something like "OAuth" php module not installed on your server. If that does not work, always use xDebug (or another one that let's you walk line by line in your code) to debug your code. If you are serious about php development at all, this is the first thing you will configure after you install your server. Do not waste your time working without a debugger.