2011-05-07 22 views
0

我是新來的AppleScript,但我跟着這個方便的教程,第一個谷歌的結果爲「AppleScript的web服務」:http://developer.apple.com/internet/applescript/applescripttoperl.html的AppleScript和SOAP:傳輸錯誤

因此,我已(希望)一個Perl腳本給我一個Web服務在http://localhost:8001

但是當我運行

set p to {"http://www.perl.com/pace/perlnews.rdf", "http://www.perl.com/pace/perlnews.rdf"} 
using terms from application "http://www.apple.com/placebo" 
    tell application "http://localhost:8001" to return call soap {method name:"fetch_headlines", method namespace uri:"http://localhost:8001", SOAPAction:("http://localhost:8001" & "#" & "fetch_headlines"), parameters:p} 
end using terms from 

我得到 「得到了一個錯誤:傳輸錯誤」


谷歌正在失敗我。任何想法在哪裏看?

回答

1

傳輸錯誤意味着通信端點不響應。你忘了啓動perl soap-server腳本(用於監聽端口8001)?

,你開始你的Perl SOAP服務器後,您的AppleScript SOAP客戶端代碼應該是

set p to "http://search.cpan.org/uploads.rdf" 
using terms from application "http://www.apple.com/placebo" 
    tell application "http://localhost:8001/Server" to return call soap {method name:"fetch_headlines", method namespace uri:"http://localhost:8001/Server", SOAPAction:("http://localhost:8001/Server" & "#" & "fetch_headlines"), parameters:{uri:p}} 
end using terms from 

PS:http://www.perl.com/pace/perlnews.rdf不存在...