1
這裏http://code.google.com/p/delcampe-api-client/wiki/Info#Perl是Perl中delcampe-api-client的代碼示例。很顯然,有一個語法錯誤,運行我得到了代碼:Perl:如何解決SOAP :: Lite delcampe-api-client的例子?
syntax error at test.pl line 9, near "-> service"
Bareword "SOAP::Lite" not allowed while "strict subs" in use at test.pl line 8.
Execution of test.pl aborted due to compilation errors.
如果我改變代碼點點對我來說更有意義,就像這樣:
#!/usr/bin/perl
use SOAP::Lite;
use SOAP::WSDL;
use strict;
use warnings;
my $service = new SOAP::Lite;
print $service
->uri('http://api.delcampe.net/soap.php?wsdl')
->getServerTime()
->result;
我:
A service address has not been specified either by using SOAP::Lite->proxy() or a service description)
這段代碼有什麼問題?什麼代理?服務說明?
[如果您認爲我沒有使用SOAP的經驗,那您肯定是對的。不過,如何讓這個小例子起作用。 PHP示例很好地工作,但不是Perl的。 ]
也許它應該,但它不。你可以指點我的文檔你的意思。 – 2012-02-01 17:08:47
查看我的編輯,高於 – 2012-02-01 18:03:12
從腳本中丟棄SOAP :: WSDL,這是處理WSDL的示例似乎不是一種解決方案;( – 2012-02-01 22:06:55