-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught SoapFault exceptions #14
Comments
Thank you for reporting this failure. Yes, there's a limit on requests you can do on the soap service but it's not documented how many request can be made in what time period. Let me see what I can do about it. |
I was actually more concerned that an uncaught SoapFault is thrown. Surely, the SoapFault should be caught by DragonBe\Vies\Vies, and a DragonBe\Vies\ViesException should be thrown? I would have thought it is easier for the end user to try and catch only one specific exception in his/her application logic, than for a DragonBe\Vies\ViesException and a SoapFault. Or am I the only one who would implement it that way? What do you think? |
@jonathanmaron You're absolutely right. Well, the issue is created and marked as bug. If I can free up some time, I will fix it in the upcoming days. |
Fixed in #18 |
To differentiate between exceptions caused by local code, and those from the back-end service VIES, it make sense to have two exceptions. The new example "examples/checkVatBatch.php" shows why this is important. |
Fixed Issue #14 - Uncaught SoapFault exceptions
It seems that natural persons have 10 digits and the way the checksum is calculated differs from the way business identities are being calculated. I've found a solution in a Ruby VAT validation package [yolk/valvat](https://github.com/yolk/valvat). In [their issue #14](yolk/valvat#14) they describe issues with validating Bulgarian VAT ID's and how they solved it. I have applied their working solution to ensure consistency.
On iterating through a long list (ca. 2,000 items) of VAT numbers, validating each, I have received all the following uncaught SoapFault exceptions.
PHP Fatal error: Uncaught SoapFault exception: [soap:Server] MS_MAX_CONCURRENT_REQ
in [..]/vies/src/Vies/Vies.php:229
PHP Fatal error: Uncaught SoapFault exception: [soap:Server] GLOBAL_MAX_CONCURRENT_REQ
in [..]/vies/src/Vies/Vies.php:229
PHP Fatal error: Uncaught SoapFault exception: [soap:Server] MS_UNAVAILABLE
in [..]/vies/src/Vies/Vies.php:229
The text was updated successfully, but these errors were encountered: