Soapclient Parsing Schema: cannot import schema from

Script example:

try {
        $client = new SoapClient("http://webservices.sabre.com/wsdl/sabreXML1.0.00/GHT/HotelDirectUpdate.wsdl", array("trace" => 0));
    } catch (Exception $ex) {
        var_dump($ex->faultcode, $ex->faultstring, $ex->faultactor, $ex->detail, $ex->_name, $ex->headerfault);
    }

Output:

string(4) "WSDL"
string(216) "SOAP-ERROR: Parsing Schema: can't import schema from 'http://webservices.sabre.com/wsdl/sabreXML1.0.00/GHT/HotelDirectUpdateRQ.xsd', unexpected 'targetNamespace'='http://webservices.sabre.com/hgc/hoteldirectupdaterq'"
NULL
NULL
NULL
NULL

I know the wsdl file is correct. I checked the wsdl file through http://www.soapclient.com/interop/interopTest.html and it looks fine. but when I call the wsdl file from php, it throws the error above.

Any idea / advice?

+3
source share
2 answers

We also found that SoapClient is unable to process certain schemes, but not with the error you are getting. The least bad solution seems to be to use Java to interact with the SOAP service, PHP-Java Bridge or Gearman to make PHP-Java interop.

+1
source

PHP , , PHP?

0

All Articles