0

Sei que tem alguns topicos relacionado aqui no Stackoverflow, mas nenhum conseguiu me atender devidamente。Segue minha API.XML

<?xml version="1.0"?>
<config>
    <api>
        <resources>
            <verificaintegrador_api translate="title" module="verificaintegrador">
                <title>Myapi</title>
                <acl>verificaintegrador/api</acl>
                <model>verificaintegrador/api</model>
                <methods>                    
                        <verificarintegradoron translate="title" module="verificaintegrador">
                            <title>verificarintegradoron</title>
                            <acl>verificaintegrador/verificarintegradoron</acl>
                        </verificarintegradoron>                    
                        <alterarstatusintegrador translate="title" module="verificaintegrador">
                            <title>alterarstatusintegrador</title>
                            <acl>verificaintegrador/alterarstatusintegrador</acl>
                        </alterarstatusintegrador>
                </methods>
            </verificaintegrador_api>
        </resources>
        <acl>
            <resources>
                <verificaintegrador translate="title" module="verificaintegrador">
                    <title>VerificaIntegrador</title>
                    <sort_order>2000</sort_order>                    
                    <verificarintegradoron translate="title" module="verificaintegrador">
                        <title>verificarintegradoron</title>
                    </verificarintegradoron>                    
                    <alterarstatusintegrador translate="title" module="verificaintegrador">
                        <title>alterarstatusintegrador</title>
                    </alterarstatusintegrador>
                </verificaintegrador>
            </resources>
        </acl>
    </api>
</config>

在 System.log 中得到以下描述:

2013-08-26T14:48:40+00:00 DEBUG (7): include() [<a href='function.include'>function.include</a>]: Unable to access Mage_Verificaintegrador_Model_Api.php/home/npctrini/public_html/lojamodelo/includes/src/Varien_Autoload.php
2013-08-26T14:48:40+00:00 DEBUG (7): include(Mage_Verificaintegrador_Model_Api.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory/home/npctrini/public_html/lojamodelo/includes/src/Varien_Autoload.php
2013-08-26T14:48:40+00:00 DEBUG (7): include() [<a href='function.include'>function.include</a>]: Unable to access Mage_Verificaintegrador_Model_Api.php/home/npctrini/public_html/lojamodelo/includes/src/Varien_Autoload.php
2013-08-26T14:48:40+00:00 DEBUG (7): include(Mage_Verificaintegrador_Model_Api.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory/home/npctrini/public_html/lojamodelo/includes/src/Varien_Autoload.php
2013-08-26T14:48:40+00:00 DEBUG (7): include() [<a href='function.include'>function.include</a>]: Unable to access Mage_Verificaintegrador_Model_Api.php/home/npctrini/public_html/lojamodelo/includes/src/Varien_Autoload.php
2013-08-26T14:48:40+00:00 DEBUG (7): include(Mage_Verificaintegrador_Model_Api.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory/home/npctrini/public_html/lojamodelo/includes/src/Varien_Autoload.php
2013-08-26T14:48:40+00:00 DEBUG (7): include() [<a href='function.include'>function.include</a>]: Failed opening 'Mage_Verificaintegrador_Model_Api.php' for inclusion (include_path='/home/npctrini/public_html/lojamodelo/includes/src:.:/usr/lib/php:/usr/local/lib/php')/home/npctrini/public_html/lojamodelo/includes/src/Varien_Autoload.php
4

1 回答 1

0

检查您的 Magento 设置是否设置为已编译,然后,当您执行此 API(从任何其他代码,比如 java/.net/php 客户端)时,它将搜索扩展 php 文件 /include/src,因此您需要将您的文件复制到该位置,然后发布 Magento Extension 或只编译一次 Magento(编译将自动将所需文件复制到 /include/src,除此之外别无其他:))。

于 2014-07-19T16:15:28.497 回答