Applescript and SOAP: Transport Error
I'm new to Applescript, but I followed this handy tutorial, the first 开发者_运维技巧Google result for "Applescript webservice": http://developer.apple.com/internet/applescript/applescripttoperl.html
So I have (hopefully) a perl script giving me a webservice at http://localhost:8001
but when I run
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
I get "got an error: Transport error"
Google is failing me. Any ideas where to look?
Transport error mean that the communication endpoint does not respond. Do you forget start the perl soap-server script (for listening at port 8001)?
And after you start your perl SOAP server, your applescript SOAP-client code should be
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 does not exists...
精彩评论