2011-05-04 29 views
0

當我使用升級版本的Perl(ofcourse,也升級版本的soap :: lite) 所以我成功地連接到我的服務器與所有需要的方法。 當我移動使用舊的perl版本(ofcourse,也是早期版本的soap :: lite),所以信封的創建方式不同,並且我沒有成功調用服務器方法,這些方法得到了參數 。 是否需要更改代碼或僅在模塊中的內容? 如果可以通過代碼進行更改,那麼我需要更改哪些內容。現在我的代碼看起來像:通過舊Perl版本的網絡服務

my $ws_url = '$url'; 
my $ws_uri = '$uri'; 
my $ws_xmlns = '$xmlns';    

eval 
{ 
        my $soap = SOAP::Lite 
        -> uri($ws_uri) 
        -> on_action(sub{sprintf '%s', @_}) 
        -> proxy($ws_url,timeout => 15); 

       my @params = (SOAP::Data->name(Add => "$paramAdd")); 
       $response = $soap->EndUnit(@params); 

        if($response->fault) 
        { 
         # die raises an exception 
         print "=======fault happened=====\n"; 
         die $response->faultstring; 
        } 
        else 
        { 
         print $response->result; 
         print "\n"; 
        } 
         }; 
         if ([email protected]) 
         { 
          print "[email protected]\n"; 
          print "Failed \n"; 
         }; 

非常感謝您的幫助! 諾亞:-)

回答

0

看一看SOAP版本之間的變化::精簡版使用的是:Changes

此外,您shold列出的Perl的是什麼版本和SOAP ::你所談論的精簡版..