Delphi-PRAXiS
Seite 1 von 2  1 2      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Cross-Platform-Entwicklung (https://www.delphipraxis.net/91-cross-platform-entwicklung/)
-   -   Delphi Tbytedybarray return von einer Funktion (https://www.delphipraxis.net/180977-tbytedybarray-return-von-einer-funktion.html)

aals 4. Jul 2014 15:31

Tbytedybarray return von einer Funktion
 
Ich habe einen Webservices.
Es gibt eine Funktion gefile.
function getFile(const user: string; const pass: string; const appId: Int64; const retId: Int64; const personId: string; const fileId: string
): TByteDynArray; stdcall;
Bei dieser Funktion parst Delphi das Resultset mit dem XML - Parser. Das ist aber nur ein Binary File.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><env:Header xmlns:env="http://www.w3.org/2003/05/soap-envelope"/><soap:Body><ns2:getFileResponse xmlns:ns2="http://services.aals.dev/"><return><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:73218242-2924-4c2c-bd2f-21538f6a8a34-25@cxf.apache.org"/></return></ns2:getFileResponse></soap:Body></soap:Envelope>
--uuid:61810b24-98c5-4479-a012-e33b8ec6c069
Content-Type: application/binary
Content-Transfer-Encoding: binary
Content-ID: <73218242-2924-4c2c-bd2f-21538f6a8a34-25@cxf.apache.org>
Das Problem wird nirgend beschrieben. Ich glaube das das ein Delphi-Fehler ist.
die execption ist:
raise EXMLDocError.CreateFmt(Msg, Args);
Ich brauche dringend ein Workaround.

Wer kann mir da helfen? In keinem Forum ist das Problem Beschrieben.

TiGü 7. Jul 2014 13:16

AW: Tbytedybarray return von einer Funktion
 
Was steht denn in
Delphi-Quellcode:
Msg
drin? :?:

Wenn du deine Anfrage ordentlich formatierst, wollen sich bestimmt mehr Leute mit deinen Anliegen auseinandersetzen.
So ist das nur ein einziger wüster Textblock.

Besser wäre gewesen:


Ich habe einen Webservices.
Es gibt eine Funktion getfile.

Delphi-Quellcode:
function getFile(const user: string; const pass: string; const appId: Int64; const retId: Int64; const personId: string; const fileId: string
): TByteDynArray; stdcall;
Bei dieser Funktion parst Delphi das Resultset mit dem XML - Parser.
Das ist aber nur ein Binary File.
Code:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><env:Header xmlns:env="http://www.w3.org/2003/05/soap-envelope"/><soap:Body><ns2:getFileResponse xmlns:ns2="http://services.aals.dev/"><return><xop:Include xmlnsop="http://www.w3.org/2004/08/xop/include" href="cid:73218242-2924-4c2c-bd2f-21538f6a8a34-25@cxf.apache.org"/></return></ns2:getFileResponse></soap:Body></soap:Envelope>
--uuid:61810b24-98c5-4479-a012-e33b8ec6c069
Content-Type: application/binary
Content-Transfer-Encoding: binary
Content-ID: <73218242-2924-4c2c-bd2f-21538f6a8a34-25@cxf.apache.org>
Das Problem wird nirgend beschrieben. Ich glaube das das ein Delphi-Fehler ist.
die execption ist:

Delphi-Quellcode:
raise EXMLDocError.CreateFmt(Msg, Args);


Ich brauche dringend ein Workaround.

aals 7. Jul 2014 15:00

AW: Tbytedybarray return von einer Funktion
 
Danke für die FORMATIERUNG:
ich hoffe dass sich jemand meldet.

TiGü 7. Jul 2014 15:12

AW: Tbytedybarray return von einer Funktion
 
Zitat:

Zitat von TiGü (Beitrag 1264677)
Was steht denn in
Delphi-Quellcode:
Msg
drin? :?:

Siehe oben!

Der schöne Günther 7. Jul 2014 15:15

AW: Tbytedybarray return von einer Funktion
 
wat? Mit
Delphi-Quellcode:
Msg
meint er den konkreten Text der Exception.

PS: Es lässt sich noch schöner formatieren :love:
Code:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
   <env:Header xmlns:env="http://www.w3.org/2003/05/soap-envelope"/>
   <soap:Body>
      <ns2:getFileResponse xmlns:ns2="http://services.aals.dev/">
         <return>
            <xop:Include
               xmlnsop="http://www.w3.org/2004/08/xop/include"
               href="cid:73218242-2924-4c2c-bd2f-21538f6a8a34-25@cxf.apache.org"
            />
         </return>
      </ns2:getFileResponse>
   </soap:Body>
</soap:Envelope>

TiGü 7. Jul 2014 15:54

AW: Tbytedybarray return von einer Funktion
 
Zitat:

Zitat von Der schöne Günther (Beitrag 1264716)
wat? Mit
Delphi-Quellcode:
Msg
meint er den konkreten Text der Exception.

Ja eben!

Guck mal in die Xml.XMLDoc-Unit.
Da gibt es 15 Stellen, wo die Funktion XMLDocError aufgerufen wird (XE3), die dann eine EXMLDocError auslöst.

Da er hier anscheinend in die Variante mit CreateFmt reinläuft, gibt es drei mögliche Quellen (Zeilen 898, 1137 und 1949).

Der konkrete Text der Exception würde ihn und auch uns helfen ihn zu helfen!

Sir Rufo 7. Jul 2014 16:11

AW: Tbytedybarray return von einer Funktion
 
Zitat:

Zitat von TiGü (Beitrag 1264734)
Der konkrete Text der Exception würde ihn und auch uns helfen ihn zu helfen!

Die Bitte den Quelltext zu formatieren und den konkreten Text der Exception noch nachzureichen hatte ich schon per PN an den TE geschickt.

Reaktion (wie man sieht) gleich Null :roll:

aals 8. Jul 2014 04:54

AW: Tbytedybarray return von einer Funktion
 
Vielen Dank.
Die exception ist "Element return enthält keinen keinen einzelnen Textknoten"
KEIN WUNDER ES IST JA EIN BINARY Feld. "Tbytedynarray"
Delphi definiert es selber im WSDL - File drin.
An dieser Stelle kann ein (PDF,jpeg,png,,,,) Typ zurück kommen SOAP UI kann das prima.

TiGü 8. Jul 2014 09:27

AW: Tbytedybarray return von einer Funktion
 
Mir ist die Herkunft von GetFile noch unklar.
Ist das eine Funktion von dir?
Wenn ja, wo ist der Quelltext zur Funktion?

aals 8. Jul 2014 09:49

AW: Tbytedybarray return von einer Funktion
 
Das ist ein Webservice.
auf unserem Server. Wohl verstanden mit dem Program SOAPUI (das ist gratis) läuft es

Ich habe den WebServer mal auf mein Amazon gestellt. Hier der link:
http://soaptest-env.elasticbeanstalk...rvicePort?wsdl

Jetzt kannst Du ein Online Soap Client ausprobieren wie dieser:
http://www.soapclient.com/soaptest.html


Alle Zeitangaben in WEZ +1. Es ist jetzt 21:16 Uhr.
Seite 1 von 2  1 2      

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