AGB  ·  Impressum  







Anmelden
Nützliche Links
Registrieren

Openligadb.de

Ein Thema von MATASTYLE · begonnen am 22. Jul 2010 · letzter Beitrag vom 23. Jul 2010
Antwort Antwort
MATASTYLE

Registriert seit: 20. Jul 2010
3 Beiträge
 
Delphi 2 Desktop
 
#1

Openligadb.de

  Alt 22. Jul 2010, 12:44
Hallo zusammen,

Ich bin blutiger anfänger, würde aber gerne die bundesliga spieltage von der seite openligadb.de über ein button click ausgeben, hab aber irgendwie nicht die leiseste ahnung wie ich das anstellen soll.

Bitte um hilfe!!!!
  Mit Zitat antworten Zitat
Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
21.773 Beiträge
 
Delphi XE2 Professional
 
#2

AW: Openligadb.de

  Alt 22. Jul 2010, 13:04
Diese Seite stellt alles nötige als XML-Dateien zur Verfügung.

* du lädst also die gewünschte Datei runter
> Stichwort Hier im Forum suchenIndy ... gibt bestimmt einige Komponenten in deinem Delphi, welche mit TId... anfangen (für sowas wäre es gut, wenn du die verwende DelphiVersion/Programmiersprache auch nennen würdest oder sie in dein DP-Profil einträgst)
* dieses kannst du z.B. in einen Stream oder einen String laden lassen
* diesen String/Stream übergibst du an einen XML-Parser (z.B. siehe Hier im Forum suchenTXMLDocument)
* und über dieses bekommst du Zugriff auf die einzelnen Daten/Einträge und kannst sie so auslesen und dann anzeigen.

(wie die Schnittstellen gestalltet sind, also was man senden muß um etwas zu bekommen, steht auf deren Webseite beschrieben)




Du kannst das Ganze aber auch direkt als Hier im Forum suchenWebservice importieren und darüber drauf zugreifen.
aktuell: ThreadList<T> / eine kleine Delphi-Statistik
Mathe: Starter < halbes Delphi

Geändert von himitsu (22. Jul 2010 um 13:08 Uhr)
  Mit Zitat antworten Zitat
MATASTYLE

Registriert seit: 20. Jul 2010
3 Beiträge
 
Delphi 2 Desktop
 
#3

AW: Openligadb.de

  Alt 22. Jul 2010, 13:26
Nutze delphi 2007

Hab jetzt die sportsdata.pas erstellt,weiss aber jetzt nicht was ich mit dieser machen muss!

Delphi-Quellcode:
// ************************************************************************ //
// Die in dieser Datei deklarierten Typen wurden aus Daten generiert, die aus
// unten beschriebener WSDL-Datei stammen:
// WSDL : http://www.openligadb.de/Webservices/Sportsdata.asmx?WSDL

// >Importieren : http://www.openligadb.de/Webservices/Sportsdata.asmx?WSDL:0// Codierung : utf-8// Version : 1.0// (22.7.2010 13:24:47 - - $Rev: 10138 $)
// ************************************************************************ //

unit Sportsdata;

interface

uses InvokeRegistry, SOAPHTTPClient, Types, XSBuiltIns;

const
  IS_OPTN = $0001;
  IS_UNBD = $0002;
  IS_NLBL = $0004;
  IS_REF = $0080;


type

  // ************************************************************************ //
  // Die folgenden Typen, auf die im WSDL-Dokument Bezug genommen wird, sind in dieser Datei
  // nicht repräsentiert. Sie sind entweder Aliase(@) anderer repräsentierter Typen oder auf sie wurde Bezug genommen,
  // aber in diesem Dokument nicht deklariert (!). Die Typen aus letzterer Kategorie
  // sind normalerweise mit vordefinierten/bekannten XML- oder Borland-Typen verbunden; sie könnten aber auch ein Anzeichen
  // für ein falsches WSDL-Dokument sein, das einen Schema-Typ nicht deklariert oder importiert.. // ************************************************************************ //
  // !:int - "http://www.w3.org/2001/XMLSchema"[Gbl]
  // !:string - "http://www.w3.org/2001/XMLSchema"[Gbl]
  // !:dateTime - "http://www.w3.org/2001/XMLSchema"[Gbl]
  // !:boolean - "http://www.w3.org/2001/XMLSchema"[Gbl]

  League = class; { "http://msiggi.de/Sportsdata/Webservices"[GblCplx] }
  Matchdata = class; { "http://msiggi.de/Sportsdata/Webservices"[GblCplx] }
  Location = class; { "http://msiggi.de/Sportsdata/Webservices"[GblCplx] }
  matchResult = class; { "http://msiggi.de/Sportsdata/Webservices"[GblCplx] }
  Goal = class; { "http://msiggi.de/Sportsdata/Webservices"[GblCplx] }
  Fussballdaten = class; { "http://msiggi.de/Sportsdata/Webservices"[GblCplx] }
  Team = class; { "http://msiggi.de/Sportsdata/Webservices"[GblCplx] }
  Group = class; { "http://msiggi.de/Sportsdata/Webservices"[GblCplx] }
  Sport = class; { "http://msiggi.de/Sportsdata/Webservices"[GblCplx] }
  GoalGetter = class; { "http://msiggi.de/Sportsdata/Webservices"[GblCplx] }

  ArrayOfLeague = array of League; { "http://msiggi.de/Sportsdata/Webservices"[GblCplx] }


  // ************************************************************************ //
  // XML : League, global, <complexType>
  // Namespace : http://msiggi.de/Sportsdata/Webservices
  // ************************************************************************ //
  League = class(TRemotable)
  private
    FleagueID: Integer;
    FleagueSportID: Integer;
    FleagueName: WideString;
    FleagueName_Specified: boolean;
    FleagueShortcut: WideString;
    FleagueShortcut_Specified: boolean;
    FleagueSaison: WideString;
    FleagueSaison_Specified: boolean;
    procedure SetleagueName(Index: Integer; const AWideString: WideString);
    function leagueName_Specified(Index: Integer): boolean;
    procedure SetleagueShortcut(Index: Integer; const AWideString: WideString);
    function leagueShortcut_Specified(Index: Integer): boolean;
    procedure SetleagueSaison(Index: Integer; const AWideString: WideString);
    function leagueSaison_Specified(Index: Integer): boolean;
  published
    property leagueID: Integer read FleagueID write FleagueID;
    property leagueSportID: Integer read FleagueSportID write FleagueSportID;
    property leagueName: WideString Index (IS_OPTN) read FleagueName write SetleagueName stored leagueName_Specified;
    property leagueShortcut: WideString Index (IS_OPTN) read FleagueShortcut write SetleagueShortcut stored leagueShortcut_Specified;
    property leagueSaison: WideString Index (IS_OPTN) read FleagueSaison write SetleagueSaison stored leagueSaison_Specified;
  end;

  ArrayOfMatchResult = array of matchResult; { "http://msiggi.de/Sportsdata/Webservices"[GblCplx] }
  ArrayOfGoal = array of Goal; { "http://msiggi.de/Sportsdata/Webservices"[GblCplx] }


  // ************************************************************************ //
  // XML : Matchdata, global, <complexType>
  // Namespace : http://msiggi.de/Sportsdata/Webservices
  // ************************************************************************ //
  Matchdata = class(TRemotable)
  private
    FmatchID: Integer;
    FmatchDateTime: TXSDateTime;
    FTimeZoneID: WideString;
    FTimeZoneID_Specified: boolean;
    FmatchDateTimeUTC: TXSDateTime;
    FgroupID: Integer;
    FgroupOrderID: Integer;
    FgroupName: WideString;
    FgroupName_Specified: boolean;
    FleagueID: Integer;
    FleagueName: WideString;
    FleagueName_Specified: boolean;
    FleagueSaison: WideString;
    FleagueSaison_Specified: boolean;
    FnameTeam1: WideString;
    FnameTeam1_Specified: boolean;
    FnameTeam2: WideString;
    FnameTeam2_Specified: boolean;
    FidTeam1: Integer;
    FidTeam2: Integer;
    FiconUrlTeam1: WideString;
    FiconUrlTeam1_Specified: boolean;
    FiconUrlTeam2: WideString;
    FiconUrlTeam2_Specified: boolean;
    FpointsTeam1: Integer;
    FpointsTeam2: Integer;
    FlastUpdate: TXSDateTime;
    FmatchIsFinished: Boolean;
    FmatchResults: ArrayOfMatchResult;
    FmatchResults_Specified: boolean;
    Fgoals: ArrayOfGoal;
    Fgoals_Specified: boolean;
    Flocation: Location;
    FNumberOfViewers: Integer;
    procedure SetTimeZoneID(Index: Integer; const AWideString: WideString);
    function TimeZoneID_Specified(Index: Integer): boolean;
    procedure SetgroupName(Index: Integer; const AWideString: WideString);
    function groupName_Specified(Index: Integer): boolean;
    procedure SetleagueName(Index: Integer; const AWideString: WideString);
    function leagueName_Specified(Index: Integer): boolean;
    procedure SetleagueSaison(Index: Integer; const AWideString: WideString);
    function leagueSaison_Specified(Index: Integer): boolean;
    procedure SetnameTeam1(Index: Integer; const AWideString: WideString);
    function nameTeam1_Specified(Index: Integer): boolean;
    procedure SetnameTeam2(Index: Integer; const AWideString: WideString);
    function nameTeam2_Specified(Index: Integer): boolean;
    procedure SeticonUrlTeam1(Index: Integer; const AWideString: WideString);
    function iconUrlTeam1_Specified(Index: Integer): boolean;
    procedure SeticonUrlTeam2(Index: Integer; const AWideString: WideString);
    function iconUrlTeam2_Specified(Index: Integer): boolean;
    procedure SetmatchResults(Index: Integer; const AArrayOfMatchResult: ArrayOfMatchResult);
    function matchResults_Specified(Index: Integer): boolean;
    procedure Setgoals(Index: Integer; const AArrayOfGoal: ArrayOfGoal);
    function goals_Specified(Index: Integer): boolean;
  public
    destructor Destroy; override;
  published
    property matchID: Integer read FmatchID write FmatchID;
    property matchDateTime: TXSDateTime read FmatchDateTime write FmatchDateTime;
    property TimeZoneID: WideString Index (IS_OPTN) read FTimeZoneID write SetTimeZoneID stored TimeZoneID_Specified;
    property matchDateTimeUTC: TXSDateTime read FmatchDateTimeUTC write FmatchDateTimeUTC;
    property groupID: Integer read FgroupID write FgroupID;
    property groupOrderID: Integer read FgroupOrderID write FgroupOrderID;
    property groupName: WideString Index (IS_OPTN) read FgroupName write SetgroupName stored groupName_Specified;
    property leagueID: Integer read FleagueID write FleagueID;
    property leagueName: WideString Index (IS_OPTN) read FleagueName write SetleagueName stored leagueName_Specified;
    property leagueSaison: WideString Index (IS_OPTN) read FleagueSaison write SetleagueSaison stored leagueSaison_Specified;
    property nameTeam1: WideString Index (IS_OPTN) read FnameTeam1 write SetnameTeam1 stored nameTeam1_Specified;
    property nameTeam2: WideString Index (IS_OPTN) read FnameTeam2 write SetnameTeam2 stored nameTeam2_Specified;
    property idTeam1: Integer read FidTeam1 write FidTeam1;
    property idTeam2: Integer read FidTeam2 write FidTeam2;
    property iconUrlTeam1: WideString Index (IS_OPTN) read FiconUrlTeam1 write SeticonUrlTeam1 stored iconUrlTeam1_Specified;
    property iconUrlTeam2: WideString Index (IS_OPTN) read FiconUrlTeam2 write SeticonUrlTeam2 stored iconUrlTeam2_Specified;
    property pointsTeam1: Integer read FpointsTeam1 write FpointsTeam1;
    property pointsTeam2: Integer read FpointsTeam2 write FpointsTeam2;
    property lastUpdate: TXSDateTime read FlastUpdate write FlastUpdate;
    property matchIsFinished: Boolean read FmatchIsFinished write FmatchIsFinished;
    property matchResults: ArrayOfMatchResult Index (IS_OPTN) read FmatchResults write SetmatchResults stored matchResults_Specified;
    property goals: ArrayOfGoal Index (IS_OPTN) read Fgoals write Setgoals stored goals_Specified;
    property location: Location read Flocation write Flocation;
    property NumberOfViewers: Integer Index (IS_NLBL) read FNumberOfViewers write FNumberOfViewers;
  end;



  // ************************************************************************ //
  // XML : Location, global, <complexType>
  // Namespace : http://msiggi.de/Sportsdata/Webservices
  // ************************************************************************ //
  Location = class(TRemotable)
  private
    FlocationID: Integer;
    FlocationCity: WideString;
    FlocationCity_Specified: boolean;
    FlocationStadium: WideString;
    FlocationStadium_Specified: boolean;
    procedure SetlocationCity(Index: Integer; const AWideString: WideString);
    function locationCity_Specified(Index: Integer): boolean;
    procedure SetlocationStadium(Index: Integer; const AWideString: WideString);
    function locationStadium_Specified(Index: Integer): boolean;
  published
    property locationID: Integer read FlocationID write FlocationID;
    property locationCity: WideString Index (IS_OPTN) read FlocationCity write SetlocationCity stored locationCity_Specified;
    property locationStadium: WideString Index (IS_OPTN) read FlocationStadium write SetlocationStadium stored locationStadium_Specified;
  end;



  // ************************************************************************ //
  // XML : matchResult, global, <complexType>
  // Namespace : http://msiggi.de/Sportsdata/Webservices
  // ************************************************************************ //
  matchResult = class(TRemotable)
  private
    FresultName: WideString;
    FresultName_Specified: boolean;
    FpointsTeam1: Integer;
    FpointsTeam2: Integer;
    FresultOrderID: Integer;
    procedure SetresultName(Index: Integer; const AWideString: WideString);
    function resultName_Specified(Index: Integer): boolean;
  published
    property resultName: WideString Index (IS_OPTN) read FresultName write SetresultName stored resultName_Specified;
    property pointsTeam1: Integer read FpointsTeam1 write FpointsTeam1;
    property pointsTeam2: Integer read FpointsTeam2 write FpointsTeam2;
    property resultOrderID: Integer read FresultOrderID write FresultOrderID;
  end;



  // ************************************************************************ //
  // XML : Goal, global, <complexType>
  // Namespace : http://msiggi.de/Sportsdata/Webservices
  // ************************************************************************ //
  Goal = class(TRemotable)
  private
    FgoalID: Integer;
    FgoalMachID: Integer;
    FgoalScoreTeam1: Integer;
    FgoalScoreTeam2: Integer;
    FgoalMatchMinute: Integer;
    FgoalGetterID: Integer;
    FgoalGetterName: WideString;
    FgoalGetterName_Specified: boolean;
    FgoalPenalty: Boolean;
    FgoalOwnGoal: Boolean;
    FgoalOvertime: Boolean;
    FgoalComment: WideString;
    FgoalComment_Specified: boolean;
    procedure SetgoalGetterName(Index: Integer; const AWideString: WideString);
    function goalGetterName_Specified(Index: Integer): boolean;
    procedure SetgoalComment(Index: Integer; const AWideString: WideString);
    function goalComment_Specified(Index: Integer): boolean;
  published
    property goalID: Integer read FgoalID write FgoalID;
    property goalMachID: Integer Index (IS_NLBL) read FgoalMachID write FgoalMachID;
    property goalScoreTeam1: Integer Index (IS_NLBL) read FgoalScoreTeam1 write FgoalScoreTeam1;
    property goalScoreTeam2: Integer Index (IS_NLBL) read FgoalScoreTeam2 write FgoalScoreTeam2;
    property goalMatchMinute: Integer Index (IS_NLBL) read FgoalMatchMinute write FgoalMatchMinute;
    property goalGetterID: Integer read FgoalGetterID write FgoalGetterID;
    property goalGetterName: WideString Index (IS_OPTN) read FgoalGetterName write SetgoalGetterName stored goalGetterName_Specified;
    property goalPenalty: Boolean Index (IS_NLBL) read FgoalPenalty write FgoalPenalty;
    property goalOwnGoal: Boolean Index (IS_NLBL) read FgoalOwnGoal write FgoalOwnGoal;
    property goalOvertime: Boolean Index (IS_NLBL) read FgoalOvertime write FgoalOvertime;
    property goalComment: WideString Index (IS_OPTN) read FgoalComment write SetgoalComment stored goalComment_Specified;
  end;

  ArrayOfMatchdata = array of Matchdata; { "http://msiggi.de/Sportsdata/Webservices"[GblCplx] }
  ArrayOfFussballdaten = array of Fussballdaten; { "http://msiggi.de/Sportsdata/Webservices"[GblCplx] }


  // ************************************************************************ //
  // XML : Fussballdaten, global, <complexType>
  // Namespace : http://msiggi.de/Sportsdata/Webservices
  // ************************************************************************ //
  Fussballdaten = class(TRemotable)
  private
    FSpielID: Integer;
    FSpieltag: Integer;
    FSpieldatum: TXSDateTime;
    FTeam1: WideString;
    FTeam1_Specified: boolean;
    FTeam2: WideString;
    FTeam2_Specified: boolean;
    FErgebnisTeam1: Integer;
    FErgebnisTeam2: Integer;
    FlastUpdate: TXSDateTime;
    procedure SetTeam1(Index: Integer; const AWideString: WideString);
    function Team1_Specified(Index: Integer): boolean;
    procedure SetTeam2(Index: Integer; const AWideString: WideString);
    function Team2_Specified(Index: Integer): boolean;
  public
    destructor Destroy; override;
  published
    property SpielID: Integer read FSpielID write FSpielID;
    property Spieltag: Integer read FSpieltag write FSpieltag;
    property Spieldatum: TXSDateTime read FSpieldatum write FSpieldatum;
    property Team1: WideString Index (IS_OPTN) read FTeam1 write SetTeam1 stored Team1_Specified;
    property Team2: WideString Index (IS_OPTN) read FTeam2 write SetTeam2 stored Team2_Specified;
    property ErgebnisTeam1: Integer read FErgebnisTeam1 write FErgebnisTeam1;
    property ErgebnisTeam2: Integer read FErgebnisTeam2 write FErgebnisTeam2;
    property lastUpdate: TXSDateTime read FlastUpdate write FlastUpdate;
  end;

  ArrayOfTeam = array of Team; { "http://msiggi.de/Sportsdata/Webservices"[GblCplx] }


  // ************************************************************************ //
  // XML : Team, global, <complexType>
  // Namespace : http://msiggi.de/Sportsdata/Webservices
  // ************************************************************************ //
  Team = class(TRemotable)
  private
    FteamID: Integer;
    FteamName: WideString;
    FteamName_Specified: boolean;
    FteamIconURL: WideString;
    FteamIconURL_Specified: boolean;
    procedure SetteamName(Index: Integer; const AWideString: WideString);
    function teamName_Specified(Index: Integer): boolean;
    procedure SetteamIconURL(Index: Integer; const AWideString: WideString);
    function teamIconURL_Specified(Index: Integer): boolean;
  published
    property teamID: Integer read FteamID write FteamID;
    property teamName: WideString Index (IS_OPTN) read FteamName write SetteamName stored teamName_Specified;
    property teamIconURL: WideString Index (IS_OPTN) read FteamIconURL write SetteamIconURL stored teamIconURL_Specified;
  end;

  ArrayOfGroup = array of Group; { "http://msiggi.de/Sportsdata/Webservices"[GblCplx] }


  // ************************************************************************ //
  // XML : Group, global, <complexType>
  // Namespace : http://msiggi.de/Sportsdata/Webservices
  // ************************************************************************ //
  Group = class(TRemotable)
  private
    FgroupName: WideString;
    FgroupName_Specified: boolean;
    FgroupOrderID: Integer;
    FgroupID: Integer;
    procedure SetgroupName(Index: Integer; const AWideString: WideString);
    function groupName_Specified(Index: Integer): boolean;
  published
    property groupName: WideString Index (IS_OPTN) read FgroupName write SetgroupName stored groupName_Specified;
    property groupOrderID: Integer read FgroupOrderID write FgroupOrderID;
    property groupID: Integer read FgroupID write FgroupID;
  end;

  ArrayOfSport = array of Sport; { "http://msiggi.de/Sportsdata/Webservices"[GblCplx] }


  // ************************************************************************ //
  // XML : Sport, global, <complexType>
  // Namespace : http://msiggi.de/Sportsdata/Webservices
  // ************************************************************************ //
  Sport = class(TRemotable)
  private
    FsportsID: Integer;
    FsportsName: WideString;
    FsportsName_Specified: boolean;
    procedure SetsportsName(Index: Integer; const AWideString: WideString);
    function sportsName_Specified(Index: Integer): boolean;
  published
    property sportsID: Integer read FsportsID write FsportsID;
    property sportsName: WideString Index (IS_OPTN) read FsportsName write SetsportsName stored sportsName_Specified;
  end;

  ArrayOfGoalGetter = array of GoalGetter; { "http://msiggi.de/Sportsdata/Webservices"[GblCplx] }


  // ************************************************************************ //
  // XML : GoalGetter, global, <complexType>
  // Namespace : http://msiggi.de/Sportsdata/Webservices
  // ************************************************************************ //
  GoalGetter = class(TRemotable)
  private
    FgoalGetterID: Integer;
    FgoalGetterName: WideString;
    FgoalGetterName_Specified: boolean;
    FgoalGetterNationality: WideString;
    FgoalGetterNationality_Specified: boolean;
    FgoalGetterBirthday: TXSDateTime;
    FgoalGetterGoalCount: Integer;
    procedure SetgoalGetterName(Index: Integer; const AWideString: WideString);
    function goalGetterName_Specified(Index: Integer): boolean;
    procedure SetgoalGetterNationality(Index: Integer; const AWideString: WideString);
    function goalGetterNationality_Specified(Index: Integer): boolean;
  public
    destructor Destroy; override;
  published
    property goalGetterID: Integer read FgoalGetterID write FgoalGetterID;
    property goalGetterName: WideString Index (IS_OPTN) read FgoalGetterName write SetgoalGetterName stored goalGetterName_Specified;
    property goalGetterNationality: WideString Index (IS_OPTN) read FgoalGetterNationality write SetgoalGetterNationality stored goalGetterNationality_Specified;
    property goalGetterBirthday: TXSDateTime Index (IS_NLBL) read FgoalGetterBirthday write FgoalGetterBirthday;
    property goalGetterGoalCount: Integer Index (IS_NLBL) read FgoalGetterGoalCount write FgoalGetterGoalCount;
  end;


  // ************************************************************************ //
  // Namespace : http://msiggi.de/Sportsdata/Webservices
  // soapAction: http://msiggi.de/Sportsdata/Webservices/%operationName%
  // Transport : http://schemas.xmlsoap.org/soap/http
  // Stil : document
  // Bindung : SportsdataSoap
  // Service : Sportsdata
  // Port : SportsdataSoap
  // URL : http://www.openligadb.de/Webservices/Sportsdata.asmx
  // ************************************************************************ //
  SportsdataSoap = interface(IInvokable)
  ['{BFE2CD22-0F90-148F-C50F-85E2DD5C6D9A}']
    function GetAvailLeagues: ArrayOfLeague; stdcall;
    function GetNextMatch(const leagueShortcut: WideString): Matchdata; stdcall;
    function GetLastMatch(const leagueShortcut: WideString): Matchdata; stdcall;
    function GetCurrentGroupOrderID(const leagueShortcut: WideString): Integer; stdcall;
    function GetMatchdataByGroupLeagueSaison(const groupOrderID: Integer; const leagueShortcut: WideString; const leagueSaison: WideString): ArrayOfMatchdata; stdcall;
    function GetMatchdataByLeagueDateTime(const fromDateTime: TXSDateTime; const toDateTime: TXSDateTime; const leagueShortcut: WideString): ArrayOfMatchdata; stdcall;
    function GetMatchdataByTeams(const teamID1: Integer; const teamID2: Integer): ArrayOfMatchdata; stdcall;
    function GetMatchdataByLeagueSaison(const leagueShortcut: WideString; const leagueSaison: WideString): ArrayOfMatchdata; stdcall;
    function GetMatchdataByGroupLeagueSaisonJSON(const groupOrderID: Integer; const leagueShortcut: WideString; const leagueSaison: WideString): WideString; stdcall;
    function GetFusballdaten(const Spieltag: Integer; const Liga: WideString; const Saison: Integer; const Userkennung: WideString): ArrayOfFussballdaten; stdcall;
    function GetMatchByMatchID(const MatchID: Integer): Matchdata; stdcall;
    function GetTeamsByLeagueSaison(const leagueShortcut: WideString; const leagueSaison: WideString): ArrayOfTeam; stdcall;
    function GetAvailGroups(const leagueShortcut: WideString; const leagueSaison: WideString): ArrayOfGroup; stdcall;
    function GetAvailSports: ArrayOfSport; stdcall;
    function GetAvailLeaguesBySports(const sportID: Integer): ArrayOfLeague; stdcall;
    function GetGoalsByMatch(const MatchID: Integer): ArrayOfGoal; stdcall;
    function GetGoalsByLeagueSaison(const leagueShortcut: WideString; const leagueSaison: WideString): ArrayOfGoal; stdcall;
    function GetGoalGettersByLeagueSaison(const leagueShortcut: WideString; const leagueSaison: WideString): ArrayOfGoalGetter; stdcall;
    function GetLastChangeDateByLeagueSaison(const leagueShortcut: WideString; const leagueSaison: WideString): TXSDateTime; stdcall;
    function GetLastChangeDateByGroupLeagueSaison(const groupOrderID: Integer; const leagueShortcut: WideString; const leagueSaison: WideString): TXSDateTime; stdcall;
  end;

function GetSportsdataSoap(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): SportsdataSoap;


implementation
  uses SysUtils;

function GetSportsdataSoap(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): SportsdataSoap;
const
  defWSDL = 'http://www.openligadb.de/Webservices/Sportsdata.asmx?WSDL';
  defURL = 'http://www.openligadb.de/Webservices/Sportsdata.asmx';
  defSvc = 'Sportsdata';
  defPrt = 'SportsdataSoap';
var
  RIO: THTTPRIO;
begin
  Result := nil;
  if (Addr = '') then
  begin
    if UseWSDL then
      Addr := defWSDL
    else
      Addr := defURL;
  end;
  if HTTPRIO = nil then
    RIO := THTTPRIO.Create(nil)
  else
    RIO := HTTPRIO;
  try
    Result := (RIO as SportsdataSoap);
    if UseWSDL then
    begin
      RIO.WSDLLocation := Addr;
      RIO.Service := defSvc;
      RIO.Port := defPrt;
    end else
      RIO.URL := Addr;
  finally
    if (Result = nil) and (HTTPRIO = nil) then
      RIO.Free;
  end;
end;


procedure League.SetleagueName(Index: Integer; const AWideString: WideString);
begin
  FleagueName := AWideString;
  FleagueName_Specified := True;
end;

function League.leagueName_Specified(Index: Integer): boolean;
begin
  Result := FleagueName_Specified;
end;

procedure League.SetleagueShortcut(Index: Integer; const AWideString: WideString);
begin
  FleagueShortcut := AWideString;
  FleagueShortcut_Specified := True;
end;

function League.leagueShortcut_Specified(Index: Integer): boolean;
begin
  Result := FleagueShortcut_Specified;
end;

procedure League.SetleagueSaison(Index: Integer; const AWideString: WideString);
begin
  FleagueSaison := AWideString;
  FleagueSaison_Specified := True;
end;

function League.leagueSaison_Specified(Index: Integer): boolean;
begin
  Result := FleagueSaison_Specified;
end;

destructor Matchdata.Destroy;
var
  I: Integer;
begin
  for I := 0 to Length(FmatchResults)-1 do
    FreeAndNil(FmatchResults[I]);
  SetLength(FmatchResults, 0);
  for I := 0 to Length(Fgoals)-1 do
    FreeAndNil(Fgoals[I]);
  SetLength(Fgoals, 0);
  FreeAndNil(FmatchDateTime);
  FreeAndNil(FmatchDateTimeUTC);
  FreeAndNil(FlastUpdate);
  FreeAndNil(Flocation);
  inherited Destroy;
end;

procedure Matchdata.SetTimeZoneID(Index: Integer; const AWideString: WideString);
begin
  FTimeZoneID := AWideString;
  FTimeZoneID_Specified := True;
end;

function Matchdata.TimeZoneID_Specified(Index: Integer): boolean;
begin
  Result := FTimeZoneID_Specified;
end;

procedure Matchdata.SetgroupName(Index: Integer; const AWideString: WideString);
begin
  FgroupName := AWideString;
  FgroupName_Specified := True;
end;

function Matchdata.groupName_Specified(Index: Integer): boolean;
begin
  Result := FgroupName_Specified;
end;

procedure Matchdata.SetleagueName(Index: Integer; const AWideString: WideString);
begin
  FleagueName := AWideString;
  FleagueName_Specified := True;
end;

function Matchdata.leagueName_Specified(Index: Integer): boolean;
begin
  Result := FleagueName_Specified;
end;

procedure Matchdata.SetleagueSaison(Index: Integer; const AWideString: WideString);
begin
  FleagueSaison := AWideString;
  FleagueSaison_Specified := True;
end;

function Matchdata.leagueSaison_Specified(Index: Integer): boolean;
begin
  Result := FleagueSaison_Specified;
end;

procedure Matchdata.SetnameTeam1(Index: Integer; const AWideString: WideString);
begin
  FnameTeam1 := AWideString;
  FnameTeam1_Specified := True;
end;

function Matchdata.nameTeam1_Specified(Index: Integer): boolean;
begin
  Result := FnameTeam1_Specified;
end;

procedure Matchdata.SetnameTeam2(Index: Integer; const AWideString: WideString);
begin
  FnameTeam2 := AWideString;
  FnameTeam2_Specified := True;
end;

function Matchdata.nameTeam2_Specified(Index: Integer): boolean;
begin
  Result := FnameTeam2_Specified;
end;

procedure Matchdata.SeticonUrlTeam1(Index: Integer; const AWideString: WideString);
begin
  FiconUrlTeam1 := AWideString;
  FiconUrlTeam1_Specified := True;
end;

function Matchdata.iconUrlTeam1_Specified(Index: Integer): boolean;
begin
  Result := FiconUrlTeam1_Specified;
end;

procedure Matchdata.SeticonUrlTeam2(Index: Integer; const AWideString: WideString);
begin
  FiconUrlTeam2 := AWideString;
  FiconUrlTeam2_Specified := True;
end;

function Matchdata.iconUrlTeam2_Specified(Index: Integer): boolean;
begin
  Result := FiconUrlTeam2_Specified;
end;

procedure Matchdata.SetmatchResults(Index: Integer; const AArrayOfMatchResult: ArrayOfMatchResult);
begin
  FmatchResults := AArrayOfMatchResult;
  FmatchResults_Specified := True;
end;

function Matchdata.matchResults_Specified(Index: Integer): boolean;
begin
  Result := FmatchResults_Specified;
end;

procedure Matchdata.Setgoals(Index: Integer; const AArrayOfGoal: ArrayOfGoal);
begin
  Fgoals := AArrayOfGoal;
  Fgoals_Specified := True;
end;

function Matchdata.goals_Specified(Index: Integer): boolean;
begin
  Result := Fgoals_Specified;
end;

procedure Location.SetlocationCity(Index: Integer; const AWideString: WideString);
begin
  FlocationCity := AWideString;
  FlocationCity_Specified := True;
end;

function Location.locationCity_Specified(Index: Integer): boolean;
begin
  Result := FlocationCity_Specified;
end;

procedure Location.SetlocationStadium(Index: Integer; const AWideString: WideString);
begin
  FlocationStadium := AWideString;
  FlocationStadium_Specified := True;
end;

function Location.locationStadium_Specified(Index: Integer): boolean;
begin
  Result := FlocationStadium_Specified;
end;

procedure matchResult.SetresultName(Index: Integer; const AWideString: WideString);
begin
  FresultName := AWideString;
  FresultName_Specified := True;
end;

function matchResult.resultName_Specified(Index: Integer): boolean;
begin
  Result := FresultName_Specified;
end;

procedure Goal.SetgoalGetterName(Index: Integer; const AWideString: WideString);
begin
  FgoalGetterName := AWideString;
  FgoalGetterName_Specified := True;
end;

function Goal.goalGetterName_Specified(Index: Integer): boolean;
begin
  Result := FgoalGetterName_Specified;
end;

procedure Goal.SetgoalComment(Index: Integer; const AWideString: WideString);
begin
  FgoalComment := AWideString;
  FgoalComment_Specified := True;
end;

function Goal.goalComment_Specified(Index: Integer): boolean;
begin
  Result := FgoalComment_Specified;
end;

destructor Fussballdaten.Destroy;
begin
  FreeAndNil(FSpieldatum);
  FreeAndNil(FlastUpdate);
  inherited Destroy;
end;

procedure Fussballdaten.SetTeam1(Index: Integer; const AWideString: WideString);
begin
  FTeam1 := AWideString;
  FTeam1_Specified := True;
end;

function Fussballdaten.Team1_Specified(Index: Integer): boolean;
begin
  Result := FTeam1_Specified;
end;

procedure Fussballdaten.SetTeam2(Index: Integer; const AWideString: WideString);
begin
  FTeam2 := AWideString;
  FTeam2_Specified := True;
end;

function Fussballdaten.Team2_Specified(Index: Integer): boolean;
begin
  Result := FTeam2_Specified;
end;

procedure Team.SetteamName(Index: Integer; const AWideString: WideString);
begin
  FteamName := AWideString;
  FteamName_Specified := True;
end;

function Team.teamName_Specified(Index: Integer): boolean;
begin
  Result := FteamName_Specified;
end;

procedure Team.SetteamIconURL(Index: Integer; const AWideString: WideString);
begin
  FteamIconURL := AWideString;
  FteamIconURL_Specified := True;
end;

function Team.teamIconURL_Specified(Index: Integer): boolean;
begin
  Result := FteamIconURL_Specified;
end;

procedure Group.SetgroupName(Index: Integer; const AWideString: WideString);
begin
  FgroupName := AWideString;
  FgroupName_Specified := True;
end;

function Group.groupName_Specified(Index: Integer): boolean;
begin
  Result := FgroupName_Specified;
end;

procedure Sport.SetsportsName(Index: Integer; const AWideString: WideString);
begin
  FsportsName := AWideString;
  FsportsName_Specified := True;
end;

function Sport.sportsName_Specified(Index: Integer): boolean;
begin
  Result := FsportsName_Specified;
end;

destructor GoalGetter.Destroy;
begin
  FreeAndNil(FgoalGetterBirthday);
  inherited Destroy;
end;

procedure GoalGetter.SetgoalGetterName(Index: Integer; const AWideString: WideString);
begin
  FgoalGetterName := AWideString;
  FgoalGetterName_Specified := True;
end;

function GoalGetter.goalGetterName_Specified(Index: Integer): boolean;
begin
  Result := FgoalGetterName_Specified;
end;

procedure GoalGetter.SetgoalGetterNationality(Index: Integer; const AWideString: WideString);
begin
  FgoalGetterNationality := AWideString;
  FgoalGetterNationality_Specified := True;
end;

function GoalGetter.goalGetterNationality_Specified(Index: Integer): boolean;
begin
  Result := FgoalGetterNationality_Specified;
end;

initialization
  InvRegistry.RegisterInterface(TypeInfo(SportsdataSoap), 'http://msiggi.de/Sportsdata/Webservices', 'utf-8');
  InvRegistry.RegisterDefaultSOAPAction(TypeInfo(SportsdataSoap), 'http://msiggi.de/Sportsdata/Webservices/%operationName%');
  InvRegistry.RegisterInvokeOptions(TypeInfo(SportsdataSoap), ioDocument);
  RemClassRegistry.RegisterXSInfo(TypeInfo(ArrayOfLeague), 'http://msiggi.de/Sportsdata/Webservices', 'ArrayOfLeague');
  RemClassRegistry.RegisterXSClass(League, 'http://msiggi.de/Sportsdata/Webservices', 'League');
  RemClassRegistry.RegisterXSInfo(TypeInfo(ArrayOfMatchResult), 'http://msiggi.de/Sportsdata/Webservices', 'ArrayOfMatchResult');
  RemClassRegistry.RegisterXSInfo(TypeInfo(ArrayOfGoal), 'http://msiggi.de/Sportsdata/Webservices', 'ArrayOfGoal');
  RemClassRegistry.RegisterXSClass(Matchdata, 'http://msiggi.de/Sportsdata/Webservices', 'Matchdata');
  RemClassRegistry.RegisterXSClass(Location, 'http://msiggi.de/Sportsdata/Webservices', 'Location');
  RemClassRegistry.RegisterXSClass(matchResult, 'http://msiggi.de/Sportsdata/Webservices', 'matchResult');
  RemClassRegistry.RegisterXSClass(Goal, 'http://msiggi.de/Sportsdata/Webservices', 'Goal');
  RemClassRegistry.RegisterXSInfo(TypeInfo(ArrayOfMatchdata), 'http://msiggi.de/Sportsdata/Webservices', 'ArrayOfMatchdata');
  RemClassRegistry.RegisterXSInfo(TypeInfo(ArrayOfFussballdaten), 'http://msiggi.de/Sportsdata/Webservices', 'ArrayOfFussballdaten');
  RemClassRegistry.RegisterXSClass(Fussballdaten, 'http://msiggi.de/Sportsdata/Webservices', 'Fussballdaten');
  RemClassRegistry.RegisterXSInfo(TypeInfo(ArrayOfTeam), 'http://msiggi.de/Sportsdata/Webservices', 'ArrayOfTeam');
  RemClassRegistry.RegisterXSClass(Team, 'http://msiggi.de/Sportsdata/Webservices', 'Team');
  RemClassRegistry.RegisterXSInfo(TypeInfo(ArrayOfGroup), 'http://msiggi.de/Sportsdata/Webservices', 'ArrayOfGroup');
  RemClassRegistry.RegisterXSClass(Group, 'http://msiggi.de/Sportsdata/Webservices', 'Group');
  RemClassRegistry.RegisterXSInfo(TypeInfo(ArrayOfSport), 'http://msiggi.de/Sportsdata/Webservices', 'ArrayOfSport');
  RemClassRegistry.RegisterXSClass(Sport, 'http://msiggi.de/Sportsdata/Webservices', 'Sport');
  RemClassRegistry.RegisterXSInfo(TypeInfo(ArrayOfGoalGetter), 'http://msiggi.de/Sportsdata/Webservices', 'ArrayOfGoalGetter');
  RemClassRegistry.RegisterXSClass(GoalGetter, 'http://msiggi.de/Sportsdata/Webservices', 'GoalGetter');

end.

Geändert von MATASTYLE (22. Jul 2010 um 13:35 Uhr)
  Mit Zitat antworten Zitat
Benutzerbild von Mithrandir
Mithrandir
(CodeLib-Manager)

Registriert seit: 27. Nov 2008
Ort: Oldenburg (Oldb)
2.364 Beiträge
 
#4

AW: Openligadb.de

  Alt 22. Jul 2010, 13:34
Mit Inhalt füllen...?

Die nötigen Schritte hat dir himi doch schon genannt.
米斯蘭迪爾
"In einer Zeit universellen Betruges wird das Aussprechen der Wahrheit zu einem revolutionären Akt." -- 1984, George Orwell

Geändert von Mithrandir (22. Jul 2010 um 13:36 Uhr) Grund: Quellcode stand beim Antworten noch nicht da.
  Mit Zitat antworten Zitat
Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
21.773 Beiträge
 
Delphi XE2 Professional
 
#5

AW: Openligadb.de

  Alt 22. Jul 2010, 14:03
k.A. aber so wie es aussieht, besorgst du dir über GetSportsdataSoap ein SportsdataSoap und wiederum darüber kannst du dann verschiedene Dinge abrufen.
aktuell: ThreadList<T> / eine kleine Delphi-Statistik
Mathe: Starter < halbes Delphi
  Mit Zitat antworten Zitat
Benutzerbild von duff
duff

Registriert seit: 26. Jan 2005
Ort: Brühl
58 Beiträge
 
Delphi 2007 Professional
 
#6

AW: Openligadb.de

  Alt 22. Jul 2010, 23:27
Hallo hab hier mal eine kleine Beispielanwendung gebastelt.

Vielleicht hilft es dir ja auf die Sprünge

Viel Erfolg
Angehängte Dateien
Dateityp: zip openliga_test.zip (695,2 KB, 11x aufgerufen)
  Mit Zitat antworten Zitat
MATASTYLE

Registriert seit: 20. Jul 2010
3 Beiträge
 
Delphi 2 Desktop
 
#7

AW: Openligadb.de

  Alt 23. Jul 2010, 12:27
Danke euch für die schnellen und guten antworten!!!!
  Mit Zitat antworten Zitat
Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht

Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 18:56 Uhr.
Powered by vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2012 by Daniel R. Wolf