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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kafitz’s picture

Assigned: Unassigned » kafitz

I 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.

kafitz’s picture

Status: Active » Needs review
FileSize
1.79 KB

I 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

dwkitchen’s picture

Status: Needs review » Fixed

Thanks

Committed and beta1 tag done

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.