Dabrowski

msg:3314820 | 5:05 pm on Apr 18, 2007 (gmt 0) |
I was actually messing with this today, Yahoo have an SDK that includes PERL that does exactly that, queries using REST and returns XML. Wasn't Yahoo you were doing was it? It's on [developer.yahoo.com...] somewhere but the site seems to be down at the moment.
|
rocknbil

msg:3315024 | 7:20 pm on Apr 18, 2007 (gmt 0) |
Many don't like it because it's slow (although most of my requests are semi-instantaneous,) but I've never had any problem with XML::Simple. Easy to install too, doesn't need to be cpann'ed (but that's best.)
|
phranque

msg:3315590 | 10:48 am on Apr 19, 2007 (gmt 0) |
if you are asking about how to HTTP GET the document in a perl way you could use something like: use LWP::UserAgent; use HTTP::Request; my $agent = LWP::UserAgent->new(env_proxy => 1,keep_alive => 1, timeout => 30); my $url = "http://www.theCallingSiteUrl.com/webservice?param1=t1¶m2=t2"; my $header = HTTP::Request->new(GET => $url); my $request = HTTP::Request->new('GET', $url, $header); my $response = $agent->request($request); if ($response->is_success){ [do something with] $response->content; } |
|
|
spikey

msg:3315715 | 1:53 pm on Apr 19, 2007 (gmt 0) |
I use XML::Simple most of the time but often need XML::Writer to get some complex structures into the right format. SOAP::Lite is also quite useful for WSDL. You can convert a chunk of XML into a data structure (of hashes & arrays) using: my $data = XMLin($xml);
|
Dabrowski

msg:3315735 | 2:10 pm on Apr 19, 2007 (gmt 0) |
Thanks for the heads up spikey, I'll check that one out for my project.
|
agentalpha

msg:3315861 | 3:47 pm on Apr 19, 2007 (gmt 0) |
Using the HTTP::Request / LWP::UserAgent to make the call and then XML::Simple to process it seems to work pretty well. Thanks for the help!
|
|