Webservice abfragen mit ksoap2, addproperty funktioniert nicht

R

ramses66

Neues Mitglied
0
Hallo zusammen,
ich versuche mit ksoap2 einen Webservice abzufragen.
Wenn ich den Webservice ohne Paramter abfrage ist das alles kein Problem. Sobald jedoch Parameter mit addProperty() hinzukommen gibt es eine Fehlermeldung vom Webservice
"Server was unable to process request. ---> Sequence contains no elements"
Es sieht so aus, als ob die Parameter nicht an der Webservive weitergegeben werden.
Ich habe jezt schon stundenlang das Web abgesucht ohne Erfolg.

Mein Code sieht wie folgt aus.

final String NAME_SPACE = "http://msiggi.de/Sportsdata/Webservices/";
final String URL = "http://www.openligadb.de/Webservices/Sportsdata.asmx";
final String SOAP_ACTION = "http://msiggi.de/Sportsdata/Webservices/GetMatchdataByLeagueSaison";
final String METHOD_NAME = "GetMatchdataByLeagueSaison";

SoapObject Request = new SoapObject(NAME_SPACE, METHOD_NAME);

Request.addProperty("leagueShortcut", "bl1");
Request.addProperty("leagueSaison", 2010);

SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
soapEnvelope.dotNet = true;
soapEnvelope.setOutputSoapObject(Request);

HttpTransportSE tns = new HttpTransportSE(URL);

try
{
tns.call(SOAP_ACTION, soapEnvelope);
SoapObject resultString = (SoapObject) soapEnvelope.getResponse();
String PropertyCount = String.valueOf(resultString.getPropertyCount()); // Anzahl Records
Log.i("GetMatchdataByLeagueSaison", "Anzahl Properties = " + PropertyCount);
result = "GetMatchdataByLeagueSaison " + PropertyCount;
}
catch(Exception e)
{
result = "GetMatchdataByLeagueSaison " + e.getMessage();
}
return result;
}

Ich bin für jeden Tipp dankbar.
 

Ähnliche Themen

SaniMatthias
Antworten
19
Aufrufe
962
swa00
swa00
B
Antworten
3
Aufrufe
1.309
swa00
swa00
O
Antworten
15
Aufrufe
2.973
ORHUX
O
Zurück
Oben Unten