Magento api: Invalid webservice adapter specified
Asked Answered
C

3

18

Is there anything specific i need to do to get the api in magento working?

I am visiting /api/soap/?wsdl on my local installation (1.7) and it returns the following error:

Invalid webservice adapter specified.

Everything looks enabled in the site but i cant find any info on other steps i need to do to get the api to work.

Cosmetic answered 18/12, 2012 at 12:22 Comment(5)
/index.php/api/V2_soap?wsdl=1 have you tried thisNimble
ok so this works only when index.php is included in the url. Why is this?Cosmetic
index.php is not necessary, you can try this way too www.yourmagento.com/api/V2_soap?wsdl=1Nimble
no, thats what i mean. it only works with index.php in the url. I have rewrites on and the site works fine without them. The api is not thoguhCosmetic
possible duplicate of What is SOAP V2 url on Magento 1.7.0.0Humility
L
37

I've solved this from htaccess by turning off MultiViews option like this:

from

<Directory /var/www/magento>
            Options Indexes FollowSymLinks MultiViews
</Directory>

to

<Directory /var/www/magento>
            Options +Indexes +FollowSymLinks -MultiViews
</Directory>
Leopoldine answered 10/6, 2013 at 11:42 Comment(4)
This throws apache error Either all Options must start with + or -, or no Option may So the correct syntax for above should be Options +Indexes +FollowSymLinks -MultiViewsSolidago
I get a 500 internal service error when I enable thisCoquina
I had to do it in: /etc/apache2/sites-available/000-default.confNecessitarianism
I had to edit the conf file located in /etc/httpd/vhosts.d/file.conf and then restart httpd. Thanks for the answer it worked perfectly.Straightaway
D
2

There is a different approach if you want to keep compatibility with old API calls. For some obscure reason, my Apache server doesn't analyze the string ^api/... during the rewrite parsing.

But you can still use http://www.somedomain.com/api/v2_soap?wsdl=1 without changing Magento PHP code. You just need to change the .htaccess like the following:

Replace in .htaccess:

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

by

RewriteRule ^api(\.php)?/([a-z][0-9a-z_]+)/?$ api.php?type=$2 [QSA,L] (see the ^api.php/ instead of ^api/)

And even better if some of you, have http://www.somedomain.com/api/V2_soap?wsdl=1 (V2_soap is uppercase), you will have to add a RewriteMap to use internal apache function to set in lowercase the parameter. Add to your virtual host the RewriteMap:

RewriteMap lc int:tolower

And in the .htaccess

RewriteRule ^api(\.php)?/([a-zA-Z][0-9a-z_]+)/?$ api.php?type=${lc:$2} [QSA,L]

This will set to lowercase the parameter for the api.php script and also accept 'V2_soap' in the regular expression

This last part has been brought by @dreeves in this answer

Doityourself answered 9/4, 2013 at 8:46 Comment(0)
R
-1

I solved this by editing in my virtual host file (/etc/apache2/sites-available/mag.dev.conf) like this:

    <Directory /var/www/mag/mag>
      Options +Indexes +FollowSymLinks -MultiViews
      .....
    </Directory>

now its loading the xml response.

the platfrom is ubuntu 12.04

Relation answered 17/4, 2014 at 7:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.