laravel-soap
laravel-soap copied to clipboard
SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://currencyconverter.kowabunga.net/converter.asmx?WSDL' : failed to load external entity "http://currencyconverter.kowabunga.net/converter.asmx?WSDL
I am trying to run sample project provided by you . When I am trying to run this, i am getting error SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://currencyconverter.kowabunga.net/converter.asmx?WSDL' : failed to load external entity "http://currencyconverter.kowabunga.net/converter.asmx?WSDL
I have used following code :
$this->soapWrapper->add('Currency', function ($service) {
$service
->wsdl('http://currencyconverter.kowabunga.net/converter.asmx?WSDL') // The WSDL url
->trace(true) // Optional: (parameter: true/false)
->classmap([
GetConversionAmount::class,
GetConversionAmountResponse::class,
])
;
});
// With classmap
$response = $this->soapWrapper->call('Currency.GetConversionAmount', [
new GetConversionAmount('USD', 'EUR', '2014-06-05', '1000')
]);
@thakurankesh I had the same issue and found a working soloution for me in this SO post.
Explicitly setting a user agent in options did the trick for me:
$this->soapWrapper->add('Currency', function ($service) {
$service
->wsdl('http://currencyconverter.kowabunga.net/converter.asmx?WSDL') // The WSDL url
->trace(true) // Optional: (parameter: true/false)
->options([
'user_agent' => 'PHPSoapClient', // Add this as options
])
->classmap([
GetConversionAmount::class,
GetConversionAmountResponse::class,
])
;
});
the wsdl's url in this package's document is WRONG!!!!! Don't use it!
the wsdl's url in this package's document is WRONG!!!!! Don't use it!
What is the right /corrette wsdl
Answer in #182