1 2 3 4 5 6 7 8 9 10 11 12 13
use strict; use warnings; use Data::Dumper; use SOAP::Lite; my $client = SOAP::Lite ->new() ->soapversion('1.2') ->service('http://www.OpenLigaDB.de/Webservices/Sportsdata.asmx?WSDL') ; my $sports = Dumper($client->GetAvailLeagues()); print $sports;
my $sports = Dumper($client->GetAvailLeaguesBySports(1));
2012-04-09T07:06:47 ArthurDentDas allerdings funktioniert nicht. Eventuell habe ich hier auch einfach etwas noch nicht ganz verstanden. Jemand Ideen?
1
2
3
4
5
6
7
8
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelopexmlns:soap="http://rg/2003/05/soap-envelope"xmlns:xsi="http://www.w3.org/2001/XMLSchema-inxmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetAvailLeaguesResponse xmlns="http://msiggi.de/Sportsdata/Webservices">
<GetAvailLeaguesResult />
</GetAvailLeaguesBySportsResponse>
</soap:Body>
</soap:Envelope>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
binmode STDOUT; use strict; use warnings; use IO::Socket; my $data = do{ local $/ = undef, <DATA>}; my $length = length $data; my $host = "www.openligadb.de"; my $sock = IO::Socket::INET->new("$host:80") or die $@; print $sock <<EOT; POST /Webservices/Sportsdata.asmx HTTP/1.0 Host: $host Content-Type: text/xml; charset=utf-8 Content-Length: $length SOAPAction: "http://msiggi.de/Sportsdata/Webservices/GetAvailLeagues" $data EOT while( read($sock, my $buffer, 123) ){ print $buffer; } __DATA__ <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <GetAvailLeagues xmlns="http://msiggi.de/Sportsdata/Webservices" /> </soap:Body> </soap:Envelope>