AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Netzwerke Soap EDomParseError 'Only one top level'
Thema durchsuchen
Ansicht
Themen-Optionen

Soap EDomParseError 'Only one top level'

Ein Thema von luc.lacroix · begonnen am 29. Jul 2020 · letzter Beitrag vom 29. Jul 2020
Antwort Antwort
luc.lacroix

Registriert seit: 17. Jan 2012
Ort: Luxembourg
4 Beiträge
 
Delphi 10.3 Rio
 
#1

Soap EDomParseError 'Only one top level'

  Alt 29. Jul 2020, 09:59
Hallo,

ich versuche einen soap service zu benützen.

Hier ist ein teil von der wsdl generiert datei :
Delphi-Quellcode:
  // ************************************************************************ //
  // Namespace : urn:qs-stadat
  // transport : http://schemas.xmlsoap.org/soap/http
  // style : rpc
  // use : encoded
  // binding : rpcrouterSoapBinding
  // service : QSv2MsgProcessorService
  // port : rpcrouter
  // URL : http://www.qs-plattform.de/axis/services/rpcrouter
  // ************************************************************************ //
  QSv2MsgProcessor = interface(IInvokable)
  ['{EDBD273B-FDF7-0127-4901-233D0EA6904F}']
    function selectStandard(const in0: QSExtLocationBtartStandardQuery): QSExtLocationBtartQueryStandardReply; overload; stdcall;
    function selectStandard(const in0: QSExtLocationStandardQuery): QSExtLocationQueryStandardReply; overload; stdcall;
    function select(const in0: QSExtLocationBtartQuery): QSExtLocationBtartQueryReply; overload; stdcall;
    function select(const in0: QSExtLocationQuery): QSExtLocationQueryReply; overload; stdcall;
    function select(const in0: QSExtLocationStandardQuery): QSExtLocationFreeRangeQueryReply; overload; stdcall;
    function selectQSTW(const in0: QSExtLocationStandardQuery): QSExtLocationQSTWReply; stdcall;
  end;

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


implementation
  uses SysUtils;

function GetQSv2MsgProcessor(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): QSv2MsgProcessor;
const
  defWSDL = 'https://www.qs-plattform.de/axis/services/rpcrouter?wsdl';
  defURL = 'http://www.qs-plattform.de/axis/services/rpcrouter';
  defSvc = 'QSv2MsgProcessorService';
  defPrt = 'rpcrouter';
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 QSv2MsgProcessor);
    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;
Hier ist mein code zum testen :
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
  service: QSv2MsgProcessor;
  query: QSExtLocationBtartStandardQuery;
  response: QSExtLocationBtartQueryStandardReply;
begin
  service := GetQSv2MsgProcessor(True);
  query := QSExtLocationBtartStandardQuery.Create;
  try
    query.locationId := Edit1.Text;
    query.btartId := StrToInt(Edit2.Text);
    try
      response := nil;
      response := service.selectStandard(query); // <----- JETZT PASSIERT DEN FEHLER
      Edit4.Text := response.certifiedLocation.ToString;
    except
      Edit4.Text := 'ERROR';
    end;
  finally
    query.Free;
  end;
end;
Und hier ist das felhler dialogbox.
Code:
---------------------------
Debugger Exception Notification
---------------------------
Project testQS.exe raised exception class EDOMParseError with message 'Only one top level element is allowed in an XML document.

Line: 2
<p>Hi there, this is an AXIS service!</p'.
Ich hab schon viel auf google gesucht, aber nichts gefunden.

Ich danke euch im voraus, und sorry for my poor German

Luc.
Luc Lacroix
  Mit Zitat antworten Zitat
luc.lacroix

Registriert seit: 17. Jan 2012
Ort: Luxembourg
4 Beiträge
 
Delphi 10.3 Rio
 
#2

AW: Soap EDomParseError 'Only one top level'

  Alt 29. Jul 2020, 10:23
Delphi XE5
Luc Lacroix
  Mit Zitat antworten Zitat
TiGü

Registriert seit: 6. Apr 2011
Ort: Berlin
3.060 Beiträge
 
Delphi 10.4 Sydney
 
#3

AW: Soap EDomParseError 'Only one top level'

  Alt 29. Jul 2020, 10:48
Have you tried to open the URL in a normal browser?
https://www.qs-plattform.de//axis/services/rpcrouter

Zitat:
rpcrouter
Hi there, this is an AXIS service!

Perhaps there will be a form for invoking the service here...
Maybe the service is offline? Please contact the service provider for more information.
  Mit Zitat antworten Zitat
luc.lacroix

Registriert seit: 17. Jan 2012
Ort: Luxembourg
4 Beiträge
 
Delphi 10.3 Rio
 
#4

AW: Soap EDomParseError 'Only one top level'

  Alt 29. Jul 2020, 14:29
Hallo,

ja, ich hab es gemacht, und kommt so was :

Zitat:
rpcrouter
Hi there, this is an AXIS service!

Perhaps there will be a form for invoking the service here...
Luc Lacroix
  Mit Zitat antworten Zitat
TiGü

Registriert seit: 6. Apr 2011
Ort: Berlin
3.060 Beiträge
 
Delphi 10.4 Sydney
 
#5

AW: Soap EDomParseError 'Only one top level'

  Alt 29. Jul 2020, 14:58
Je suppose que vous parlez français ?

Je sais que cette nouvelle arrive, je l'ai fait citer dans mon post.
Il semble que le service web soit en panne en ce moment. La faute n'est donc pas de votre fait.
  Mit Zitat antworten Zitat
luc.lacroix

Registriert seit: 17. Jan 2012
Ort: Luxembourg
4 Beiträge
 
Delphi 10.3 Rio
 
#6

AW: Soap EDomParseError 'Only one top level'

  Alt 29. Jul 2020, 19:36
Vielen Dank Tigü

Merci beaucoup.
Luc Lacroix
  Mit Zitat antworten Zitat
Antwort Antwort


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 · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:37 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz