Autor Beitrag
thepaine91
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 763
Erhaltene Danke: 27

Win XP, Windows 7, (Linux)
D6, D2010, C#, PHP, Java(Android), HTML/Js
BeitragVerfasst: Mo 13.09.10 09:23 
Hi ich hab mal eine kurze Frage zum XML erstellt von Delphi 2010.
Meine Anwendung übernimmt in dem Fall die Rolle des Client und komuniziert über Soap mit einem Server programmiert mit Java.
Folgendes versteht der Server nicht:
ausblenden XML-Daten
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
<ArrayOfLayer_4>  // (anderer Namspace als beim Layer xyz)
  <Layer xsi:type="NS1:xyz" name="xyz" visible="true">
    <NS1:wrappedTexts>
      <NS1:Texts>
      </NS1:Texts>
    </NS1:wrappedTexts>
  </Layer>
</ArrayOfLayer_4>
Wenn ich bei Layer das NS1 ergänze versteht er es:
<ArrayOfLayer_4>
  <NS1:Layer xsi:type="NS1:xyz" name="xyz" visible="true">
    ....
  </NS1:Layer>
</ArrayOfLayer_4>

Aber warum wird bei der erstellten XML Datei überall das NS1 schon dazu geschrieben nur bei diesem Element nicht?
BZw. wo liegt der Fehler, beim erstellten XML von Delphi, oder beim Parser des Servers?
Denn eigentlich ist der Typ durch das xsi:type=NS1:xyz schon bekannt, ist der Namespace am Anfang trotzdem nötig?
Sinspin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1336
Erhaltene Danke: 119

Win 10
RIO, CE, Lazarus
BeitragVerfasst: Mo 13.09.10 09:47 
Ich würde sagen, du hast Glück, mich hat genau so ein Problem mehr als eine Woche gekostet. Ich habe dann rausbekommen das Delphi da Mist beim generieren der Schnittstelle macht. Bzw. die Leutchens die das WSDL Skript erstellt haben waren nicht ganz gründlich mit der Typdefinition von untergeordneten Leveln. Bei einem Import in Java gibt es keine Probleme da passt das Interface und es werden passende Ergebnisse generiert, nur halt nicht in Delphi (D2010).

Schau dir mal das generierte Interface an. Da gibt es ja sicher ein Object in dem Layer als Property deklariert ist. Da sollte dann irgendwo Index kommen gefolgt von Flags in runden Klammern. Steht in dem Klammern IS_REF mit drinne hau es mal raus. Zumindest in meinem Fall ging es dann ohne Probleme.

_________________
Wir zerstören die Natur und Wälder der Erde. Wir töten wilde Tiere für Trophäen. Wir produzieren Lebewesen als Massenware um sie nach wenigen Monaten zu töten. Warum sollte unser aller Mutter, die Natur, nicht die gleichen Rechte haben?
thepaine91 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 763
Erhaltene Danke: 27

Win XP, Windows 7, (Linux)
D6, D2010, C#, PHP, Java(Android), HTML/Js
BeitragVerfasst: Mo 13.09.10 10:35 
Nope ein IS_REF existiert nicht sondern nur folgende:
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
const
  IS_OPTN = $0001;
  IS_UNBD = $0002;
  IS_NLBL = $0004;
  IS_ATTR = $0010;

//Hier auch mal die sonstigen Definitionen, die interessant sein könnten:
  Layer = class(TransientVO)
  private
    Fname_: string;
    Fname__Specified: boolean;
    Fvisible: Boolean;
    procedure Setname_(Index: Integer; const Astring: string);
    function  name__Specified(Index: Integer): boolean;
  published
    property name_:   string   Index (IS_ATTR or IS_OPTN) read Fname_ write Setname_ stored name__Specified;
    property visible: Boolean  Index (IS_ATTR) read Fvisible write Fvisible;
  end;

  ArrayOfLayer = array of Layer;                { "http://xyz.****.****.com"[GblCplx] }

  RemClassRegistry.RegisterXSClass(Layer, 'http://xyz.****.****.com''Layer');
  RemClassRegistry.RegisterXSInfo(TypeInfo(ArrayOfLayer), 'http://123.xyz.****.****.com''ArrayOfLayer');
  //<--!! Registrierung von ArrayOfLayer sah nach dem Import so aus:  xyz.****.****. Ist aber falsch.
  CustomLayer = class(Layer)
  private
    FcenterObjects: Boolean;
    FdrawPriority: Integer;
    FobjectInfos: ObjectInfoType;
    FwrappedBitmaps: ArrayOfBitmaps;
    FwrappedLines: ArrayOfLines;
    FwrappedTexts: ArrayOfTexts;
  public
    destructor Destroy; override;
  published
    property centerObjects:  Boolean         Index (IS_ATTR) read FcenterObjects write FcenterObjects;
    property drawPriority:   Integer         Index (IS_ATTR) read FdrawPriority write FdrawPriority;
    property objectInfos:    ObjectInfoType  Index (IS_ATTR) read FobjectInfos write FobjectInfos;
    property wrappedBitmaps: ArrayOfBitmaps  Index (IS_NLBL) read FwrappedBitmaps write FwrappedBitmaps;
    property wrappedLines:   ArrayOfLines    Index (IS_NLBL) read FwrappedLines write FwrappedLines;
    property wrappedTexts:   ArrayOfTexts    Index (IS_NLBL) read FwrappedTexts write FwrappedTexts;
  end;

RemClassRegistry.RegisterXSClass(CustomLayer, 'http://xyz.****.****.com''CustomLayer');
Astat
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 75
Erhaltene Danke: 1

Windows 2000
D6, D7, D2007, Lazarus
BeitragVerfasst: Mo 13.09.10 12:01 
Hallo thepaine91, für Details über den Webservice "Standard ???????" guckst Du hier!

edn.embarcadero.com/article/27982

www.whitemesa.com/interop.htm


lg. Astat
thepaine91 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 763
Erhaltene Danke: 27

Win XP, Windows 7, (Linux)
D6, D2010, C#, PHP, Java(Android), HTML/Js
BeitragVerfasst: Mo 13.09.10 16:19 
Danke. Der Fehler liegt hier aber im Delphi. Ich bin derzeit nur ratlos weshalb er den falschen Namespace für (Layer) wählt. Aber vielleicht kennt jemand das Problem bzw. hatte dieses auch schon.
Sinspin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1336
Erhaltene Danke: 119

Win 10
RIO, CE, Lazarus
BeitragVerfasst: Mo 13.09.10 16:28 
Hm, dein Ergebnis schaut wirklich anders aus als meine letzten die nicht ganz gingen. Was für Einstellungen hast du für den Import verwendet?
Bei mir ist folgendes eingestellt:
WSDL_Options

Spiel mal ein bisschen mit den Optionen rum vlt. bringt ja das schon was.
Leider ist das ein bisschen wenig Quelltext um darin nach dem Fehler zu schauen. Falls du die WSDL oder die erzeugte Schnittstelle nicht veröffentlichen kannst (willst), als PN würde ich die mir heute Abend mal ansehen.
Einloggen, um Attachments anzusehen!
_________________
Wir zerstören die Natur und Wälder der Erde. Wir töten wilde Tiere für Trophäen. Wir produzieren Lebewesen als Massenware um sie nach wenigen Monaten zu töten. Warum sollte unser aller Mutter, die Natur, nicht die gleichen Rechte haben?
thepaine91 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 763
Erhaltene Danke: 27

Win XP, Windows 7, (Linux)
D6, D2010, C#, PHP, Java(Android), HTML/Js
BeitragVerfasst: Fr 17.09.10 13:13 
So mit etwas verspätung ich habe es mit den selben Optionen importiert.
Ich habe nach wie vor noch keine Idee weshalb der Namespace im Layer vernachlässigt wird.....
thepaine91 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 763
Erhaltene Danke: 27

Win XP, Windows 7, (Linux)
D6, D2010, C#, PHP, Java(Android), HTML/Js
BeitragVerfasst: Mo 20.09.10 10:15 
*push* ;)