laravel-soap
laravel-soap copied to clipboard
Pass '0' as a string
Hi ! When I'm calling the WS with the param 'gestions'=>'8', it returns results. But when calling it with 'gestions'=>'0' or '1', it returns NO results.
I've tried launching it from SOAP-UI, and it returned many results.
I'm thus suspecting a boolean conversion that messes up everything. How to force my param to be taken as a string ?
I bumped on http://php.net/manual/fr/soapvar.soapvar.php :
$parm = array();
$parm[] = new SoapVar('123', XSD_STRING, null, null, 'customerNo' );
$resp = $client->getStuff( new SoapVar($parm, SOAP_ENC_OBJECT) );
But I can't call SoapVar : it doesn't know the class...
Thanks for your help !
Have you tried to cast your number into string this way ==> $number = (string) 1; ?
For the fact he doesn't know the class, have you tried to add a backslash before SoapVar ?
==> new \SoapVar()