Magento REST API Error – Invalid Webservice Adapter Specified

magento-1.9

I just started Magento integration.

I looked at some related questions around the cloud with regards to my concern but I don't find any fitted answer since Im using IIS 7.5.

My current config is:

<system.webServer>
    <defaultDocument>
        <files>
            <add value="index.php" />
        </files>
    </defaultDocument>      
    <rewrite>
        <rules>
            <clear />
            <rule name="Rewrite to api.php" stopProcessing="true">
                <match url="^api/rest(.*)$" />
                <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                </conditions>
                <action type="Rewrite" url="api.php?type=rest/{R:1}" />
            </rule>             
            <rule name="REMOVE INDEX.PHP" stopProcessing="true">
                <match url="/index.php/(.+)$" negate="true" />
                <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                </conditions>
                <action type="Rewrite" url="/index.php/{R:1}" />
            </rule>             
        </rules>
    </rewrite>
</system.webServer> 

Do you have any idea/answer why I'm getting "Invalid webservice adapter specified." every time I visit "http://magentohost/api/rest/customers" on my browser?

Best Answer

This error originates from: Mage_Api_Model_Server::initialize

Check your .htaccess file and un comment following code

############################################
## uncomment next line to enable light API calls processing

#    RewriteRule ^api/([a-z][0-9a-z_]+)/?$ api.php?type=$1 [QSA,L]

############################################
## rewrite API2 calls to api.php (by now it is REST only)

    RewriteRule ^api/rest api.php?type=rest [QSA,L]

After this restart your server.