我是Applescript的新手,但我按照这个方便的教程,第一个Google结果" Applescript webservice":http://developer.apple.com/internet/applescript/applescripttoperl.html
所以我(希望)有一个perl脚本在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
我明白了 "出错:运输错误"
答案 0 :(得分: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不存在......