Skip to content

Instantly share code, notes, and snippets.

@javierwilson
Created March 2, 2012 18:02
Show Gist options
  • Save javierwilson/1960078 to your computer and use it in GitHub Desktop.
Save javierwilson/1960078 to your computer and use it in GitHub Desktop.
ejemplo de consulta soap usando NuSoap
<?php
function consultaServicios($movil, $pass, $url){
require_once('nusoap/nusoap.php');
$cliente = new nusoap_client($url, true);
$err = $cliente->getError();
if($err){
$res = "->".$err;
return $res;
}
$params = array('movil' => $movil, 'pass' => $pass);
$res = $cliente->call('consultaServicios', array($params));
$err = $cliente->getError();
if($err){
$res = "->".$err;
return $res;
}
return $res;
}
$url = "http://examplo.com/?wsdl";
$clave = '*********';
$phone = '55555555';
print_r(consultaServicios($phone, $clave, $url));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment