![]() |
AW: XLM Payload als Post
Hallo,
immer die gleiche Meldung :? was könnte ich noch ausprobieren? Zitat:
Delphi-Quellcode:
function ExecuteAPI: string;
var http: TIdHttp; params: TStringList; iRun: Integer; begin try http := TIdHTTP.Create(nil); params := TStringList.Create; params.Add('<?xml version="1.0" encoding="UTF-8"?>'); params.Add('<fireboardOperation version="1.0">'); params.Add('<uniqueId>123456789</uniqueId>'); params.Add('<basicData>'); params.Add('<externalNumber>OF120131</externalNumber>'); params.Add('<keyword>F2</keyword>'); params.Add('<announcement>Wohnungsbrand</announcement>'); params.Add('<location>Test, Teststraße 1</location>'); {params.Add('<geo_location>'); params.Add('<latitude>123456</latitude>'); params.Add('<longitude>654321</longitude>'); params.Add('</geo_location>');} params.Add('<timestampStarted>'); params.Add('<long></long>'); params.Add('</timestampStarted>'); params.Add('<situation>Notruf</situation>'); params.Add('</basicData>'); params.Add('</fireboardOperation>'); http.IOHandler := TIdSSLIOHandlerSocketOpenSSL.Create(nil); Form3.Memo8.Lines.Insert(0,http.Post('https://login.fireboard.net/api?authkey=123456789&call=operation_Data', params)+' ' + FormatDateTime ('dd.mm.yyyy , hh:nn:ss', Now)); //ShowMessage(params[iRun]); finally params.Free; end; end; |
AW: XLM Payload als Post
Entferne bitte das = aus deinem Auth-Key am Ende. Und deinen Schlüssel hier im Forum bitte auch ;-)
|
AW: XLM Payload als Post
Hallo ZGD :-)
Danke! Jetzt bekomme ich eine neue Fehlermeldung zurück:
Code:
{"status":"error","errors":["xml error"]} 16.08.2016 , 14:11:07 |
AW: XLM Payload als Post
Ich weiß ;-)
das XML ist nicht "well-formed". Um solche Dinge zu testen, kannst du vorab dir ein Beispiel-XML aufbauen und durch ![]() Ich habe jetzt zum Beispiel nur dein Params-Objekt genommen.
Delphi-Quellcode:
, durch die Validierung gejagt und gesehen, was falsch ist.
params.saveToFile('D:\test.xml');
Code:
Grundsätzlich gilt: Was aufgemacht wird, muss zumacht werden. Du hast
<?xml version="1.0" encoding="UTF-8" ?>
<fireboardOperation version="1.0"> <uniqueId>ZctEHN0zaUTo2HWpob3EK6L5fdrGY5hy</uniqueId> <basicData> <externalNumber>OF120131</externalNumber> <keyword>F2</keyword> <announcement>Wohnungsbrand</announcement> <location>Test, Teststrasse 1</location> <situation>Notruf</situation></basicData> </fireboardOperation>
Delphi-Quellcode:
geöffnet, aber nicht geschlossen (letzte Zeile).
<fireboardOperation version="1.0">
|
AW: XLM Payload als Post
hey,
nochmal zum Verständnis, habe ich doch gemach oder nicht? Zitat:
Zitat:
|
AW: XLM Payload als Post
Hey,
Zitat:
Habe ich jetzt gemacht(durch die Validieerung gejagt) ! "No errors found" Aber bekomme immer noch die Meldung zurück:
Code:
{"status":"error","errors":["xml error"]} 16.08.2016 , 19:11:09 |
AW: XLM Payload als Post
Encoding.
Straße mit ß. Versuch es mal mit Doppel-S. |
AW: XLM Payload als Post
Guten Morgen ZGD,
leider immer noch die gleiche Meldung :cry: |
AW: XLM Payload als Post
Vergleiche mal einen funktionierenden Request mit einem nicht funktionierenden (z.B. mit
![]() |
AW: XLM Payload als Post
Zitat:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 06:46 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz