duanao3204 2017-12-18 17:19
浏览 56

创建SoapClient时无法加载WSDL

I have started getting the following error when I make a Soap call.

SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://soapapi.findapprenticeship.service.gov.uk/Services/VacancyDetails/VacancyDetails51.svc?WSDL'

My code is...

$wsdl = 'https://soapapi.findapprenticeship.service.gov.uk/Services/VacancyDetails/VacancyDetails51.svc?WSDL'
$this->client = new SoapClient($wsdl, ['trace' => true]);


$this->client->__setSoapHeaders([
    new SoapHeader($this->namespace, 'PublicKey', env('PublicKey')),
    new SoapHeader($this->namespace, 'MessageId', Uuid::uuid4()->toString()),
    new SoapHeader($this->namespace, 'ExternalSystemId', env('ExternalSystemId')),
]);

I can browse to the url so I know it's there and working, it's just that the SoapClient can't. What's so weird is that it was working fine last week and but I noticed on 2 different Macs I use, that it has started throwing this error.

Can anyone help?

Thanks

  • 写回答

0条回答 默认 最新

    报告相同问题?