AGB  ·  Datenschutz  ·  Impressum  







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

DHL-Webservice nutzen

Offene Frage von "arnof"
Ein Thema von CarstenH · begonnen am 2. Nov 2015 · letzter Beitrag vom 12. Nov 2015
Antwort Antwort
Seite 1 von 3  1 23      
CarstenH

Registriert seit: 18. Feb 2006
18 Beiträge
 
Delphi 7 Professional
 
#1

DHL-Webservice nutzen

  Alt 2. Nov 2015, 13:35
Ich versuche bislang vergeblich, den DHL-Webservice an den Start zu bekommen. Folgender Effekt: Wenn ich die Datei
https://cig.dhl.de/cig-wsdls/com/dpd...d-api-1.0.wsdl
über der WSDL-Import importiere, kennt Delphi danach diverse Typen nicht, z.B. CreateShipmentTDRequest.

Mir ist jetzt nicht klar, wie ich mich dem Problem nähern kann. brauch ich evtl. ein neueres Delphi (7 Prof. ist am Start) oder sind es Einstellungsfragen oder bekomm ich die Typdeklarationen woanders her?

Ich hab auch mal dieses Beispiel durchgespielt:
http://www.onlinedelphitraining.com/...ebservices.htm
Es kompiliert, liefert aber bei der Abfrage des Webservice auch Fehler, auch wenn ich nur die mitgelieferten Originalquellcodes kompiliere.

Carsten


Delphi-Quellcode:
// ************************************************************************ //
// Die in dieser Datei deklarierten Typen wurden aus Daten generiert, die aus
// unten beschriebener WSDL-Datei stammen:
// WSDL : https://cig.dhl.de/cig-wsdls/com/dpdhl/wsdl/geschaeftskundenversand-api/1.0/geschaeftskundenversand-api-1.0.wsdl
// Codierung : UTF-8
// Codegen : [wfDebug,wfServer,wfUseSerializerClassForAttrs,wfGenTrueGUIDs]
// Version : 1.0
// (01.11.2015 23:14:55 - 1.33.2.5)
// ************************************************************************ //

unit geschaeftskundenversand_api_dhl;

interface

uses InvokeRegistry, SOAPHTTPClient, Types, XSBuiltIns;

type

  // ************************************************************************ //
  // Die folgenden Typen, auf die im WSDL-Dokument Bezug genommen wird, sind in dieser Datei
  // nicht repräsentiert. Sie sind entweder Aliase(@) anderer repräsentierter Typen oder auf sie wurde Bezug genommen,
  // aber in diesem Dokument nicht deklariert (!). Die Typen aus letzterer Kategorie
  // sind normalerweise mit vordefinierten/bekannten XML- oder Borland-Typen verbunden; sie könnten aber auch ein Anzeichen
  // für ein falsches WSDL-Dokument sein, das einen Schema-Typ nicht deklariert oder importiert..
  // ************************************************************************ //
  // !:CreateShipmentTDRequest - "http://de.ws.intraship"
  // !:CreateShipmentResponse - "http://de.ws.intraship"
  // !:Authentification - "http://dhl.de/webservice/cisbase"
  // !:CreateShipmentDDRequest - "http://de.ws.intraship"
  // !:DeleteShipmentTDRequest - "http://de.ws.intraship"
  // !:DeleteShipmentResponse - "http://de.ws.intraship"
  // !:DeleteShipmentDDRequest - "http://de.ws.intraship"
  // !:DoManifestTDRequest - "http://de.ws.intraship"
  // !:DoManifestResponse - "http://de.ws.intraship"
  // !:DoManifestDDRequest - "http://de.ws.intraship"
  // !:GetLabelTDRequest - "http://de.ws.intraship"
  // !:GetLabelResponse - "http://de.ws.intraship"
  // !:GetLabelDDRequest - "http://de.ws.intraship"
  // !:BookPickupRequest - "http://de.ws.intraship"
  // !:BookPickupResponse - "http://de.ws.intraship"
  // !:CancelPickupRequest - "http://de.ws.intraship"
  // !:CancelPickupResponse - "http://de.ws.intraship"
  // !:Version - "http://dhl.de/webservice/cisbase"
  // !:GetVersionResponse - "http://de.ws.intraship"
  // !:GetExportDocTDRequest - "http://de.ws.intraship"
  // !:GetExportDocResponse - "http://de.ws.intraship"
  // !:GetExportDocDDRequest - "http://de.ws.intraship"
  // !:GetManifestDDRequest - "http://de.ws.intraship"
  // !:GetManifestDDResponse - "http://de.ws.intraship"
  // !:UpdateShipmentDDRequest - "http://de.ws.intraship"
  // !:UpdateShipmentResponse - "http://de.ws.intraship"


  // ************************************************************************ //
  // Namespace : http://de.ws.intrashipservice
  // soapAction: urn:%operationName%
  // Transport : http://schemas.xmlsoap.org/soap/http
  // Stil : document
  // Bindung : ShipmentServiceSOAP11Binding
  // Service : ISService_1_0_de
  // Port : ShipmentServiceSOAP11port0
  // URL : https://cig.dhl.de/services/production/soap
  // ************************************************************************ //
  ISWSServicePortType = interface(IInvokable)
  ['{35DA55F0-0197-EA24-95BA-6A40B3CBB3F7}']
    function createShipmentTD(const part1: CreateShipmentTDRequest): CreateShipmentResponse; stdcall;
    function createShipmentDD(const part1: CreateShipmentDDRequest): CreateShipmentResponse; stdcall;
    function deleteShipmentTD(const part1: DeleteShipmentTDRequest): DeleteShipmentResponse; stdcall;
    function deleteShipmentDD(const part1: DeleteShipmentDDRequest): DeleteShipmentResponse; stdcall;
    function doManifestTD(const part1: DoManifestTDRequest): DoManifestResponse; stdcall;
    function doManifestDD(const part1: DoManifestDDRequest): DoManifestResponse; stdcall;
    function getLabelTD(const part1: GetLabelTDRequest): GetLabelResponse; stdcall;
    function getLabelDD(const part1: GetLabelDDRequest): GetLabelResponse; stdcall;
    function bookPickup(const part1: BookPickupRequest): BookPickupResponse; stdcall;
    function cancelPickup(const part1: CancelPickupRequest): CancelPickupResponse; stdcall;
    function getVersion(const part1: Version): GetVersionResponse; stdcall;
    function getExportDocTD(const part1: GetExportDocTDRequest): GetExportDocResponse; stdcall;
    function getExportDocDD(const part1: GetExportDocDDRequest): GetExportDocResponse; stdcall;
    function getManifestDD(const part1: GetManifestDDRequest): GetManifestDDResponse; stdcall;
    function updateShipmentDD(const part1: UpdateShipmentDDRequest): UpdateShipmentResponse; stdcall;
  end;



implementation

type

  ISWSServicePortTypeImpl = class(TInvokableClass, ISWSServicePortType)
  public
    { ISWSServicePortType }
    function createShipmentTD(const part1: CreateShipmentTDRequest): CreateShipmentResponse; stdcall;
    function createShipmentDD(const part1: CreateShipmentDDRequest): CreateShipmentResponse; stdcall;
    function deleteShipmentTD(const part1: DeleteShipmentTDRequest): DeleteShipmentResponse; stdcall;
    function deleteShipmentDD(const part1: DeleteShipmentDDRequest): DeleteShipmentResponse; stdcall;
    function doManifestTD(const part1: DoManifestTDRequest): DoManifestResponse; stdcall;
    function doManifestDD(const part1: DoManifestDDRequest): DoManifestResponse; stdcall;
    function getLabelTD(const part1: GetLabelTDRequest): GetLabelResponse; stdcall;
    function getLabelDD(const part1: GetLabelDDRequest): GetLabelResponse; stdcall;
    function bookPickup(const part1: BookPickupRequest): BookPickupResponse; stdcall;
    function cancelPickup(const part1: CancelPickupRequest): CancelPickupResponse; stdcall;
    function getVersion(const part1: Version): GetVersionResponse; stdcall;
    function getExportDocTD(const part1: GetExportDocTDRequest): GetExportDocResponse; stdcall;
    function getExportDocDD(const part1: GetExportDocDDRequest): GetExportDocResponse; stdcall;
    function getManifestDD(const part1: GetManifestDDRequest): GetManifestDDResponse; stdcall;
    function updateShipmentDD(const part1: UpdateShipmentDDRequest): UpdateShipmentResponse; stdcall;
  end;

function ISWSServicePortTypeImpl.createShipmentTD(const part1: CreateShipmentTDRequest): CreateShipmentResponse;
begin
  { TODO - Implement method createShipmentTD }
end;

function ISWSServicePortTypeImpl.createShipmentDD(const part1: CreateShipmentDDRequest): CreateShipmentResponse;
begin
  { TODO - Implement method createShipmentDD }
end;

function ISWSServicePortTypeImpl.deleteShipmentTD(const part1: DeleteShipmentTDRequest): DeleteShipmentResponse;
begin
  { TODO - Implement method deleteShipmentTD }
end;

function ISWSServicePortTypeImpl.deleteShipmentDD(const part1: DeleteShipmentDDRequest): DeleteShipmentResponse;
begin
  { TODO - Implement method deleteShipmentDD }
end;

function ISWSServicePortTypeImpl.doManifestTD(const part1: DoManifestTDRequest): DoManifestResponse;
begin
  { TODO - Implement method doManifestTD }
end;

function ISWSServicePortTypeImpl.doManifestDD(const part1: DoManifestDDRequest): DoManifestResponse;
begin
  { TODO - Implement method doManifestDD }
end;

function ISWSServicePortTypeImpl.getLabelTD(const part1: GetLabelTDRequest): GetLabelResponse;
begin
  { TODO - Implement method getLabelTD }
end;

function ISWSServicePortTypeImpl.getLabelDD(const part1: GetLabelDDRequest): GetLabelResponse;
begin
  { TODO - Implement method getLabelDD }
end;

function ISWSServicePortTypeImpl.bookPickup(const part1: BookPickupRequest): BookPickupResponse;
begin
  { TODO - Implement method bookPickup }
end;

function ISWSServicePortTypeImpl.cancelPickup(const part1: CancelPickupRequest): CancelPickupResponse;
begin
  { TODO - Implement method cancelPickup }
end;

function ISWSServicePortTypeImpl.getVersion(const part1: Version): GetVersionResponse;
begin
  { TODO - Implement method getVersion }
end;

function ISWSServicePortTypeImpl.getExportDocTD(const part1: GetExportDocTDRequest): GetExportDocResponse;
begin
  { TODO - Implement method getExportDocTD }
end;

function ISWSServicePortTypeImpl.getExportDocDD(const part1: GetExportDocDDRequest): GetExportDocResponse;
begin
  { TODO - Implement method getExportDocDD }
end;

function ISWSServicePortTypeImpl.getManifestDD(const part1: GetManifestDDRequest): GetManifestDDResponse;
begin
  { TODO - Implement method getManifestDD }
end;

function ISWSServicePortTypeImpl.updateShipmentDD(const part1: UpdateShipmentDDRequest): UpdateShipmentResponse;
begin
  { TODO - Implement method updateShipmentDD }
end;

initialization
  InvRegistry.RegisterInterface(TypeInfo(ISWSServicePortType), 'http://de.ws.intrashipservice', 'UTF-8');
  InvRegistry.RegisterInvokableClass(ISWSServicePortTypeImpl);
  InvRegistry.RegisterHeaderClass(TypeInfo(ISWSServicePortType), Authentification, hmtAll, False);
  InvRegistry.RegisterHeaderMethod(TypeInfo(ISWSServicePortType), Authentification, 'createShipmentTD', hmtRequest, False);
  InvRegistry.RegisterHeaderMethod(TypeInfo(ISWSServicePortType), Authentification, 'createShipmentDD', hmtRequest, False);
  InvRegistry.RegisterHeaderMethod(TypeInfo(ISWSServicePortType), Authentification, 'deleteShipmentTD', hmtRequest, False);
  InvRegistry.RegisterHeaderMethod(TypeInfo(ISWSServicePortType), Authentification, 'deleteShipmentDD', hmtRequest, False);
  InvRegistry.RegisterHeaderMethod(TypeInfo(ISWSServicePortType), Authentification, 'doManifestTD', hmtRequest, False);
  InvRegistry.RegisterHeaderMethod(TypeInfo(ISWSServicePortType), Authentification, 'doManifestDD', hmtRequest, False);
  InvRegistry.RegisterHeaderMethod(TypeInfo(ISWSServicePortType), Authentification, 'getLabelTD', hmtRequest, False);
  InvRegistry.RegisterHeaderMethod(TypeInfo(ISWSServicePortType), Authentification, 'getLabelDD', hmtRequest, False);
  InvRegistry.RegisterHeaderMethod(TypeInfo(ISWSServicePortType), Authentification, 'bookPickup', hmtRequest, False);
  InvRegistry.RegisterHeaderMethod(TypeInfo(ISWSServicePortType), Authentification, 'cancelPickup', hmtRequest, False);
  InvRegistry.RegisterHeaderMethod(TypeInfo(ISWSServicePortType), Authentification, 'getExportDocTD', hmtRequest, False);
  InvRegistry.RegisterHeaderMethod(TypeInfo(ISWSServicePortType), Authentification, 'getExportDocDD', hmtRequest, False);
  InvRegistry.RegisterHeaderMethod(TypeInfo(ISWSServicePortType), Authentification, 'getManifestDD', hmtRequest, False);
  InvRegistry.RegisterHeaderMethod(TypeInfo(ISWSServicePortType), Authentification, 'updateShipmentDD', hmtRequest, False);

end.
  Mit Zitat antworten Zitat
Benutzerbild von Bernhard Geyer
Bernhard Geyer

Registriert seit: 13. Aug 2002
17.171 Beiträge
 
Delphi 10.4 Sydney
 
#2

AW: DHL-Webservice nutzen

  Alt 2. Nov 2015, 21:32
D7?Kannst du auch gegen eine neue Delphi-version prüfen? Altere Versionn winf nicht dafür bekannt problemlos zu funkionieren
Windows Vista - Eine neue Erfahrung in Fehlern.
  Mit Zitat antworten Zitat
CarstenH

Registriert seit: 18. Feb 2006
18 Beiträge
 
Delphi 7 Professional
 
#3

AW: DHL-Webservice nutzen

  Alt 2. Nov 2015, 21:41
2005 hat jemand für mich getestet, gleicher Befund.

carsten
  Mit Zitat antworten Zitat
Benutzerbild von Bernhard Geyer
Bernhard Geyer

Registriert seit: 13. Aug 2002
17.171 Beiträge
 
Delphi 10.4 Sydney
 
#4

AW: DHL-Webservice nutzen

  Alt 2. Nov 2015, 21:54
2005 kann man aber nicht mehr als neue Version bezeichnen. Afaike gab es erst später eine neuimplementierung der webservice-schnittstelle
Windows Vista - Eine neue Erfahrung in Fehlern.
  Mit Zitat antworten Zitat
CarstenH

Registriert seit: 18. Feb 2006
18 Beiträge
 
Delphi 7 Professional
 
#5

AW: DHL-Webservice nutzen

  Alt 2. Nov 2015, 22:33
Hat die vielleicht einer der Mitleser und könnte einmal

https://cig.dhl.de/cig-wsdls/com/dpd...d-api-1.0.wsdl

durchlaufen lassen?

Carsten
  Mit Zitat antworten Zitat
Bebe

Registriert seit: 3. Apr 2005
Ort: Berlin
104 Beiträge
 
Delphi 10.1 Berlin Professional
 
#6

AW: DHL-Webservice nutzen

  Alt 3. Nov 2015, 05:04
Moin,

habe es mit der neusten Delphi Version importiert.

Gruß
Matze
Angehängte Dateien
Dateityp: zip geschaeftskundenversand_api_1.zip (29,6 KB, 58x aufgerufen)
  Mit Zitat antworten Zitat
CarstenH

Registriert seit: 18. Feb 2006
18 Beiträge
 
Delphi 7 Professional
 
#7

AW: DHL-Webservice nutzen

  Alt 3. Nov 2015, 08:34
Das kompiliert nach ein paar formalen Anpassungen.
Nur mit SCOPEDENUMS kann Delphi 7 nichts anfangen. Hab die doppelten erstmal umbenannt, mir aber noch nicht weiter angeschaut, welche Konsequenzen das hat.

Besten Dank erstmal!

Carsten
  Mit Zitat antworten Zitat
CarstenH

Registriert seit: 18. Feb 2006
18 Beiträge
 
Delphi 7 Professional
 
#8

AW: DHL-Webservice nutzen

  Alt 11. Nov 2015, 16:52
Ich beiße mir an dem Thema weiter die Zähne aus. Habe jetzt die Testversion des neusten Delphi installiert. Dann hat mir jemand aus der DHL-C#-Demo ein Miniprogramm gebaut, das auch funktioniert. Ich hab Fiddler installiert, um zu schauen, was dort genau zum Server geht (im Bild unten die linke Seite). Hab dann versucht, das in Delphi umzusetzen, es kommt aber nur der rechts zu sehende Teil an.

Wie kann man sich dem problem nähern?

Carsten
Miniaturansicht angehängter Grafiken
ddrequ.png  
  Mit Zitat antworten Zitat
Benutzerbild von Sir Rufo
Sir Rufo

Registriert seit: 5. Jan 2005
Ort: Stadthagen
9.454 Beiträge
 
Delphi 10 Seattle Enterprise
 
#9

AW: DHL-Webservice nutzen

  Alt 11. Nov 2015, 17:04
Es gibt da Situationen, wo man einfach von Delphi über eine C#-DLL auf den SOAP-Service zugreift.

Da stellen sich erheblich schneller funktionierende Resultate ein.
Kaum macht man's richtig - schon funktioniert's
Zertifikat: Sir Rufo (Fingerprint: ‎ea 0a 4c 14 0d b6 3a a4 c1 c5 b9 dc 90 9d f0 e9 de 13 da 60)
  Mit Zitat antworten Zitat
CarstenH

Registriert seit: 18. Feb 2006
18 Beiträge
 
Delphi 7 Professional
 
#10

AW: DHL-Webservice nutzen

  Alt 11. Nov 2015, 17:22
Das hab ich auch schon überlegt...kann nur kein C# und hab eigentlich keine Lust mich extra dafür mit C# zu bewaffnen.

Carsten
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 1 von 3  1 23      

 

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 11:39 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