laravel-soap icon indicating copy to clipboard operation
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

Open thakurankesh opened this issue 6 years ago • 4 comments

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 avatar Feb 15 '19 06:02 thakurankesh

@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,
        ])
       ;
    });

mas-ih avatar Mar 12 '19 07:03 mas-ih

the wsdl's url in this package's document is WRONG!!!!! Don't use it!

jimhuang98 avatar Apr 20 '19 16:04 jimhuang98

the wsdl's url in this package's document is WRONG!!!!! Don't use it!

What is the right /corrette wsdl

killian-coder avatar Feb 20 '20 12:02 killian-coder

Answer in #182

tony5Dim avatar Feb 25 '21 13:02 tony5Dim