Не удается& #39;не запустить веб-службу Perl с помощью WSDL ::Генератор

. Две недели я пытался создать веб-сервис на Perl (с помощьюWSDL::Generator)и вызвать его с помощью клиента, написанного на Перл.

Теперь я пробую примеры, поставляемые с библиотекой, специализирующейся на WSDL :Soap::Lite , но получаю сообщение об ошибке, которое продолжает появляться

404 file not found at c.PL at line 7.

Можете ли вы помочь мне решить ее?

Вот мой код:

WorldFunctions.pm(C :\Perl\SOAP -Lite\WorldFunctions.pm):класс

package WorldFunctions;
    sub new { bless {}, shift; }
    sub Hello { my ($s, $name) = @_;
            return 'Hello, '. $name. "\n";
    }
    sub GoodBye { my ($s, $name) = @_;
            return 'Goodbye, '. $name. "\n";
    }

a.pl(C :\Perl\SOAP -Lite\a.pl ):для создания WSDL-файла класса WorldFunctions.pm

#!/usr/bin/perl
use WSDL::Generator;
my $init = {
        'schema_namesp' => 'http://localhost/world/WorldFunctions.xsd',
        'services'      => 'WorldFunctions',
        'service_name'  => 'WorldFunctions',
        'target_namesp' => 'http://localhost/world',
        'documentation' => 'Simple Hello World SOAP Service.',
        'location'      => 'http://localhost/world'
};
my $w = WSDL::Generator->new($init);
WorldFunctions->Hello('Joe');
WorldFunctions->GoodBye('Joe');
print $w->get(WorldFunctions); # Returns the WSDL code for a specific class
open(TOTO,"a.wsdl");
print TOTO $w->get(WorldFunctions);
close(TOTO);

c.pl(C :\Perl\SOAP -Lite\c.pl ):perl client WSDL-файл

#!/usr/bin/perl 
use DBI();
use CGI;
use SOAP::Lite;
my $service = SOAP::Lite-> service('file:a.wsdl');   
print "test retour : |".$service-> Hello('Joe')."|";

Зная, что я использую локальный сервер (с WAMP-сервером ), и я скопировал в свой каталог WorldFunctions.pm localhost/world.

Вот файл WSDL:



    
        
            
            
            
            
        
    
    
        
    
    
        
    
    
        
    
    
        
    
    
        
            
            
        
        
            
            
        
    
    
        
            
                
                
                    
                
                
                    
                
            
            
                
                
                    
                
                
                    
                
            
    
    
        
            Simple Hello World SOAP Service.
        
        
            
        
    

16
задан RobEarl 4 July 2013 в 14:28
поделиться