Devo invocare un WebService .NET da Perl; ho trovato in giro il seguente codice:
Codice PHP:
my $soap = SOAP::WSDL->new();
$soap->wsdl('http://server/path/to.wsdl');
$soap->on_action(sub { return $_[0].$_[1]; }); # I find this helps with .NET services.
$soap->proxy('http://server/path/to/service.asmx'); # For speed: not necessary as SOAP::WSDL can find it in the WSDL.
$soap->wsdlinit(caching => 1);
my $som = $soap->HelloWorld();
Ovviamente ho sostituito i percorsi di esempio con quelli giusti. Nel mio WebService c'è una funzione "HelloWorld" che non richiede parametri, ma quando lo script in Perl arriva a chiamarla mi viene stampato il seguente messaggio:
Can't locate object method "HelloWorld" via package "SOAP::WSDL" at ws.pl line 18
Chi sa dirmi come risolvere?