How to access service from EU (vies)


I’m struggling to get a result from the VIES service of the EU. It’s a public SOAP service to validate European VAT numbers.
When I use the Delphi WSDL importer, it’s pretty straight forward. The RO WSDL importer on the other hand is rather difficult. I don’t succeed in sending a correct message using a TROIndyHTTP channel and a SOAP message.
I’ve already tried a lot of possible combinations of options but no success…
AFAICS the countrycode and vatnumber must be ‘namespaced’ but they are not.

What options do I need to set to send a correct formatted request to this service?
The service WSDL is located here (


<?xml version="1.0" encoding="utf-8"?>
        <ROClientIDHeader SOAP-ENV:mustUnderstand="0" xmlns="">
    <SOAP-ENV:Body xmlns:ro="">
      <v1:checkVat xmlns:v1="">


<soap:Envelope xmlns:soap="">
    <faultstring>Unmarshalling Error: unexpected element (uri:"", local:"countryCode"). Expected elements are &lt;{}vatNumber>,&lt;{}countryCode> 

Pls advise…
This is a public service, so it’s easy to test (it would take longer for me to zip a test, than for you to make one ;-))



The test-service seems unavailable.
Testing can be done with (same WSDL other URL)

I temporarily solved this problem with the use of StringReplace (in the stream), but that might not be definite the solution.


Txt := StringReplace(Txt,’’,‘v1:countryCode’, [rfReplaceAll]);
Txt := StringReplace(Txt,’’,’</v1:countryCode>’, [rfReplaceAll]);
Txt := StringReplace(Txt,’’,‘v1:vatNumber’, [rfReplaceAll]);
Txt := StringReplace(Txt,’’,’</v1:vatNumber>’, [rfReplaceAll]);


pls launch Service Builder, select checkVat method, edit it’s attributes and remove inputchildrennamespace and outputchildrennamespace attributes:

after this, this service will work as expected:

Note: you may need to remove these attributes from all methods of this service