Hola buenas. Estoy tratando de hacer funcionar este ejemplo de SOAP::Lite pero me está dando un error cuando ejecuto el cliente. Me fijé en el cuadrante de versiones y la versión del módulo funciona con la del Perl que tengo instalada...
Si alguno sabe o le pasó lo mismo se lo agradeceré…
Esquema instalado:
Perl v5.12.3
Soap::lite v0.712 (el ppm muestra como que está bien instalado)
Error del cliente:
C:\Documents and Settings\admin>perl c:\cliente.pl
Can't locate Class/Inspector.pm in @INC (@INC contains: C:/Perl/site/lib C:/Perl
/lib .) at C:/Perl/site/lib/SOAP/Lite.pm line 435.
BEGIN failed--compilation aborted at C:/Perl/site/lib/SOAP/Lite.pm line 435.
Compilation failed in require at c:\cliente.pl line 1.
BEGIN failed--compilation aborted at c:\cliente.pl line 1.
Servidor.pl:
use SOAP::Transport::HTTP;
SOAP::Transport::HTTP::CGI
-> dispatch_to('Servidor')
-> handle;
package Servidor;
sub temperatura {
return "La temperatura actual es de 23 grados";
}
Cliente.pl:
use SOAP::Lite;
print "Se llama al servicio.\n";
my $respuesta = SOAP::Lite
-> uri('http://192.168.0.16:80/servidor')
-> proxy('http://192.168.0.16:80/servidor.pl')
-> temperatura
-> result;
print "La respuesta del servidor es: $respuesta \n"
Detalle de la instalación del módulo SOAP:
Installed files:
C:/Perl/html/bin/SOAPsh.html
C:/Perl/html/bin/XMLRPCsh.html
C:/Perl/html/bin/stubmaker.html
C:/Perl/html/site/lib/Apache/SOAP.html
C:/Perl/html/site/lib/Apache/XMLRPC/Lite.html
C:/Perl/html/site/lib/SOAP/Client.html
C:/Perl/html/site/lib/SOAP/Constants.html
C:/Perl/html/site/lib/SOAP/Data.html
C:/Perl/html/site/lib/SOAP/Deserializer.html
C:/Perl/html/site/lib/SOAP/Fault.html
C:/Perl/html/site/lib/SOAP/Header.html
C:/Perl/html/site/lib/SOAP/Lite.html
C:/Perl/html/site/lib/SOAP/Lite/Packager.html
C:/Perl/html/site/lib/SOAP/Packager.html
C:/Perl/html/site/lib/SOAP/SOM.html
C:/Perl/html/site/lib/SOAP/Schema.html
C:/Perl/html/site/lib/SOAP/Serializer.html
C:/Perl/html/site/lib/SOAP/Server.html
C:/Perl/html/site/lib/SOAP/Test.html
C:/Perl/html/site/lib/SOAP/Trace.html
C:/Perl/html/site/lib/SOAP/Transport.html
C:/Perl/html/site/lib/SOAP/Transport/LOOPBACK.html
C:/Perl/html/site/lib/SOAP/Transport/POP3.html
C:/Perl/html/site/lib/SOAP/Utils.html
C:/Perl/html/site/lib/UDDI/Lite.html
C:/Perl/html/site/lib/XML/Parser/Lite.html
C:/Perl/html/site/lib/XMLRPC/Lite.html
C:/Perl/html/site/lib/XMLRPC/Test.html
C:/Perl/html/site/lib/XMLRPC/Transport/HTTP.html
C:/Perl/html/site/lib/XMLRPC/Transport/POP3.html
C:/Perl/html/site/lib/XMLRPC/Transport/TCP.html
C:/Perl/site/bin/SOAPsh.bat
C:/Perl/site/bin/SOAPsh.pl
C:/Perl/site/bin/XMLRPCsh.bat
C:/Perl/site/bin/XMLRPCsh.pl
C:/Perl/site/bin/stubmaker.bat
C:/Perl/site/bin/stubmaker.pl
C:/Perl/site/lib/Apache/SOAP.pm
C:/Perl/site/lib/Apache/XMLRPC/Lite.pm
C:/Perl/site/lib/IO/SessionData.pm
C:/Perl/site/lib/IO/SessionSet.pm
C:/Perl/site/lib/SOAP/Client.pod
C:/Perl/site/lib/SOAP/Constants.pm
C:/Perl/site/lib/SOAP/Data.pod
C:/Perl/site/lib/SOAP/Deserializer.pod
C:/Perl/site/lib/SOAP/Fault.pod
C:/Perl/site/lib/SOAP/Header.pod
C:/Perl/site/lib/SOAP/Lite.pm
C:/Perl/site/lib/SOAP/Lite/Deserializer/XMLSchema1999.pm
C:/Perl/site/lib/SOAP/Lite/Deserializer/XMLSchema2001.pm
C:/Perl/site/lib/SOAP/Lite/Deserializer/XMLSchemaSOAP1_1.pm
C:/Perl/site/lib/SOAP/Lite/Deserializer/XMLSchemaSOAP1_2.pm
C:/Perl/site/lib/SOAP/Lite/Packager.pm
C:/Perl/site/lib/SOAP/Lite/Utils.pm
C:/Perl/site/lib/SOAP/Packager.pm
C:/Perl/site/lib/SOAP/SOM.pod
C:/Perl/site/lib/SOAP/Schema.pod
C:/Perl/site/lib/SOAP/Serializer.pod
C:/Perl/site/lib/SOAP/Server.pod
C:/Perl/site/lib/SOAP/Test.pm
C:/Perl/site/lib/SOAP/Trace.pod
C:/Perl/site/lib/SOAP/Transport.pod
C:/Perl/site/lib/SOAP/Transport/HTTP.pm
C:/Perl/site/lib/SOAP/Transport/IO.pm
C:/Perl/site/lib/SOAP/Transport/LOCAL.pm
C:/Perl/site/lib/SOAP/Transport/LOOPBACK.pm
C:/Perl/site/lib/SOAP/Transport/MAILTO.pm
C:/Perl/site/lib/SOAP/Transport/POP3.pm
C:/Perl/site/lib/SOAP/Transport/TCP.pm
C:/Perl/site/lib/SOAP/Utils.pod
C:/Perl/site/lib/UDDI/Lite.pm
C:/Perl/site/lib/XML/Parser/Lite.pm
C:/Perl/site/lib/XMLRPC/Lite.pm
C:/Perl/site/lib/XMLRPC/Test.pm
C:/Perl/site/lib/XMLRPC/Transport/HTTP.pm
C:/Perl/site/lib/XMLRPC/Transport/POP3.pm
C:/Perl/site/lib/XMLRPC/Transport/TCP.pm
C:/Perl/site/lib/auto/SOAP/Lite/.packlist