Ver Mensaje Individual
  #4 (permalink)  
Antiguo 21/03/2007, 16:42
luz506
 
Fecha de Ingreso: junio-2006
Ubicación: Lima, mi trabajo
Mensajes: 100
Antigüedad: 17 años, 11 meses
Puntos: 0
Re: php , xml, soap

cuando tenga mis parametros en array, podre enviarlo mediante:
$client->call(nombre_funcion_en_el_servidor, array_de_parametros)
solo que no logro obtener el array de un archivo xml, quiero usar el domxml pero solo esta habiltada para la version 4 de php, es con la que cuento, pero proximamente se hara la migracion y ya probe y en php5 no funciona, asi que estoy buscando un parser para ambas versiones de php, si saben de algun parser, si estuviera integrado en php mucho mejor, agradeceria me lo digan

el siguiente codigo fue sacado de
http://developer.apple.com/internet/...s/soapphp.html
Código PHP:
// include the SOAP classes
require_once('nusoap.php');
// define parameter array (ISBN number)
$param = array('isbn'=>'0385503954');
// define path to server application
$serverpath ='http://services.xmethods.net:80/soap/servlet/rpcrouter';
//define method namespace
$namespace="urn:xmethods-BNPriceCheck";
// create client object
$client = new soapclient($serverpath);
// make the call
$price $client->call('getPrice',$param,$namespace);
// if a fault occurred, output error info
if (isset($fault)) {
        print 
"Error: "$fault;
        }
else if (
$price == -1) {
        print 
"The book is not in the database.";
} else {
        
// otherwise output the result
        
print "The price of book number "$param[isbn] ." is $"$price;
        }
// kill object
unset($client);