AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

DPD Webservice

Ein Thema von horstmeyer · begonnen am 3. Aug 2023 · letzter Beitrag vom 8. Aug 2023
 
horstmeyer

Registriert seit: 9. Aug 2021
45 Beiträge
 
#1

DPD Webservice

  Alt 3. Aug 2023, 13:45
Hallo Leute,

hat jemand schon mal mit DPD Webservice gearbeitet? Ich versuche gerade das Java-Beispiel nach Delphi zu konvertieren, komme aber leider nicht klar.

Das Beispiel in Java:
Code:
      // printOptions   
      PrintOption[] myPrintOptionList = new PrintOption[1];
      PrintOption myPrintOption = new PrintOption();   
      myPrintOption.setPaperFormat(com.dpd.common.service.types.ShipmentService._4_4.PrintOptionPaperFormat.A4);
      myPrintOption.setStartPosition(com.dpd.common.service.types.ShipmentService._4_4.StartPosition.UPPER_LEFT);
      myPrintOption.setOutputFormat(com.dpd.common.service.types.ShipmentService._4_4.OutputFormatType.PDF);
      myPrintOptionList[0] = myPrintOption;
Ich habe es mal so versucht, die Zuweisung funktioniert aber nicht:
Code:
procedure TForm1.MLButton2Click(Sender: TObject);
var
  ret : storeOrdersResponseType;
  myShipmentService44Client : ShipmentService_4_4;
  apiAuth : authentication;
  myPrintOptionList : array of PrintOption;
  myPrintOption : PrintOption;
begin

  if myAuthToken.Length>0 then begin
    showmessage('StoreOrders'+chr(13)+
                'delisId:'+mylogin.delisId+chr(13)+
                'customerUid:'+mylogin.customerUid+chr(13)+
                'authToken:'+myAuthToken+chr(13)+
                'depot:'+mylogin.depot+chr(13)+
                'System:'+sSystem);

    with apiAuth do begin
      delisId:=EditLogin.Text;
      authToken := myAuthToken;
      messageLanguage := 'de_DE';
    end;

    try

    myPrintOption.paperFormat:=printOption.PaperFormat.A4;
      // printOptions
//      PrintOption[] myPrintOptionList = new PrintOption[1];
//      PrintOption myPrintOption = new PrintOption();
//      myPrintOption.setPaperFormat(com.dpd.common.service.types.ShipmentService._4_4.PrintOptionPaperFormat.A4);
//      myPrintOption.setStartPosition(com.dpd.common.service.types.ShipmentService._4_4.StartPosition.UPPER_LEFT);
//      myPrintOption.setOutputFormat(com.dpd.common.service.types.ShipmentService._4_4.OutputFormatType.PDF);
//      myPrintOptionList[0] = myPrintOption;

      showmessage('storeorder');
    except
      showmessage('Fehler');
    end;
  end else begin
    showmessage('Bitte erst anmelden.');
  end;

end;
Hier der Ausschnitt der Klasse PrintOption:
Code:
  // ************************************************************************ //
  // XML      : printOption, global, <complexType>
  // Namespace : http://dpd.com/common/service/types/ShipmentService/4.4
  // ************************************************************************ //
  printOption = class(TRemotable)
  private
    FoutputFormat: OutputFormatType;
    FpaperFormat: paperFormat;
    FpaperFormat_Specified: boolean;
    Fprinter: printer;
    Fprinter_Specified: boolean;
    FstartPosition: startPosition;
    FstartPosition_Specified: boolean;
    procedure SetpaperFormat(Index: Integer; const ApaperFormat: paperFormat);
    function paperFormat_Specified(Index: Integer): boolean;
    procedure Setprinter(Index: Integer; const Aprinter: printer);
    function printer_Specified(Index: Integer): boolean;
    procedure SetstartPosition(Index: Integer; const AstartPosition: startPosition);
    function startPosition_Specified(Index: Integer): boolean;
  public
    destructor Destroy; override;
  published
    property outputFormat: OutputFormatType Index (IS_UNQL) read FoutputFormat write FoutputFormat;
    property paperFormat:  paperFormat      Index (IS_OPTN or IS_UNQL) read FpaperFormat write SetpaperFormat stored paperFormat_Specified;
    property printer:      printer          Index (IS_OPTN or IS_UNQL) read Fprinter write Setprinter stored printer_Specified;
    property startPosition: startPosition    Index (IS_OPTN or IS_UNQL) read FstartPosition write SetstartPosition stored startPosition_Specified;
  end;
  Mit Zitat antworten Zitat
 


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 02:23 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