soapCall return me xml with function's name in lowercase



Im trying to use a function called GetExample in a web service called http://ift.tt/1r1I9Y2 but when I use __soapCall function, the xml turns to lowercase. Example



$server="http://ift.tt/1r3nKAD";
$soapClient = new SoapClientDebug($server, array('trace' => TRUE));

$parametros = array('Cups' => '8','Tarifa'=>'2');
$function = 'GetExample';
$resultado = $soapClient->__soapCall($funcion, array($parametros));


And this is SoapClientDebug class:



class SoapClientDebug extends SoapClient
{
public $sendRequest = true;


public function __doRequest($request, $location, $action, $version, $one_way=0) {
if ($this->sendRequest) {
var_dump($request);
return parent::__doRequest($request, $location, $action, $version, $one_way);
}
else {
return '';
}
}
}


The $request var_dump is shown like that:



<soap-env:envelope xmlns:soap-env="http://ift.tt/sVJIaE" xmlns:ns1="http://com/example/WS/OmieServices"><soap-env:body><ns1:getexample><ns1:cups>8</ns1:cups><ns1:tarifa>2</ns1:tarifa></ns1:getexample></soap-env:body></soap-env:envelope>


If the name of function is lowercase, the web service return nothing. I have seen the soapClient construct and I havent seen anything about this in http://ift.tt/1r3nKQR


No comments:

Post a Comment