magento-lts: SOAP fault due to "SOAP-ERROR: Parsing Schema: can't import schema from 'http://schemas.xmlsoap.org/soap/encoding/' "

Preconditions (*)

  1. https://demo.openmage.org/

Steps to reproduce (*)

  1. Run this script
<?php

error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 1);


ini_set("soap.wsdl_cache_enabled", "0");
$api_url_v2 = 'https://demo.openmage.org/api/v2_soap/?wsdl=1';

$context = stream_context_create([
    'ssl' => [
        // set some SSL/TLS specific options
        'verify_peer' => false,
        'verify_peer_name' => false,
    ]
]);

$username = 'dummy';
$password = 'dummy';

try {
    $cli = new SoapClient( $api_url_v2, array(
        "trace"     => 1,
        "exception" => 1,
        'stream_context' => $context,
        "cache_wsdl" => WSDL_CACHE_NONE,
    ) );

    echo "Logging in..".PHP_EOL;
    $sessionId = $cli->login($username, $password);

}catch (Exception $exception){
    var_dump($exception);
}

Expected result (*)

  1. Access denied

Actual result (*)

  1. SoapFault
object(SoapFault)#2 (14) {
  ["message":protected]=>
  string(96) "SOAP-ERROR: Parsing Schema: can't import schema from 'http://schemas.xmlsoap.org/soap/encoding/'"
  ["string":"Exception":private]=>
  string(0) ""
  ["code":protected]=>
  int(0)
  ["file":protected]=>
  string(58) "Openmage.php"
  ["line":protected]=>
  int(22)
  ["trace":"Exception":private]=>
  array(1) {
    [0]=>
    array(6) {
      ["file"]=>
      string(58) "Openmage.php"
      ["line"]=>
      int(22)
      ["function"]=>
      string(11) "__construct"
      ["class"]=>
      string(10) "SoapClient"
      ["type"]=>
      string(2) "->"
      ["args"]=>
      array(2) {
        [0]=>
        string(45) "https://demo.openmage.org/api/v2_soap/?wsdl=1"
        [1]=>
        array(4) {
          ["trace"]=>
          int(1)
          ["exception"]=>
          int(1)
          ["stream_context"]=>
          resource(4) of type (stream-context)
          ["cache_wsdl"]=>
          int(0)
        }
      }
    }
  }
  ["previous":"Exception":private]=>
  NULL
  ["faultstring"]=>
  string(96) "SOAP-ERROR: Parsing Schema: can't import schema from 'http://schemas.xmlsoap.org/soap/encoding/'"
  ["faultcode"]=>
  string(4) "WSDL"
  ["faultcodens"]=>
  NULL
  ["faultactor"]=>
  NULL
  ["detail"]=>
  NULL
  ["_name"]=>
  NULL
  ["headerfault"]=>
  NULL
}

Further investigation

curl http://schemas.xmlsoap.org/soap/encoding/

Returns a 404

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 25 (16 by maintainers)

Most upvoted comments

It seems microsoft fixed the problem.

I’m not sure the domain can be switched to a custom one, somebody could test this?

xsd-files-2024-05-02.zip

Added the files here from the webarchive links above, in case they disappear once more.

Confirm, problem started a few days ago. Sometimes it works, sometimes it doesn’t. I try to solve it via DNS and locally served xml(no success yet)