magento-lts icon indicating copy to clipboard operation
magento-lts copied to clipboard

SOAP API: SOAP-ERROR: Parsing Schema: unexpected <complextype> in schema

Open sermage9 opened this issue 9 months ago • 3 comments

Preconditions (*)

  1. OpenMage 20.6.0 and OpenMage 19.4.23
  2. Fresh OM installs, no migrations from M1.

Steps to reproduce (*)

  1. Make a Soap call (both v1 and v2): $url: https://example.com/api/v2_soap?wsdl=1; $client->login($user, $password);
  2. Or calling dumbly: https://example.com/api/soap/

Expected result (*)

  1. Successful soap login or "access denied"
  2. Invalid XML error

Actual result (*)

  1. SOAP-ERROR: Parsing Schema: unexpected <complextype> in schema
  2. 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:

  1. curl, libxml are installed
  2. can curl the wsdl and get the XML back.
  3. can curl from the same server.

sermage9 avatar May 03 '24 19:05 sermage9

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?

empiricompany avatar May 07 '24 14:05 empiricompany

can't reproduce, also you can see WSDL works also on the demo https://demo.openmage.org/api/v2_soap?wsdl=1

fballiano avatar May 08 '24 12:05 fballiano

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!

sermage9 avatar May 08 '24 12:05 sermage9

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.

sermage9 avatar May 18 '24 17:05 sermage9