SOAP PHP fault parsing WSDL: failed to load external entity?

前端 未结 12 1900
耶瑟儿~
耶瑟儿~ 2020-11-27 05:37

I\'m trying to run a web service using PHP & SOAP, but all I\'m getting so far is this:

(SoapFault)[2] message which states: \'SOAP-ERROR: Parsing

12条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-27 06:32

    Just had a similar problem trying to use SoapClient. Everything was working fine but in production, sometimes on page refresh, I would get the "SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from .." error.

    I was using the params:

    new \SoapClient($WSDL, array('cache_wsdl' => WSDL_CACHE_NONE, 'trace' => true, "exception" => 0)); 
    

    Removing all the params worked for me:

    new \SoapClient($WSDL); 
    

提交回复
热议问题