magento-lts
magento-lts copied to clipboard
SOAP API: SOAP-ERROR: Parsing Schema: unexpected <complextype> in schema
Preconditions (*)
- OpenMage 20.6.0 and OpenMage 19.4.23
- Fresh OM installs, no migrations from M1.
Steps to reproduce (*)
- Make a Soap call (both v1 and v2): $url: https://example.com/api/v2_soap?wsdl=1; $client->login($user, $password);
- Or calling dumbly: https://example.com/api/soap/
Expected result (*)
- Successful soap login or "access denied"
- Invalid XML error
Actual result (*)
- SOAP-ERROR: Parsing Schema: unexpected <complextype> in schema
- And in nginx error log: SOAP-ERROR: Parsing Schema: unexpected <complextype> in schema in /vendor/shardj/zf1-future/library/Zend/Soap/Server.php on line 814
Already checked:
- curl, libxml are installed
- can curl the wsdl and get the XML back.
- can curl from the same server.
I've checked on latest 20.7.0 and it works for me.
$client = new SoapClient('https://example.com/api/v2_soap?wsdl=1');
$session = $client->login($username, $password);
echo $session;
Do you have any active extensions? They can cause issues if they alter the output invalidating the XML (even just by inserting a space).
Have you checked if the problem was caused by this issue https://github.com/OpenMage/magento-lts/issues/3968 and if it's resolved now?
can't reproduce, also you can see WSDL works also on the demo https://demo.openmage.org/api/v2_soap?wsdl=1
I'll do a comparison from a fresh install on same servers and the two instances disabling all third-party modules and let you know ASAP. If a third-party module turns out to be the culprit, it's good to know!
Works as expected on OM 20.7 fresh install. I'll narrow down on what module can cause this. If you want, you can close this request. Thanks.