Ver Mensaje Individual
  #1 (permalink)  
Antiguo 13/09/2010, 12:45
gabrodru
 
Fecha de Ingreso: marzo-2010
Mensajes: 25
Antigüedad: 14 años, 10 meses
Puntos: 0
Problema nusoap

Hola a todos,

Tengo dos archivos

servicioweb.php

Código HTML:
<?php
require_once('lib/nusoap.php');

$server = new soap_server;

$ns="http://192.168.23.203:8888/soap/"; // espacio de nombres; Sitio donde estara alojado el web service
$server->configureWSDL('CanadaTaxCalculator',$ns); //nombre del web service
$server->wsdl->schematargetnamespace=$ns;
$server->register('CalculateOntarioTax',array('amount' => 'xsd:string' ),array('return' => 'xsd:string'),$ns);

/*METODO DEL WEB SERVICE*/
function CalculateOntarioTax($amount){
	
				$taxcalc=$amount*0.15;
				return new SoapVar('return','xsd:string',$taxcalc);
	
}



/******PROCESA LA SOLICITUD Y DEVUELVE LA RESPUESTA*******/

$server->service($HTTP_RAW_POST_DATA);

?>
y cliente.php


Código HTML:
<?php
require_once('lib/nusoap.php');
$wsdl="http://192.168.23.203:8888/soap/servicioweb.php?wsdl";
$client= new nusoap_client($wsdl,"wsdl");
$param=array("amount"=>'1');
$responde=$client->call('CalculateOntarioTax',$param);
echo"<pre>";
print_r($responde);
echo"</pre>";
?>
No se que hago mal pero no me devuelve nada.

Si alguien me puede ayudar.

Un saludo.

Última edición por gabrodru; 13/09/2010 a las 12:53