Problem checking online VAT

  • Posts: 41
  • Thank you received: 0
12 years 2 months ago #65140

Hi,
when enabling the online check for VAT numbers I get this:

SoapFault exception: [WSDL] 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" in
/var/www/html/wwwdafraeu/administrator/components/com_hikashop/helpers/vat.php:
137 Stack trace: #0
/var/www/html/wwwdafraeu/administrator/components/com_hikashop/helpers/vat.php(
137): SoapClient->SoapClient('http://ec.europ...') #1
/var/www/html/wwwdafraeu/administrator/components/com_hikashop/helpers/vat.php(
44): hikashopVatHelper->onlineCheck('BE0817.401.875 ') #2
/var/www/html/wwwdafraeu/administrator/components/com_hikashop/classes/address.
php(219): hikashopVatHelper->isValid(Object(stdClass)) #3
/var/www/html/wwwdafraeu/administrator/components/com_hikashop/classes/address.
php(142): hikashopAddressClass->_checkVat(Object(stdClass)) #4
/var/www/html/wwwdafraeu/administrator/components/com_hikashop/classes/user.php(
563): hikashopAddressClass->save(Object(stdClass)) #5
/var/www/html/wwwdafraeu/components/com_hikashop/controllers/user.php(20):
hikashopUserClass->register(Object(userController), 'user') #6
/var/www/html/wwwdafraeu/libraries/joomla/application/component/controller.php(
754): userController->register() #7
/var/www/html/wwwdafraeu/components/com_hikashop/hikashop.php(54):
JController->execute('register') #8
/var/www/html/wwwdafraeu/libraries/joomla/application/component/helper.php(388):
require_once('/var/www/html/w...') #9
/var/www/html/wwwdafraeu/libraries/joomla/application/component/helper.php(357):
JComponentHelper::executeComponent('/var/www/html/w...') #10
/var/www/html/wwwdafraeu/includes/application.php(198):
JComponentHelper::renderComponent('com_hikashop') #11
/var/www/html/wwwdafraeu/index.php(42): JSite->dispatch() #12 {main}

At first I thought this might be a problem with loading the SOAP extension, but this is successfully loaded following phpinfo().
Then I thought it was the SOAP service, but this seems to work on my laptop. Then I tried another SOAP service on my webserver and this worked.

So it seems to be a combination Centos 6.2 (my distro) and the European VAT checking service.

I realize this is not strictly a Hikashop problem defect, but would there be any way to work around this? By using the PEAR SOAP version for instance?

Thank you,

BC

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
12 years 2 months ago #65271

Hi,

It could potentially be a temporary issue with the European VAT checking service. We found out that they often had downtimes and we had to disable it on our website and only use the regex check :/
So you should try if it is still not working.

If that's the case, an easy workaround is to download manually the WSDL file ec.europa.eu/taxation_customs/vies/checkVatService.wsdl to your website and change the URL in administrator/components/com_hikashop/helpers/vat.php so that it use your WSDL file instead of the European VAT checking service one.

Now it might still not be able to connect to the service to process the VAT number but at least it won't have a problem downloading the WDSL file which is a prerequisite.

The following user(s) said Thank You: bcnx

Please Log in or Create an account to join the conversation.

  • Posts: 41
  • Thank you received: 0
12 years 2 months ago #65277

Well, the check works on another machine, so I guess it is not related to downtimes. I suspect the SOAP module on Centos 6.2 has a bug somewhere.
Downloading the WDSL with wget works, accessing another WDSL service works also.
I guess we'll have to settle for regex, which by itself is a nice feature too!

Cheers,

BC

Please Log in or Create an account to join the conversation.

Time to create page: 0.042 seconds
Powered by Kunena Forum