Forum Moderators: coopster
$soapClient = new SoapClient($this->soapBCCR);
/*
// Prepare SoapHeader parameters
$sh_param = array(
'tcIndicador'=> '317',
'tcFechaInicio'=> '18/05/2010',
'tcFechaFinal'=> '18/05/2010',
'tcNombre'=> 'Anyone',
'tcSubNiveles'=> 'N');
$headers = new SoapHeader('http://indicadoreseconomicos.bccr.fi.cr/IndicadoresEconomicos/WebServices/wsIndicadoresEconomicos.asmx','ObtenerIndicadoresEconomicosXML');
// Prepare Soap Client
$soapClient->__setSoapHeaders(array($headers));
*/
// Setup the RemoteFunction parameters
$ap_param = array(
'tcIndicador'=> '317',
'tcFechaInicio'=> '18/05/2010',
'tcFechaFinal'=> '18/05/2010',
'tcNombre'=> 'TicoVista',
'tcSubNiveles'=> 'N');
// Call RemoteFunction ()
$error = 0;
try {
$info = $soapClient->__call("ObtenerIndicadoresEconomicosXML", array($ap_param));
} catch (SoapFault $fault) {
$error = 1;
print("
alert('Sorry, blah returned the following ERROR: ".$fault->faultcode."-".$fault->faultstring.". We will now take you back to our home page.');
");
}
if ($error == 0) {
$auth_num = $info->RemoteFunctionResult;
if ($auth_num < 0) {
//var_dump($info);
// Kill the link to Soap
unset($soapClient);
}
} $soapClient = new SoapClient('http://example.com/IndicadoresEconomicos/WebServices/wsIndicadoresEconomicos.asmx?wsdl');
// Setup the RemoteFunction parameters
$ap_param = array(
'tcIndicador'=> '317',
'tcFechaInicio'=> '18/05/2010',
'tcFechaFinal'=> '18/05/2010',
'tcNombre'=> 'TicoVista',
'tnSubNiveles'=> 'N');
// Call RemoteFunction ()
try {
$info = $soapClient->ObtenerIndicadoresEconomicosXML($ap_param);
echo $info->ObtenerIndicadoresEconomicosXMLResult;
} catch (SoapFault $fault) {
echo $fault;
}