soapclient Parsing Schema: can't import schema from

妖精的绣舞 提交于 2019-12-07 15:57:06

问题


Example Script :

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 wsdl file is correct. I checked wsdl file via http://www.soapclient.com/interop/interopTest.html and it is looking ok. but when i call the wsdl file from php it is giving above error.

Any idea/advice?


回答1:


We have also found SoapClient to be incapable of handling certain schemas, though not with the error you get. The least bad solution seems to be to use Java to interact with the SOAP service, with PHP-Java Bridge or Gearman to do the PHP-Java interop.




回答2:


There are some bugs known in some versions of PHP, perhaps you're running an older PHP version?



来源:https://stackoverflow.com/questions/5905349/soapclient-parsing-schema-cant-import-schema-from

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!