Open gbgssoftware opened 1 year ago
is it possible that a broken wsdl is cached? https://stackoverflow.com/questions/303488/in-php-how-can-you-clear-a-wsdl-cache
Edit php.ini file, search for soap.wsdl_cache_enabled and set the value to 0 The problem occurs
Access denied is a generic error and there are multiple cases where it would get thrown. Do you have logging enabled? If so check var/log/exception.log
for the full stack trace.
In /var/log/exception.log I don't have any API related errors. I have an error two days ago.
Try updating the line below to add the full error message: https://github.com/OpenMage/magento-lts/blob/6851e17f5f74f82241762b8f1c0779e6f0d54b51/app/code/core/Mage/Api/Model/Server/Handler/Abstract.php#L214
- return $this->_fault('access_denied');
+ return $this->_fault('access_denied', $e->getMessage());
I have inserted several points for the logs. Access Denied occurs on line 259.
I modified like this: ` if (!isset($resources->$resourceName->public) && isset($resources->$resourceName->acl) && !$this->_isAllowed((string)$resources->$resourceName->acl) ) { Mage::log(' Ent 2', null, 'error.log', true); Mage::log((string)$resources->$resourceName, null, 'error.log', true) Mage::log((string)$resources->$resourceName->public, null, 'error.log', true); Mage::log((string)$resources->$resourceName->acl, null, 'error.log', true); return $this->_fault('access_denied'); }
The content of error.log is:`
`2023-04-06T18:00:46+00:00 DEBUG (7): Ent 2
2023-04-06T18:00:46+00:00 DEBUG (7):
2023-04-06T18:00:46+00:00 DEBUG (7):
`
Is it correct that $resources->$resourceName is empty? And why does $resources->$resourceName->acl have a value of directory/country?
I tried now in roles to put ALL and it works. Custom throws me an error
Following steps to reproduce, I got this error:
PHP Fatal error: SOAP-ERROR: Parsing WSDL: Unexpected WSDL element <schema> in /vendor/shardj/zf1-future/library/Zend/Soap/Server.php on line 814'
Following steps to reproduce, I got this error:
PHP Fatal error: SOAP-ERROR: Parsing WSDL: Unexpected WSDL element <schema> in /vendor/shardj/zf1-future/library/Zend/Soap/Server.php on line 814'
I had same problem and it was because there was module stil using "
to fix in terminal find all schema instances like this: grep -r '<schema' .
You will get sothing like this:
...
./app/code/core/Mage/Catalog/etc/wsdl.xml:
And if you change in last file "urn:Magento" to "urn:OpenMage" issue is fixed.
Preconditions (*)
1.OpenMage 20.1.0-rc3 2.PHP 7.4 Apache 2.4
Steps to reproduce (*)
1.Open http://site.loc/api/v2_soap/index in browser 2.
Expected result (*)
1.URL can be opened 2.
Actual result (*)
I read issue: #1723
I did this test: I created a tes file in php:
result: