Error when contacting the VAT Number verification service: org.apache.axis2.databinding.ADBException: Unexpected subelement checkVat

What does it mean and how we could fix it?

Comments

wimh’s picture

Can you check what SOAP library you're using? (see Site configuration > Soap client > Configure). The VAT service only seems to work with nuSOAP, so if you're now using the PHP extension please try it with nuSOAP instead.

webflo’s picture

Thx wimh. I confirm this, works only with nuSOAP.

grub3’s picture

nuSOAP is installed in /sites/all/libraries/nusoap/
changelog class.soapclient.php class.soap_parser.php class.soap_transport_http.php class.wsdlcache.php class.xmlschema.php nusoap.php
class.nusoap_base.php class.soap_fault.php class.soap_server.php class.soap_val.php class.wsdl.php nusoapmime.php/

It does not work for me ...

grub3’s picture

My message is:
Ubercart VAT Number VAT validation not functional
VAT Number validation requires the SOAP Client module to use the nuSOAP library, you can configure this here.

Soap is configured with nuSOAP library, so I don't understand what is going on.

grub3’s picture

Testing the code, I found that I had to force nuSOP:

global $soapclient_LIBRARY;
$soapclient_LIBRARY='nuSOAP';

nuSOAP works, it is $soapclient_LIBRARY which is not well detected.

grub3’s picture

The error is still there.
The Soap path needs to be forced...

wimh’s picture

Can you post a patch that makes it work for you?

grub3’s picture

This is not a patch, just a hack:
uc_vat_number.module
line 34:

    global $soapclient_LIBRARY;
    $soapclient_LIBRARY='nuSOAP';
    if (variable_get('uc_store_vat_number_soap', true) == true
mandreato’s picture

Same issue here.
It seems that SOAP Client module sets a global variable $_soapclient_LIBRARY (pay attention to the underscore after the dollar). whilst VAT number module uses $soapclient_LIBRARY (without underscore).

wimh’s picture

@mandreato I can't find any reference to $_soapclient_LIBRARY in SOAP Client 6.x-1.0-beta2. What version are you using?

mandreato’s picture

soapclient 6.x-1.x-dev
BTW: soapclient module is no more required in uc_vat_number 6.x-2.x-dev (it is not asked as dependency)

jvieille’s picture

Version: 6.x-1.0-beta1 » 6.x-3.x-dev

The dependency with SOAP Client seems back in 6.x-1.x-dev.

I have exactly the problem mentioned in #4, a nasty warning in the status page

Ubercart VAT Number	VAT validation not functional
VAT Number validation requires the SOAP Client module to use the nuSOAP library. Configure SOAP Client.
jvieille’s picture

Priority: Normal » Critical

Apparently, the error mentioned in #9 is still there
In uc_vat_number.install, $soapclient_LIBRARY must be replaced by $_soapclient_LIBRARY
This howver does not solve the issue.

Thanks for help

jvieille’s picture

Actually, the global is not set in the module.

I modified this way to get rid of the status error:

function uc_vat_number_requirements($phase) {
  $t = get_t();

  if ($phase == 'runtime') {
-    global $soapclient_LIBRARY;
+    global $_soapclient_LIBRARY;
+    $_soapclient_LIBRARY = variable_get('soapclient_lib', 'auto'); 
 -   if (variable_get('uc_store_vat_number_soap', TRUE) == TRUE && $soapclient_LIBRARY != 'nuSOAP') {
 +   if (variable_get('uc_store_vat_number_soap', TRUE) == TRUE && $_soapclient_LIBRARY != 'nuSOAP') {

      /* EU VAT service only plays nice with nuSOAP, PHP SOAP module gives unreliable results... */
...
roball’s picture

Title: Error when contacting the VAT Number verification service » Support the current SOAP Client 6.x-1.x-dev snapshot
Category: bug » feature
Priority: Critical » Normal

Ubercart VAT Number 6.x-3.x-dev (2012-Apr-19) actually works fine with the official latest release of the SOAP Client module for D6, which is still 6.x-1.0-beta2. It uses $soapclient_LIBRARY which is exactly what this module uses, so there is no bug.

Thus this issue is more a feature request to support the current SOAP Client 6.x-1.x-dev snapshot, which is not very wise IMO because the variable naming the current dev snapshot is using could change until the next release. Using $_soapclient_LIBRARY seems to be a mistake anyway.

mustanggb’s picture

Priority: Normal » Major
Issue summary: View changes

SOAP Client 6.x-1.0-beta2 no longer works on PHP 5.5, but dev does (https://www.drupal.org/node/1276294) so allowing the use of dev (as well as beta2) would be great.