zapadi / vies-dotnet

VIES (VAT Information Exchange System) dotNET API helps you to verify if EU VAT information exists and/or is valid
Apache License 2.0
21 stars 7 forks source link

It seems like request SOAP is not updated #14

Closed Macs-cyber closed 2 years ago

Macs-cyber commented 2 years ago

I have simulated the request on Postman with the request SOAP contained in

private const string SoapValidateVatMessageFormat 
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header/>
    <soapenv:Body>
        <checkVat xmlns="urn:ec.europa.eu:taxud:vies:services:checkVat:types">
            <countryCode>{0}</countryCode>
            <vatNumber>{1}</vatNumber>
        </checkVat>
    </soapenv:Body>
</soapenv:Envelope>

and the server returns: ERROR 500: The server encountered an unexpected condition which prevented it from fulfilling the request.

If i remove <?xml version=\"1.0\" encoding=\"utf-8\"?> the request complete successfuly.

So i suggest to update the const in:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header/>
    <soapenv:Body>
        <checkVat xmlns="urn:ec.europa.eu:taxud:vies:services:checkVat:types">
            <countryCode>{0}</countryCode>
            <vatNumber>{1}</vatNumber>
        </checkVat>
    </soapenv:Body>
</soapenv:Envelope>