OpenLigaDB: No Data Available
-
Hallo zusammen,
habe mittels folgender Befehle die Umgebung für einen SOAP-Client geschaffen:
wsdl2h -o sportsdata.h http://www.openligadb.de/Webservices/Sportsdata.asmx?WSDL
soapcpp2 -I/usr/share/gsoap/import -i sportsdata.hNun bekomme ich bei folgendem Code aber nur diese Ausgabe:
mdata.size(): 0
mdata[ 0 ]->nameTeam1: No Data Available!Hier der Code:
#include "SportsdataSoap12.nsmap" #include "soapSportsdataSoap12Proxy.h" #include <memory> #include <string> #include <vector> int main() { _ns1__GetMatchdataByGroupLeagueSaison req; _ns1__GetMatchdataByGroupLeagueSaisonResponse resp; req.groupOrderID = 1; req.leagueShortcut = new std::string( "bl1" ); req.leagueSaison = new std::string( "2011" ); SportsdataSoap12Proxy sportsdata; sportsdata.GetMatchdataByGroupLeagueSaison( &req, &resp ); std::vector<ns1__Matchdata*> mdata = resp.GetMatchdataByGroupLeagueSaisonResult->Matchdata; std::cout << "mdata.size(): " << mdata.size() << std::endl; std::cout << "mdata[ 0 ]->nameTeam1: " << mdata[ 0 ]->nameTeam1->c_str() << std::endl; return 0; }Hier noch die Definitionen für
* _ns1__GetMatchdataByGroupLeagueSaison/// "http://msiggi.de/Sportsdata/Webservices":GetMatchdataByGroupLeagueSaison is a complexType. class _ns1__GetMatchdataByGroupLeagueSaison { public: /// Element groupOrderID of type xs:int. int groupOrderID 1; ///< Required element. /// Element leagueShortcut of type xs:string. std::string* leagueShortcut 0; ///< Optional element. /// Element leagueSaison of type xs:string. std::string* leagueSaison 0; ///< Optional element. /// A handle to the soap struct that manages this instance (automatically set) struct soap *soap ; };* _ns1__GetMatchdataByGroupLeagueSaisonResponse
/// "http://msiggi.de/Sportsdata/Webservices":GetMatchdataByGroupLeagueSaisonResponse is a complexType. class _ns1__GetMatchdataByGroupLeagueSaisonResponse { public: /// Element GetMatchdataByGroupLeagueSaisonResult of type "http://msiggi.de/Sportsdata/Webservices":ArrayOfMatchdata. ns1__ArrayOfMatchdata* GetMatchdataByGroupLeagueSaisonResult 0; ///< Optional element. /// A handle to the soap struct that manages this instance (automatically set) struct soap *soap ; };* SportsdataSoap12Proxy::GetMatchdataByGroupLeagueSaison
int SportsdataSoap12Proxy::GetMatchdataByGroupLeagueSaison(_ns1__GetMatchdataByGroupLeagueSaison *ns1__GetMatchdataByGroupLeagueSaison, _ns1__GetMatchdataByGroupLeagueSaisonResponse *ns1__GetMatchdataByGroupLeagueSaisonResponse);* ns1__Matchdata
/// "http://msiggi.de/Sportsdata/Webservices":Matchdata is a complexType. class ns1__Matchdata { public: /// Element matchID of type xs:int. int matchID 1; ///< Required element. /// Element matchDateTime of type xs:dateTime. time_t matchDateTime 1; ///< Required element. /// Element TimeZoneID of type xs:string. std::string* TimeZoneID 0; ///< Optional element. /// Element matchDateTimeUTC of type xs:dateTime. time_t matchDateTimeUTC 1; ///< Required element. /// Element groupID of type xs:int. int groupID 1; ///< Required element. /// Element groupOrderID of type xs:int. int groupOrderID 1; ///< Required element. /// Element groupName of type xs:string. std::string* groupName 0; ///< Optional element. /// Element leagueID of type xs:int. int leagueID 1; ///< Required element. /// Element leagueName of type xs:string. std::string* leagueName 0; ///< Optional element. /// Element leagueSaison of type xs:string. std::string* leagueSaison 0; ///< Optional element. /// Element leagueShortcut of type xs:string. std::string* leagueShortcut 0; ///< Optional element. /// Element nameTeam1 of type xs:string. std::string* nameTeam1 0; ///< Optional element. /// Element nameTeam2 of type xs:string. std::string* nameTeam2 0; ///< Optional element. /// Element idTeam1 of type xs:int. int idTeam1 1; ///< Required element. /// Element idTeam2 of type xs:int. int idTeam2 1; ///< Required element. /// Element iconUrlTeam1 of type xs:string. std::string* iconUrlTeam1 0; ///< Optional element. /// Element iconUrlTeam2 of type xs:string. std::string* iconUrlTeam2 0; ///< Optional element. /// Element pointsTeam1 of type xs:int. int pointsTeam1 1; ///< Required element. /// Element pointsTeam2 of type xs:int. int pointsTeam2 1; ///< Required element. /// Element lastUpdate of type xs:dateTime. time_t lastUpdate 1; ///< Required element. /// Element matchIsFinished of type xs:boolean. bool matchIsFinished 1; ///< Required element. /// Element matchResults of type "http://msiggi.de/Sportsdata/Webservices":ArrayOfMatchResult. ns1__ArrayOfMatchResult* matchResults 0; ///< Optional element. /// Element goals of type "http://msiggi.de/Sportsdata/Webservices":ArrayOfGoal. ns1__ArrayOfGoal* goals 0; ///< Optional element. /// Element location of type "http://msiggi.de/Sportsdata/Webservices":Location. ns1__Location* location 1; ///< Required element. /// Element NumberOfViewers of type xs:int. int* NumberOfViewers 1; ///< Nullable pointer. /// A handle to the soap struct that manages this instance (automatically set) struct soap *soap ; };Als Testergebnisse möchte ich von der 1. Bundesliga/Saison 2011 1. Spieltag die Begegnungen, bekomme aber keine Daten. Im Web-Livetest kann man aber sehen, dass Daten existieren: http://www.openligadb.de/Matches/WebserviceLivetest
Grüße
Danny.