Warning: SoapClient::SoapClient(http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl) [soapclient.soapclient]: failed to open stream: HTTP request failed! HTTP/1.1 504 Gateway Timeout w _vat_number_validate_vat() (linia 328 z H:\biznesowy\MARCOM_Projekty\MARCOM_WWW\v2.00\public_html\sites\all\modules\vat_number\vat_number.inc).
Warning: SoapClient::SoapClient() [soapclient.soapclient]: I/O warning : failed to load external entity "http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl" w _vat_number_validate_vat() (linia 328 z H:\biznesowy\MARCOM_Projekty\MARCOM_WWW\v2.00\public_html\sites\all\modules\vat_number\vat_number.inc).
SoapFault: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl' : failed to load external entity "http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl" w SoapClient->SoapClient() (linia 328 z H:\biznesowy\MARCOM_Projekty\MARCOM_WWW\v2.00\public_html\sites\all\modules\vat_number\vat_number.inc).
This shows up when ec.europa.eu/taxation_customs/vies is offline while editing or adding commerce profile.
I think the validation should be ommitted in such case.
Comment | File | Size | Author |
---|---|---|---|
#3 | vat_number-catch_soupclient_php_error-1835894-3.patch | 1.79 KB | kafitz |
Comments
Comment #1
kafitz CreditAttribution: kafitz commentedI saw a possible answer:
http://php.net/manual/en/class.soapclient.php
https://bugs.php.net/bug.php?id=47584
The main idea is to make sure to prefix the constructor calls with @ and catch SoapFault exceptions. I'll try to create a patch.
Comment #3
kafitz CreditAttribution: kafitz commentedI created a new function for creating the connection with the VIES database. So it is possible the catch the faultstring and prevent unnecessary PHP warnings when connection is down
Comment #4
dwkitchen CreditAttribution: dwkitchen commentedThanks
Committed and beta1 tag done