Closed jlannoy closed 7 months ago
hi @jlannoy , you are entering in the following case (as covered in the test): https://github.com/digitalfondue/vatchecker/blob/master/src/test/java/ch/digitalfondue/vatchecker/EUVatCheckerTest.java#L35
@Test
public void testCorrectCountryCodeButInvalidVAT() {
EUVatCheckResponse resp = EUVatChecker.doCheck("NL", "85187947B01");
Assert.assertEquals(false, resp.isValid());
Assert.assertEquals("---", resp.getName());
Assert.assertEquals("---", resp.getAddress());
Assert.assertEquals(false, resp.isError());
Assert.assertNull(resp.getFault());
}
Basically, you pass a valid country (NL) but the VAT number is invalid. Thus you will receive like the web frontend:
Yup, that was already clear. Sorry, the purpose of my question was not so technical but more about the fault itself, the "cross border" red message. Shouldn't that message be available as a fault? Thank you.
hi, @jlannoy , this is what I receive from the soap web service, so the specific message is not propagated as a fault:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<env:Envelope
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<ns2:checkVatResponse
xmlns:ns2="urn:ec.europa.eu:taxud:vies:services:checkVat:types">
<ns2:countryCode>NL</ns2:countryCode>
<ns2:vatNumber>85187947B01</ns2:vatNumber>
<ns2:requestDate>2024-04-09+02:00</ns2:requestDate>
<ns2:valid>false</ns2:valid>
<ns2:name>---</ns2:name>
<ns2:address>---</ns2:address>
</ns2:checkVatResponse>
</env:Body>
</env:Envelope>
I would not be surprised if that specific message is hardcoded or only available on the web interface.
I would not be surprised if that specific message is hardcoded or only available on the web interface.
It seems. Thank you for checking!
Hello.
Any idea why we have an empty result for VAT number 85187947B01 (NL one), while we have a result on the VIES website?