J’ai résolu le problème : l’erreur était qu’il faut déclarer ‘uri’ dans le tableau $option.

Voici un exemple complet :

Script.php
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
$options = array(
    'location' => 'http://127.0.0.1/cgi-bin/hibye.cgi',
    'uri' => 'http://127.0.0.1/Demo'   // ou bien  uri('urn:Demo') 
);  
try { 
	$soapclt = new SoapClient(null, $options);    
	var_dump($soapclt->__getFunctions());
	$res = $soapclt->GoodBye("w");   
	echo $res;  
	} catch (SoapFault $fault) {
	trigger_error("ERREUR WS-CLIENT A.PHP (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})", E_USER_ERROR);
	}
hibye.cgi :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!"C:\Perl\bin\perl.exe"
use SOAP::Transport::HTTP;
SOAP::Transport::HTTP::CGI   
    -> dispatch_to('Demo')     
    -> handle;
package Demo;
  sub hi {                     
			return "hello, worldsdsdsdsd";     
		}
  sub bye {                    
			return "goodbye, cruel world";
		}
   sub GoodBye { my ($name) = @_;
            return 'Goodbye, ' . $name . "\n";
			}
	sub f {
   my ($x,$z) = @_;      
    my $m = $x*$z;
   return $m;     
  }
Merci de votre aide !