Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VIES SOAP gives error SERVICE_UNAVAILABLE

Tags:

soap

I discovered SOAP services today so I really am not good at it. My point is that I am trying to get the validation of a VAT number from the site http://ec.europa.eu/taxation_customs/vies/vatRequest.html by the use of a webService described in the WSDL http://ec.europa.eu/taxation_customs/vies/checkVatTestService.wsdl .

When I try to get the result I always get a SERVICE_UNAVAILABLE error whatever the sender I use. I tried with postman and with an online testing tool http://wsdlbrowser.com

I POST the following Body to http://ec.europa.eu/taxation_customs/vies/services/checkVatTestService with one header : Content-Type = text/xml.

<SOAP-ENV:Envelope xmlns:SOAP-
ENV="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:ns1="urn:ec.europa.eu:taxud:vies:services:checkVat:types">
  <SOAP-ENV:Body>
<ns1:checkVat>
  <ns1:countryCode>RO</ns1:countryCode>
  <ns1:vatNumber>11478044</ns1:vatNumber>
</ns1:checkVat>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

I haven't seen any similar mistakes on google so I guess it must be a nooby problem.

Can anybody tell me where is my error?

like image 296
Prolls Avatar asked Mar 02 '18 16:03

Prolls


2 Answers

I found the answer. In fact the WSDL was not the correct one... TT The correct one is http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl

like image 155
Prolls Avatar answered Sep 17 '22 18:09

Prolls


Ran into the same problem.

For using the test service http://ec.europa.eu/taxation_customs/vies/services/checkVatTestService

you have to use one of the following numbers as VAT (not an actual VAT):

100 = Valid request with Valid VAT Number
200 = Valid request with an Invalid VAT Number
201 = Error : INVALID_INPUT
202 = Error : INVALID_REQUESTER_INFO
300 = Error : SERVICE_UNAVAILABLE
301 = Error : MS_UNAVAILABLE
302 = Error : TIMEOUT
400 = Error : VAT_BLOCKED
401 = Error : IP_BLOCKED
500 = Error : GLOBAL_MAX_CONCURRENT_REQ
501 = Error : GLOBAL_MAX_CONCURRENT_REQ_TIME
600 = Error : MS_MAX_CONCURRENT_REQ
601 = Error : MS_MAX_CONCURRENT_REQ_TIME

Example for request that returns "valid VAT number":

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:ec.europa.eu:taxud:vies:services:checkVat:types">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:checkVat>
         <urn:countryCode>DE</urn:countryCode>
         <urn:vatNumber>100</urn:vatNumber>
      </urn:checkVat>
   </soapenv:Body>
</soapenv:Envelope>
like image 34
Michael Porr Avatar answered Sep 17 '22 18:09

Michael Porr