Ver Mensaje Individual
  #2 (permalink)  
Antiguo 01/12/2005, 11:31
Avatar de stone_neo
stone_neo
 
Fecha de Ingreso: abril-2004
Ubicación: Peru
Mensajes: 438
Antigüedad: 20 años, 1 mes
Puntos: 15
Pues mira este pequeño codigo que crea un servicio web que llamaremos servicioweb.php:

Código:
<?
require_once("nusoap.php");
$ns="http://localhost/nusoap";
$server = new soap_server();
$server->configureWSDL('CanadaTaxCalculator',$ns);
$server->wsdl->schemaTargetNamespace=$ns;
$server->register('CalculateOntarioTax',array('amount' => 'xsd:string'),array('return' => 'xsd:string'),$ns);
function CalculateOntarioTax($amount){
$taxcalc=$amount*.15;
return new soapval('return','string',$taxcalc);
}
$server->service($HTTP_RAW_POST_DATA);
?>
ahora para llamar al archivo wsdl solo tienes que entrar a tu navegador y escribir :

http://www.tuhost.com/servicioweb.php?wsdl

este url es el que tienes que pasarle como ruta del archivo wsdl. Si quieres mas informacion te doy este link :

http://www.xml.com/pub/a/ws/2004/03/24/phpws.html
__________________
Rubén Darío Huamaní Ucharima
Web : http://www.gorilla-soft.com
Usuario Linux #382 100 :-)