f00b4r / nusoap

:smirk: Fixed NuSOAP for PHP 5.6 - 8.2
https://f00b4r.github.io/nusoap/
320 stars 356 forks source link

Error (when upgrade from 0.9.51 to 0.9.10) wsdl: is not a supported type. #67

Open Hugonauta opened 4 years ago

Hugonauta commented 4 years ago

Recently I update my project on laravel from 5.8 to 8 and nusoap to the last version, 0.9.10, but y got and erro when call a soap service that was working normally before the upgrade

my code:

//llamar a SOAP tigo: $lcUrl="My URL soap service"; $client = new \nusoap_client($lcUrl, 'wsdl'); $client->soap_defencoding = 'UTF-8'; $client->decode_utf8 = FALSE;

//parametros q envio $param = array( 'key' => SecurityKey::SecurityKeyIdentification, 'parametros' => $tcParametros ); //llamando al método y pasándole el array con los parámetros $lcRespuestaTigo = $client->call('consultarEstado', $param);

        // Check for a fault
        if ($client->fault) {
            var_dump($lcRespuestaTigo);
        } else {
            // Check for errors
            $err = $client->getError();
            if ($err) {
                // Display the error
                var_dump($err);
               // echo '<h2>Error</h2><pre>' . $err . '</pre>';
            } else {
                // Display the result
                var_dump($lcRespuestaTigo);
            }
        }

and i got the error: "wsdl error: "My URL"/:consultarEstado^ (consultarEstado^) is not a supported type."

Hugonauta commented 4 years ago

this is the error debug:

2020-10-02 11:42:01.722643 wsdl: in parametersMatchWrapped: got a prefixed type: consultarEstado^,
http://services.vlink.com.bo/
2020-10-02 11:42:01.722663 wsdl: in getTypeDef: type=consultarEstado^, ns=http://services.vlink.com.bo/
2020-10-02 11:42:01.722679 wsdl: in getTypeDef: do not have schema for namespace http://services.vlink.com.bo/
2020-10-02 11:42:01.722692 wsdl: in parametersMatchWrapped: http://services.vlink.com.bo/:consultarEstado^
(consultarEstado^) is not a supported type.
2020-10-02 11:42:01.722705 wsdl: serializing part parameters of type http://services.vlink.com.bo/:consultarEstado^
2020-10-02 11:42:01.722718 wsdl: calling serializeType w/null param
2020-10-02 11:42:01.722732 wsdl: in serializeType: name=parameters,
type=http://services.vlink.com.bo/:consultarEstado^, use=literal, encodingStyle=, unqualified=qualified
value=NULL
2020-10-02 11:42:01.722750 wsdl: in serializeType: got a prefixed type: consultarEstado^,
http://services.vlink.com.bo/
2020-10-02 11:42:01.722766 wsdl: in getTypeDef: type=consultarEstado^, ns=http://services.vlink.com.bo/
2020-10-02 11:42:01.722779 wsdl: in getTypeDef: do not have schema for namespace http://services.vlink.com.bo/
2020-10-02 11:42:01.722793 wsdl: in serializeType: http://services.vlink.com.bo/:consultarEstado^ (consultarEstado^)
is not a supported type.
2020-10-02 11:42:01.722806 wsdl: serializeRPCParameters returning:
2020-10-02 11:42:01.722825 nusoap_client: got wsdl error: http://services.vlink.com.bo/:consultarEstado^
(consultarEstado^) is not a supported type.
"
Hugonauta commented 4 years ago

i think a ineed to write my solucion, the "fetchWSDL" method from "wsdl" class in the last version "0.9.10", has been changed and doesn't scan the imported schemas, I copy the old version method form version "0.5.9.1" and all its working correctly now