Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/12/2016, 12:43
Avatar de ras_chalo
ras_chalo
 
Fecha de Ingreso: junio-2010
Mensajes: 369
Antigüedad: 13 años, 10 meses
Puntos: 6
Pregunta Error: Operation '' is not defined in the WSDL for this service

Hola a todos,
estoy construyendo mi web services de prueba con php y ya lo tengo operativo, pero al momento de consumirlo me esta apareciendo el siguiente mensaje de error:

Operation '' is not defined in the WSDL for this service

He estado leyendo en internet, pero me da la impresión que puede ser por la línea de código: $HTTP_RAW_POST_DATA : ''

Les presento mi código del web services:

Código PHP:
<?php

include_once 'lib/nusoap.php';
$servicio = new soap_server();

$ns "urn:miserviciowsdl";
$servicio->configureWSDL("NombredelServicioWeb",$ns);
$servicio->schemaTargetNamespace $ns;

//$servicio->register("NombreFuncion", array('param1' => 'xsd:integer', 'param2' => 'xsd:integer'), array('return' => 'xsd:string'), $ns );
$servicio->register("NombreFuncion", array('param1' => 'xsd:string''param2' => 'xsd:string'), array('return' => 'xsd:string'), $ns );

function 
NombreFuncion($param1,$param2)
{
    
//$resultadoSuma = $param1 + $param2 ;
    
$resultado "El resultado es " .$param1 " + " $param2 ;// . " es: " . $resultadoSuma;
    
return $resultado;
}

$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA '';
$servicio->service($HTTP_RAW_POST_DATA);
   
?>

y aquí el cliente que consume dicho servicio:
Código PHP:
<html>
<
head>
<
title>Cliente Informatica PowerCenter</title>
</
head>
<
body>
 
<
h3>Cliente Informatica PowerCenter</h3>
 
<
form action="http://localhost/ws/servicio_g.php/NombreFuncion" method="post">
  
Escribe dos numeros: <br/>
  <
input type="number" name="param1" /> 
  <
br/>
  <
input type="number" name="param2" /> 
  <
br/>
  <
input type="submit" value="Enviar" />
</
form>  
 
</
body>
</
html

me he entrampado con esto, por lo que el ejercicio esta siendo bien simple para no tener problemas, aunque igual los pillé jaja
estaré atento a sus comentarios!
saludos!!