Search code examples
delphisoapdelphi-xe2

Unable to load WSDL File/Location in Delphi for VIES SOAP Service


I am trying to create a Delphi XE2 function to check VAT numbers via the SOAP service of VIES: http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl

When I use Delphi X2's WSDL importer with the above URL taking the default values, I get the following error: Unable to load WSDL File/Location: http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl. Error [The requested header was not found - URL:http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl - SOAPAction:""

What am I doing worng?


Solution

  • Save the wsdl file to disc and import the saved xml file. After generating the pas file, change the line matchCode = (1, 2) in (_1, _2).