配置magento soap所遇到的问题及解决方法

1、错误一:Unable to load Soap extension on the server

解决方法:安装php soap支持模块,下面是安装方法。

(1)、下载php soap的rpm包,下载地址:http://dev.centos.org/centos/5/testing/(一定要注意主机处理器类型选择x86_64或者i386),上传到服务器根目录;

(2)、ssh登陆服务器,运行命令:

[root@199257 ~]# rpm -ivh php-soap-5.2.10-1.el5.centos.x86_64.rpm
Preparing...                ########################################### [100%]
   1:php-soap               ########################################### [100%]
[root@199257 ~]# service php_cgi restart
Stopping php-cgi:                                                                                                         [  OK  ]
Starting php-cgi: spawn-fcgi: child spawned successfully: PID: 7651                                  [  OK  ]
(3)、这样就OK了。

2、错误二:Parsing WSDL: Couldn't load from 'http://www.xxx.com/api/soap/?wsdl' : failed to load external entity http://www.xxx.com/api/soap/?wsdl

解决方法:修改文件/var/www/magento/app/code/core/Mage/Api/Model/Server/Adapter/Soap.php的135行 (在'return $this'之前).

} else {
            $this->fault('0', 'Unable to load Soap extension on the server');
        } // <--- 添加在这里

        return $this;
}

若更改此文件不起作用,则需要改/includes/src下的Mage_Api_Model_Server_Adapter_Soap.php文件。

3、错误三:Call to undefined method Mage_Sales_Model_Mysql4_Order_Collection::addExpressionAttributeToSelect()

修改文件 app/code/core/Mage/Sales/Model/Order/Api.php ,将以下语句注释

/*->addExpressionAttributeToSelect('billing_name',
                'CONCAT({{billing_firstname}}, " ", {{billing_lastname}})',
                array('billing_firstname', 'billing_lastname'))
->addExpressionAttributeToSelect('shipping_name',
                'CONCAT({{shipping_firstname}}, " ", {{shipping_lastname}})',
                array('shipping_firstname', 'shipping_lastname')) */

若更改此文件不起作用,则需要改/includes/src下的Mage_Sales_Model_Order_Api.php文件。

4、错误四:Parsing Schema: can’t import schema from ‘http://schemas.xmlsoap.org/soap/encoding/’

解决方法:在soap客户端的服务器的host文件(linux主机:/etc/hosts)中添加服务端域名的解析语句:
yourip   www.yourdomain.com

5、错误五:looks like we got no XML document

解决方法:所有的php文件,包括直接和间接调用到的。注意在<?php之前不能用任何空行或者空格字符,?>之后不能有任何空行或空白字符。当然有时候也有可能需要在soap客户端的服务器的host文件(linux主机:/etc/hosts)中添加服务端域名的解析语句: yourip www.yourdomain.com

转载自:研究者之家

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值