E-Nadawca i API Poczty Polskiej - pobranie historii nadanej przesyłki

0

Rejestracja: 42 minuty temu
Ostatnio: 51 sekund temu
Postów: 1

witam wszystkich serdecznie. Nie jestem specjalista w Delphi. Ciągle jeszcze się uczę. Chciałbym pobierac historie na temat przesyłki.
Od kilku dni próbuje podpiąć się Pod API poczty. Niestety ciągle mi cos nie wychodzi. Połaczenie testowe zwraca OK. Jednak wpisanie nr listu przewozowego nie przynosi odpowiedzi. Co ciekawe pole do wpisywania listu jest typu Integer a nr przesyłki wyglada mniej wiecej tak
00159007738000100641 - pozmieniałem niektóre cyfry na zero. Stanowczo to nie da sie zamienic na integer. Jak wpisze tam nr typu 284680 to dostaje OK i getEnvelopeContentFull.
Bardzo prosze o pomoc

httprio2 ma nast ustawienia
port ENSoap
service ElektronicznyNadawca
WSDLLocation https://e-nadawca.poczta-polska.pl/websrv/en.wsdl

Pod x-pressa (firma kurierska) podpiąlem się bez problemu

procedure TForm1.ButtonPobierzListyPrzewozowePocztaClick(Sender: TObject);
   var
E: elektronicznynadawca;
tmp:getEnvelopeContentFull;
inp: hello;
karta:getkarty;
kartaakt:setAktywnaKarta;
bufor1:bufortype;
nrguid:getguid;
session : getEnvelopeContentFullResponse;
 
begin
 
inp := hello.Create;
try
E:=(httprio2 as elektronicznynadawca);
inp.in_:='test';
karta:=getkarty.Create;
kartaakt:=setAktywnaKarta.Create;
ButtonPobierzListyPrzewozowePoczta.Caption:=inttostr( kartaakt.idKarta);     //ok daje zero
bufor1:=bufortype.Create;
bufor1.active:=true;
 
 
 
tmp := getEnvelopeContentFull.Create;
tmp.idEnvelope := strtoint(EditNrListuPrzewozowego.Text) ;
 
E.getEnvelopeContentFull(tmp);
 
 
 
ShowMessage('OK: '  + tmp.ToString+ #13#10)
except on E:exception do ShowMessage( e.Message+' not OK');
end;
 
inp.Free;
 
end;
2
DOKUMENTACJA napisał(a)

getEnvelopeContentFull
Metoda pozwalająca pobrać informacje zwrotne o nadanych przesyłkach w wersji pełnej. Parametrem wejściowym jest idEnvelope zwracane przez metodę sendEnvelope.

jak chcesz tylko śledzić to masz opis i WSDLa

I może na przyszłość zacznij od czytania dokumentacji

0

Dziekuje bardzo za informacje.
Wlasnie z tej metody probuje skorzystac. Czy bylbys tak uprzejmy i napisal mi jak dokladnie mam to zrobic(kilka linijek kodu)...moje umiejetnosci jeszcze na to nie pozwalaja. Z gory dziekuje za poswiecony czas.

0

ale co zrobić? Jak chcesz znaleźć przesyłkę po jej numerze a nie ID to musisz po prostu skorzystać z całkiem innego serwisu (ten, który podałem) w taki sam sposób jak próbujesz teraz (wygenerować WSDLa i wywołać odpowiednią metodę - sprawdzPrzesylke(String numer)) a jak po numerze ID to musisz podać numer ID a nie numer przesyłki

0

a czy mozna podajac numer przesylki dostac nr id i nastepnie zapytac o nr przesyłki?

Idąc za rada skorzystalem z serwisu sledzenie ale tu dla odmiany dostaje zwrotke "com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [1,0]". Chyba cos z autentykacją nie tak. Ustawilem tak jak znalazlem na stronie http://www.poczta-polska.pl/webservices/

tylko nie wiem jak ustawic UsernameToken Authentication. Pomozesz?

3

dobra.

kod przycisku - pobranie danych paczki (testp0 to numer paczki, która zawsze zwraca OK)

procedure TfrmMain.btn1Click(Sender: TObject);
var
  s: SledzeniePortType;
  p: Przesylka;
begin
  s := GetSledzeniePortType(False, '', htpr1);
  p := s.sprawdzPrzesylkePl('testp0');
  ShowMessage(IntToString(p.status));
end;

kod THTTPRIO BeforeExecute - dodanie nagłówka Security

procedure TfrmMain.htpr1BeforeExecute(const MethodName: string;
  SOAPRequest: TStream);
var
  xml: IXMLDocument;
  n1, n2: IXMLNode;
begin
  SOAPRequest.Position := 0;
  xml := TXMLDocument.Create(Application);
  xml.LoadFromStream(SOAPRequest);
  n1 := xml.ChildNodes.FindNode('SOAP-ENV:Envelope');
  if n1 <> nil then
  begin
    n1 := n1.AddChild('SOAP-ENV:Header', 0);
    n1 := n1.AddChild('wsse:Security');
    n1.Attributes['SOAP-ENV:mustUnderstand'] := '1';
    n1.Attributes['xmlns:wsse'] := 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';
    n1 := n1.AddChild('wsse:UsernameToken');
    n1.Attributes['xmlns:wsu'] := 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd';
    n2 := n1.AddChild('wsse:Username');
    n2.Text := 'sledzeniepp';
    n2 := n1.AddChild('wsse:Password');
    n2.Attributes['Type'] := 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText';
    n2.Text := 'PPSA';
  end;
  SOAPRequest.Position := 0;
  xml.SaveToStream(SOAPRequest);
end;

import wykonany w D XE7

// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL     : https://tt.poczta-polska.pl/Sledzenie/services/Sledzenie?wsdl
//  >Import : https://tt.poczta-polska.pl/Sledzenie/services/Sledzenie?wsdl>0
//  >Import : https://tt.poczta-polska.pl/Sledzenie/services/Sledzenie?wsdl>1
// Encoding : UTF-8
// Version  : 1.0
// (18.11.2015 16:30:16 - - $Rev: 69934 $)
// ************************************************************************ //

unit Sledzenie;

interface

uses Soap.InvokeRegistry, Soap.SOAPHTTPClient, System.Types, Soap.XSBuiltIns;

const
  IS_OPTN = $0001;
  IS_UNBD = $0002;
  IS_NLBL = $0004;
  IS_REF  = $0080;


type
  // ************************************************************************ //
  // The following types, referred to in the WSDL document are not being represented
  // in this file. They are either aliases[@] of other types represented or were referred
  // to but never[!] declared in the document. The types from the latter category
  // typically map to predefined/known XML or Embarcadero types; however, they could also 
  // indicate incorrect WSDL documents that failed to declare or import a schema type.
  // ************************************************************************ //
  // !:boolean         - "http://www.w3.org/2001/XMLSchema"[Gbl]
  // !:string          - "http://www.w3.org/2001/XMLSchema"[Gbl]
  // !:date            - "http://www.w3.org/2001/XMLSchema"[Gbl]
  // !:float           - "http://www.w3.org/2001/XMLSchema"[Gbl]
  // !:int             - "http://www.w3.org/2001/XMLSchema"[Gbl]

  GodzinyPracy         = class;                 { "http://ws.sledzenie.pocztapolska.pl/xsd"[GblCplx] }
  Jednostka            = class;                 { "http://ws.sledzenie.pocztapolska.pl/xsd"[GblCplx] }
  Zdarzenie            = class;                 { "http://ws.sledzenie.pocztapolska.pl/xsd"[GblCplx] }
  GodzinyZUwagami      = class;                 { "http://ws.sledzenie.pocztapolska.pl/xsd"[GblCplx] }
  Przyczyna            = class;                 { "http://ws.sledzenie.pocztapolska.pl/xsd"[GblCplx] }
  SzczDaneJednostki    = class;                 { "http://ws.sledzenie.pocztapolska.pl/xsd"[GblCplx] }
  Komunikat            = class;                 { "http://ws.sledzenie.pocztapolska.pl/xsd"[GblCplx] }
  Przesylka            = class;                 { "http://ws.sledzenie.pocztapolska.pl/xsd"[GblCplx] }
  DanePrzesylki        = class;                 { "http://ws.sledzenie.pocztapolska.pl/xsd"[GblCplx] }

  ListaZdarzen = array of Zdarzenie;            { "http://ws.sledzenie.pocztapolska.pl/xsd"[GblCplx] }


  // ************************************************************************ //
  // XML       : GodzinyPracy, global, <complexType>
  // Namespace : http://ws.sledzenie.pocztapolska.pl/xsd
  // ************************************************************************ //
  GodzinyPracy = class(TRemotable)
  private
    FdniRobocze: GodzinyZUwagami;
    FdniRobocze_Specified: boolean;
    FniedzISw: GodzinyZUwagami;
    FniedzISw_Specified: boolean;
    Fsoboty: GodzinyZUwagami;
    Fsoboty_Specified: boolean;
    procedure SetdniRobocze(Index: Integer; const AGodzinyZUwagami: GodzinyZUwagami);
    function  dniRobocze_Specified(Index: Integer): boolean;
    procedure SetniedzISw(Index: Integer; const AGodzinyZUwagami: GodzinyZUwagami);
    function  niedzISw_Specified(Index: Integer): boolean;
    procedure Setsoboty(Index: Integer; const AGodzinyZUwagami: GodzinyZUwagami);
    function  soboty_Specified(Index: Integer): boolean;
  public
    destructor Destroy; override;
  published
    property dniRobocze: GodzinyZUwagami  Index (IS_OPTN or IS_NLBL) read FdniRobocze write SetdniRobocze stored dniRobocze_Specified;
    property niedzISw:   GodzinyZUwagami  Index (IS_OPTN or IS_NLBL) read FniedzISw write SetniedzISw stored niedzISw_Specified;
    property soboty:     GodzinyZUwagami  Index (IS_OPTN or IS_NLBL) read Fsoboty write Setsoboty stored soboty_Specified;
  end;

  ListaPrzesylek = array of Przesylka;          { "http://ws.sledzenie.pocztapolska.pl/xsd"[GblCplx] }


  // ************************************************************************ //
  // XML       : Jednostka, global, <complexType>
  // Namespace : http://ws.sledzenie.pocztapolska.pl/xsd
  // ************************************************************************ //
  Jednostka = class(TRemotable)
  private
    FdaneSzczegolowe: SzczDaneJednostki;
    FdaneSzczegolowe_Specified: boolean;
    Fnazwa: string;
    Fnazwa_Specified: boolean;
    procedure SetdaneSzczegolowe(Index: Integer; const ASzczDaneJednostki: SzczDaneJednostki);
    function  daneSzczegolowe_Specified(Index: Integer): boolean;
    procedure Setnazwa(Index: Integer; const Astring: string);
    function  nazwa_Specified(Index: Integer): boolean;
  public
    destructor Destroy; override;
  published
    property daneSzczegolowe: SzczDaneJednostki  Index (IS_OPTN or IS_NLBL) read FdaneSzczegolowe write SetdaneSzczegolowe stored daneSzczegolowe_Specified;
    property nazwa:           string             Index (IS_OPTN or IS_NLBL) read Fnazwa write Setnazwa stored nazwa_Specified;
  end;



  // ************************************************************************ //
  // XML       : Zdarzenie, global, <complexType>
  // Namespace : http://ws.sledzenie.pocztapolska.pl/xsd
  // ************************************************************************ //
  Zdarzenie = class(TRemotable)
  private
    Fczas: string;
    Fczas_Specified: boolean;
    Fjednostka: Jednostka;
    Fjednostka_Specified: boolean;
    Fkod: string;
    Fkod_Specified: boolean;
    Fkonczace: Boolean;
    Fkonczace_Specified: boolean;
    Fnazwa: string;
    Fnazwa_Specified: boolean;
    Fprzyczyna: Przyczyna;
    Fprzyczyna_Specified: boolean;
    procedure Setczas(Index: Integer; const Astring: string);
    function  czas_Specified(Index: Integer): boolean;
    procedure Setjednostka(Index: Integer; const AJednostka: Jednostka);
    function  jednostka_Specified(Index: Integer): boolean;
    procedure Setkod(Index: Integer; const Astring: string);
    function  kod_Specified(Index: Integer): boolean;
    procedure Setkonczace(Index: Integer; const ABoolean: Boolean);
    function  konczace_Specified(Index: Integer): boolean;
    procedure Setnazwa(Index: Integer; const Astring: string);
    function  nazwa_Specified(Index: Integer): boolean;
    procedure Setprzyczyna(Index: Integer; const APrzyczyna: Przyczyna);
    function  przyczyna_Specified(Index: Integer): boolean;
  public
    destructor Destroy; override;
  published
    property czas:      string     Index (IS_OPTN or IS_NLBL) read Fczas write Setczas stored czas_Specified;
    property jednostka: Jednostka  Index (IS_OPTN or IS_NLBL) read Fjednostka write Setjednostka stored jednostka_Specified;
    property kod:       string     Index (IS_OPTN or IS_NLBL) read Fkod write Setkod stored kod_Specified;
    property konczace:  Boolean    Index (IS_OPTN) read Fkonczace write Setkonczace stored konczace_Specified;
    property nazwa:     string     Index (IS_OPTN or IS_NLBL) read Fnazwa write Setnazwa stored nazwa_Specified;
    property przyczyna: Przyczyna  Index (IS_OPTN or IS_NLBL) read Fprzyczyna write Setprzyczyna stored przyczyna_Specified;
  end;



  // ************************************************************************ //
  // XML       : GodzinyZUwagami, global, <complexType>
  // Namespace : http://ws.sledzenie.pocztapolska.pl/xsd
  // ************************************************************************ //
  GodzinyZUwagami = class(TRemotable)
  private
    Fgodziny: string;
    Fgodziny_Specified: boolean;
    Fuwagi: string;
    Fuwagi_Specified: boolean;
    procedure Setgodziny(Index: Integer; const Astring: string);
    function  godziny_Specified(Index: Integer): boolean;
    procedure Setuwagi(Index: Integer; const Astring: string);
    function  uwagi_Specified(Index: Integer): boolean;
  published
    property godziny: string  Index (IS_OPTN or IS_NLBL) read Fgodziny write Setgodziny stored godziny_Specified;
    property uwagi:   string  Index (IS_OPTN or IS_NLBL) read Fuwagi write Setuwagi stored uwagi_Specified;
  end;



  // ************************************************************************ //
  // XML       : Przyczyna, global, <complexType>
  // Namespace : http://ws.sledzenie.pocztapolska.pl/xsd
  // ************************************************************************ //
  Przyczyna = class(TRemotable)
  private
    Fkod: string;
    Fkod_Specified: boolean;
    Fnazwa: string;
    Fnazwa_Specified: boolean;
    procedure Setkod(Index: Integer; const Astring: string);
    function  kod_Specified(Index: Integer): boolean;
    procedure Setnazwa(Index: Integer; const Astring: string);
    function  nazwa_Specified(Index: Integer): boolean;
  published
    property kod:   string  Index (IS_OPTN or IS_NLBL) read Fkod write Setkod stored kod_Specified;
    property nazwa: string  Index (IS_OPTN or IS_NLBL) read Fnazwa write Setnazwa stored nazwa_Specified;
  end;

  sprawdzPrzesylki = array of string;           { "http://sledzenie.pocztapolska.pl"[Lit][GblElm] }


  // ************************************************************************ //
  // XML       : SzczDaneJednostki, global, <complexType>
  // Namespace : http://ws.sledzenie.pocztapolska.pl/xsd
  // ************************************************************************ //
  SzczDaneJednostki = class(TRemotable)
  private
    FdlGeogr: Single;
    FdlGeogr_Specified: boolean;
    FgodzinyPracy: GodzinyPracy;
    FgodzinyPracy_Specified: boolean;
    Fmiejscowosc: string;
    Fmiejscowosc_Specified: boolean;
    FnrDomu: string;
    FnrDomu_Specified: boolean;
    FnrLokalu: string;
    FnrLokalu_Specified: boolean;
    Fpna: string;
    Fpna_Specified: boolean;
    FszerGeogr: Single;
    FszerGeogr_Specified: boolean;
    Fulica: string;
    Fulica_Specified: boolean;
    procedure SetdlGeogr(Index: Integer; const ASingle: Single);
    function  dlGeogr_Specified(Index: Integer): boolean;
    procedure SetgodzinyPracy(Index: Integer; const AGodzinyPracy: GodzinyPracy);
    function  godzinyPracy_Specified(Index: Integer): boolean;
    procedure Setmiejscowosc(Index: Integer; const Astring: string);
    function  miejscowosc_Specified(Index: Integer): boolean;
    procedure SetnrDomu(Index: Integer; const Astring: string);
    function  nrDomu_Specified(Index: Integer): boolean;
    procedure SetnrLokalu(Index: Integer; const Astring: string);
    function  nrLokalu_Specified(Index: Integer): boolean;
    procedure Setpna(Index: Integer; const Astring: string);
    function  pna_Specified(Index: Integer): boolean;
    procedure SetszerGeogr(Index: Integer; const ASingle: Single);
    function  szerGeogr_Specified(Index: Integer): boolean;
    procedure Setulica(Index: Integer; const Astring: string);
    function  ulica_Specified(Index: Integer): boolean;
  public
    destructor Destroy; override;
  published
    property dlGeogr:      Single        Index (IS_OPTN) read FdlGeogr write SetdlGeogr stored dlGeogr_Specified;
    property godzinyPracy: GodzinyPracy  Index (IS_OPTN or IS_NLBL) read FgodzinyPracy write SetgodzinyPracy stored godzinyPracy_Specified;
    property miejscowosc:  string        Index (IS_OPTN or IS_NLBL) read Fmiejscowosc write Setmiejscowosc stored miejscowosc_Specified;
    property nrDomu:       string        Index (IS_OPTN or IS_NLBL) read FnrDomu write SetnrDomu stored nrDomu_Specified;
    property nrLokalu:     string        Index (IS_OPTN or IS_NLBL) read FnrLokalu write SetnrLokalu stored nrLokalu_Specified;
    property pna:          string        Index (IS_OPTN or IS_NLBL) read Fpna write Setpna stored pna_Specified;
    property szerGeogr:    Single        Index (IS_OPTN) read FszerGeogr write SetszerGeogr stored szerGeogr_Specified;
    property ulica:        string        Index (IS_OPTN or IS_NLBL) read Fulica write Setulica stored ulica_Specified;
  end;



  // ************************************************************************ //
  // XML       : Komunikat, global, <complexType>
  // Namespace : http://ws.sledzenie.pocztapolska.pl/xsd
  // ************************************************************************ //
  Komunikat = class(TRemotable)
  private
    Fprzesylki: ListaPrzesylek;
    Fprzesylki_Specified: boolean;
    Fstatus: Integer;
    Fstatus_Specified: boolean;
    procedure Setprzesylki(Index: Integer; const AListaPrzesylek: ListaPrzesylek);
    function  przesylki_Specified(Index: Integer): boolean;
    procedure Setstatus(Index: Integer; const AInteger: Integer);
    function  status_Specified(Index: Integer): boolean;
  public
    destructor Destroy; override;
  published
    property przesylki: ListaPrzesylek  Index (IS_OPTN or IS_NLBL) read Fprzesylki write Setprzesylki stored przesylki_Specified;
    property status:    Integer         Index (IS_OPTN) read Fstatus write Setstatus stored status_Specified;
  end;



  // ************************************************************************ //
  // XML       : Przesylka, global, <complexType>
  // Namespace : http://ws.sledzenie.pocztapolska.pl/xsd
  // ************************************************************************ //
  Przesylka = class(TRemotable)
  private
    FdanePrzesylki: DanePrzesylki;
    FdanePrzesylki_Specified: boolean;
    Fnumer: string;
    Fnumer_Specified: boolean;
    Fstatus: Integer;
    Fstatus_Specified: boolean;
    procedure SetdanePrzesylki(Index: Integer; const ADanePrzesylki: DanePrzesylki);
    function  danePrzesylki_Specified(Index: Integer): boolean;
    procedure Setnumer(Index: Integer; const Astring: string);
    function  numer_Specified(Index: Integer): boolean;
    procedure Setstatus(Index: Integer; const AInteger: Integer);
    function  status_Specified(Index: Integer): boolean;
  public
    destructor Destroy; override;
  published
    property danePrzesylki: DanePrzesylki  Index (IS_OPTN or IS_NLBL) read FdanePrzesylki write SetdanePrzesylki stored danePrzesylki_Specified;
    property numer:         string         Index (IS_OPTN or IS_NLBL) read Fnumer write Setnumer stored numer_Specified;
    property status:        Integer        Index (IS_OPTN) read Fstatus write Setstatus stored status_Specified;
  end;



  // ************************************************************************ //
  // XML       : DanePrzesylki, global, <complexType>
  // Namespace : http://ws.sledzenie.pocztapolska.pl/xsd
  // ************************************************************************ //
  DanePrzesylki = class(TRemotable)
  private
    FdataNadania: TXSDate;
    FdataNadania_Specified: boolean;
    FkodKrajuNadania: string;
    FkodKrajuNadania_Specified: boolean;
    FkodKrajuPrzezn: string;
    FkodKrajuPrzezn_Specified: boolean;
    FkodRodzPrzes: string;
    FkodRodzPrzes_Specified: boolean;
    FkrajNadania: string;
    FkrajNadania_Specified: boolean;
    FkrajPrzezn: string;
    FkrajPrzezn_Specified: boolean;
    Fmasa: Single;
    Fmasa_Specified: boolean;
    Fnumer: string;
    Fnumer_Specified: boolean;
    FrodzPrzes: string;
    FrodzPrzes_Specified: boolean;
    FurzadNadania: Jednostka;
    FurzadNadania_Specified: boolean;
    FurzadPrzezn: Jednostka;
    FurzadPrzezn_Specified: boolean;
    FzakonczonoObsluge: Boolean;
    FzakonczonoObsluge_Specified: boolean;
    Fzdarzenia: ListaZdarzen;
    Fzdarzenia_Specified: boolean;
    procedure SetdataNadania(Index: Integer; const ATXSDate: TXSDate);
    function  dataNadania_Specified(Index: Integer): boolean;
    procedure SetkodKrajuNadania(Index: Integer; const Astring: string);
    function  kodKrajuNadania_Specified(Index: Integer): boolean;
    procedure SetkodKrajuPrzezn(Index: Integer; const Astring: string);
    function  kodKrajuPrzezn_Specified(Index: Integer): boolean;
    procedure SetkodRodzPrzes(Index: Integer; const Astring: string);
    function  kodRodzPrzes_Specified(Index: Integer): boolean;
    procedure SetkrajNadania(Index: Integer; const Astring: string);
    function  krajNadania_Specified(Index: Integer): boolean;
    procedure SetkrajPrzezn(Index: Integer; const Astring: string);
    function  krajPrzezn_Specified(Index: Integer): boolean;
    procedure Setmasa(Index: Integer; const ASingle: Single);
    function  masa_Specified(Index: Integer): boolean;
    procedure Setnumer(Index: Integer; const Astring: string);
    function  numer_Specified(Index: Integer): boolean;
    procedure SetrodzPrzes(Index: Integer; const Astring: string);
    function  rodzPrzes_Specified(Index: Integer): boolean;
    procedure SeturzadNadania(Index: Integer; const AJednostka: Jednostka);
    function  urzadNadania_Specified(Index: Integer): boolean;
    procedure SeturzadPrzezn(Index: Integer; const AJednostka: Jednostka);
    function  urzadPrzezn_Specified(Index: Integer): boolean;
    procedure SetzakonczonoObsluge(Index: Integer; const ABoolean: Boolean);
    function  zakonczonoObsluge_Specified(Index: Integer): boolean;
    procedure Setzdarzenia(Index: Integer; const AListaZdarzen: ListaZdarzen);
    function  zdarzenia_Specified(Index: Integer): boolean;
  public
    destructor Destroy; override;
  published
    property dataNadania:       TXSDate       Index (IS_OPTN or IS_NLBL) read FdataNadania write SetdataNadania stored dataNadania_Specified;
    property kodKrajuNadania:   string        Index (IS_OPTN or IS_NLBL) read FkodKrajuNadania write SetkodKrajuNadania stored kodKrajuNadania_Specified;
    property kodKrajuPrzezn:    string        Index (IS_OPTN or IS_NLBL) read FkodKrajuPrzezn write SetkodKrajuPrzezn stored kodKrajuPrzezn_Specified;
    property kodRodzPrzes:      string        Index (IS_OPTN or IS_NLBL) read FkodRodzPrzes write SetkodRodzPrzes stored kodRodzPrzes_Specified;
    property krajNadania:       string        Index (IS_OPTN or IS_NLBL) read FkrajNadania write SetkrajNadania stored krajNadania_Specified;
    property krajPrzezn:        string        Index (IS_OPTN or IS_NLBL) read FkrajPrzezn write SetkrajPrzezn stored krajPrzezn_Specified;
    property masa:              Single        Index (IS_OPTN or IS_NLBL) read Fmasa write Setmasa stored masa_Specified;
    property numer:             string        Index (IS_OPTN or IS_NLBL) read Fnumer write Setnumer stored numer_Specified;
    property rodzPrzes:         string        Index (IS_OPTN or IS_NLBL) read FrodzPrzes write SetrodzPrzes stored rodzPrzes_Specified;
    property urzadNadania:      Jednostka     Index (IS_OPTN or IS_NLBL) read FurzadNadania write SeturzadNadania stored urzadNadania_Specified;
    property urzadPrzezn:       Jednostka     Index (IS_OPTN or IS_NLBL) read FurzadPrzezn write SeturzadPrzezn stored urzadPrzezn_Specified;
    property zakonczonoObsluge: Boolean       Index (IS_OPTN) read FzakonczonoObsluge write SetzakonczonoObsluge stored zakonczonoObsluge_Specified;
    property zdarzenia:         ListaZdarzen  Index (IS_OPTN or IS_NLBL) read Fzdarzenia write Setzdarzenia stored zdarzenia_Specified;
  end;


  // ************************************************************************ //
  // Namespace : http://sledzenie.pocztapolska.pl
  // soapAction: urn:%operationName%
  // transport : http://schemas.xmlsoap.org/soap/http
  // style     : document
  // use       : literal
  // binding   : SledzenieSoap11Binding
  // service   : Sledzenie
  // port      : SledzenieHttpSoap11Endpoint
  // URL       : https://tt.poczta-polska.pl/Sledzenie/services/Sledzenie.SledzenieHttpSoap11Endpoint/
  // ************************************************************************ //
  SledzeniePortType = interface(IInvokable)
  ['{8C0B419F-11EA-387F-DE46-CA42E76E4747}']
    function  wersja: string; stdcall;
    function  sprawdzPrzesylkiPl(const numer: sprawdzPrzesylki): Komunikat; stdcall;
    function  sprawdzPrzesylkePl(const numer: string): Przesylka; stdcall;
    function  sprawdzPrzesylkiOdDo(const numer: sprawdzPrzesylki; const odDnia: string; const doDnia: string): Komunikat; stdcall;
    function  maksymalnaLiczbaPrzesylek: Integer; stdcall;
    function  sprawdzPrzesylke(const numer: string): Przesylka; stdcall;
    function  sprawdzPrzesylkiOdDoPl(const numer: sprawdzPrzesylki; const odDnia: string; const doDnia: string): Komunikat; stdcall;
    function  witaj(const imie: string): string; stdcall;
    function  sprawdzPrzesylki(const numer: sprawdzPrzesylki): Komunikat; stdcall;
  end;

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


implementation
  uses System.SysUtils;

function GetSledzeniePortType(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): SledzeniePortType;
const
  defWSDL = 'https://tt.poczta-polska.pl/Sledzenie/services/Sledzenie?wsdl';
  defURL  = 'https://tt.poczta-polska.pl/Sledzenie/services/Sledzenie.SledzenieHttpSoap11Endpoint/';
  defSvc  = 'Sledzenie';
  defPrt  = 'SledzenieHttpSoap11Endpoint';
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 SledzeniePortType);
    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;


destructor GodzinyPracy.Destroy;
begin
  System.SysUtils.FreeAndNil(FdniRobocze);
  System.SysUtils.FreeAndNil(FniedzISw);
  System.SysUtils.FreeAndNil(Fsoboty);
  inherited Destroy;
end;

procedure GodzinyPracy.SetdniRobocze(Index: Integer; const AGodzinyZUwagami: GodzinyZUwagami);
begin
  FdniRobocze := AGodzinyZUwagami;
  FdniRobocze_Specified := True;
end;

function GodzinyPracy.dniRobocze_Specified(Index: Integer): boolean;
begin
  Result := FdniRobocze_Specified;
end;

procedure GodzinyPracy.SetniedzISw(Index: Integer; const AGodzinyZUwagami: GodzinyZUwagami);
begin
  FniedzISw := AGodzinyZUwagami;
  FniedzISw_Specified := True;
end;

function GodzinyPracy.niedzISw_Specified(Index: Integer): boolean;
begin
  Result := FniedzISw_Specified;
end;

procedure GodzinyPracy.Setsoboty(Index: Integer; const AGodzinyZUwagami: GodzinyZUwagami);
begin
  Fsoboty := AGodzinyZUwagami;
  Fsoboty_Specified := True;
end;

function GodzinyPracy.soboty_Specified(Index: Integer): boolean;
begin
  Result := Fsoboty_Specified;
end;

destructor Jednostka.Destroy;
begin
  System.SysUtils.FreeAndNil(FdaneSzczegolowe);
  inherited Destroy;
end;

procedure Jednostka.SetdaneSzczegolowe(Index: Integer; const ASzczDaneJednostki: SzczDaneJednostki);
begin
  FdaneSzczegolowe := ASzczDaneJednostki;
  FdaneSzczegolowe_Specified := True;
end;

function Jednostka.daneSzczegolowe_Specified(Index: Integer): boolean;
begin
  Result := FdaneSzczegolowe_Specified;
end;

procedure Jednostka.Setnazwa(Index: Integer; const Astring: string);
begin
  Fnazwa := Astring;
  Fnazwa_Specified := True;
end;

function Jednostka.nazwa_Specified(Index: Integer): boolean;
begin
  Result := Fnazwa_Specified;
end;

destructor Zdarzenie.Destroy;
begin
  System.SysUtils.FreeAndNil(Fjednostka);
  System.SysUtils.FreeAndNil(Fprzyczyna);
  inherited Destroy;
end;

procedure Zdarzenie.Setczas(Index: Integer; const Astring: string);
begin
  Fczas := Astring;
  Fczas_Specified := True;
end;

function Zdarzenie.czas_Specified(Index: Integer): boolean;
begin
  Result := Fczas_Specified;
end;

procedure Zdarzenie.Setjednostka(Index: Integer; const AJednostka: Jednostka);
begin
  Fjednostka := AJednostka;
  Fjednostka_Specified := True;
end;

function Zdarzenie.jednostka_Specified(Index: Integer): boolean;
begin
  Result := Fjednostka_Specified;
end;

procedure Zdarzenie.Setkod(Index: Integer; const Astring: string);
begin
  Fkod := Astring;
  Fkod_Specified := True;
end;

function Zdarzenie.kod_Specified(Index: Integer): boolean;
begin
  Result := Fkod_Specified;
end;

procedure Zdarzenie.Setkonczace(Index: Integer; const ABoolean: Boolean);
begin
  Fkonczace := ABoolean;
  Fkonczace_Specified := True;
end;

function Zdarzenie.konczace_Specified(Index: Integer): boolean;
begin
  Result := Fkonczace_Specified;
end;

procedure Zdarzenie.Setnazwa(Index: Integer; const Astring: string);
begin
  Fnazwa := Astring;
  Fnazwa_Specified := True;
end;

function Zdarzenie.nazwa_Specified(Index: Integer): boolean;
begin
  Result := Fnazwa_Specified;
end;

procedure Zdarzenie.Setprzyczyna(Index: Integer; const APrzyczyna: Przyczyna);
begin
  Fprzyczyna := APrzyczyna;
  Fprzyczyna_Specified := True;
end;

function Zdarzenie.przyczyna_Specified(Index: Integer): boolean;
begin
  Result := Fprzyczyna_Specified;
end;

procedure GodzinyZUwagami.Setgodziny(Index: Integer; const Astring: string);
begin
  Fgodziny := Astring;
  Fgodziny_Specified := True;
end;

function GodzinyZUwagami.godziny_Specified(Index: Integer): boolean;
begin
  Result := Fgodziny_Specified;
end;

procedure GodzinyZUwagami.Setuwagi(Index: Integer; const Astring: string);
begin
  Fuwagi := Astring;
  Fuwagi_Specified := True;
end;

function GodzinyZUwagami.uwagi_Specified(Index: Integer): boolean;
begin
  Result := Fuwagi_Specified;
end;

procedure Przyczyna.Setkod(Index: Integer; const Astring: string);
begin
  Fkod := Astring;
  Fkod_Specified := True;
end;

function Przyczyna.kod_Specified(Index: Integer): boolean;
begin
  Result := Fkod_Specified;
end;

procedure Przyczyna.Setnazwa(Index: Integer; const Astring: string);
begin
  Fnazwa := Astring;
  Fnazwa_Specified := True;
end;

function Przyczyna.nazwa_Specified(Index: Integer): boolean;
begin
  Result := Fnazwa_Specified;
end;

destructor SzczDaneJednostki.Destroy;
begin
  System.SysUtils.FreeAndNil(FgodzinyPracy);
  inherited Destroy;
end;

procedure SzczDaneJednostki.SetdlGeogr(Index: Integer; const ASingle: Single);
begin
  FdlGeogr := ASingle;
  FdlGeogr_Specified := True;
end;

function SzczDaneJednostki.dlGeogr_Specified(Index: Integer): boolean;
begin
  Result := FdlGeogr_Specified;
end;

procedure SzczDaneJednostki.SetgodzinyPracy(Index: Integer; const AGodzinyPracy: GodzinyPracy);
begin
  FgodzinyPracy := AGodzinyPracy;
  FgodzinyPracy_Specified := True;
end;

function SzczDaneJednostki.godzinyPracy_Specified(Index: Integer): boolean;
begin
  Result := FgodzinyPracy_Specified;
end;

procedure SzczDaneJednostki.Setmiejscowosc(Index: Integer; const Astring: string);
begin
  Fmiejscowosc := Astring;
  Fmiejscowosc_Specified := True;
end;

function SzczDaneJednostki.miejscowosc_Specified(Index: Integer): boolean;
begin
  Result := Fmiejscowosc_Specified;
end;

procedure SzczDaneJednostki.SetnrDomu(Index: Integer; const Astring: string);
begin
  FnrDomu := Astring;
  FnrDomu_Specified := True;
end;

function SzczDaneJednostki.nrDomu_Specified(Index: Integer): boolean;
begin
  Result := FnrDomu_Specified;
end;

procedure SzczDaneJednostki.SetnrLokalu(Index: Integer; const Astring: string);
begin
  FnrLokalu := Astring;
  FnrLokalu_Specified := True;
end;

function SzczDaneJednostki.nrLokalu_Specified(Index: Integer): boolean;
begin
  Result := FnrLokalu_Specified;
end;

procedure SzczDaneJednostki.Setpna(Index: Integer; const Astring: string);
begin
  Fpna := Astring;
  Fpna_Specified := True;
end;

function SzczDaneJednostki.pna_Specified(Index: Integer): boolean;
begin
  Result := Fpna_Specified;
end;

procedure SzczDaneJednostki.SetszerGeogr(Index: Integer; const ASingle: Single);
begin
  FszerGeogr := ASingle;
  FszerGeogr_Specified := True;
end;

function SzczDaneJednostki.szerGeogr_Specified(Index: Integer): boolean;
begin
  Result := FszerGeogr_Specified;
end;

procedure SzczDaneJednostki.Setulica(Index: Integer; const Astring: string);
begin
  Fulica := Astring;
  Fulica_Specified := True;
end;

function SzczDaneJednostki.ulica_Specified(Index: Integer): boolean;
begin
  Result := Fulica_Specified;
end;

destructor Komunikat.Destroy;
var
  I: Integer;
begin
  for I := 0 to System.Length(Fprzesylki)-1 do
    System.SysUtils.FreeAndNil(Fprzesylki[I]);
  System.SetLength(Fprzesylki, 0);
  inherited Destroy;
end;

procedure Komunikat.Setprzesylki(Index: Integer; const AListaPrzesylek: ListaPrzesylek);
begin
  Fprzesylki := AListaPrzesylek;
  Fprzesylki_Specified := True;
end;

function Komunikat.przesylki_Specified(Index: Integer): boolean;
begin
  Result := Fprzesylki_Specified;
end;

procedure Komunikat.Setstatus(Index: Integer; const AInteger: Integer);
begin
  Fstatus := AInteger;
  Fstatus_Specified := True;
end;

function Komunikat.status_Specified(Index: Integer): boolean;
begin
  Result := Fstatus_Specified;
end;

destructor Przesylka.Destroy;
begin
  System.SysUtils.FreeAndNil(FdanePrzesylki);
  inherited Destroy;
end;

procedure Przesylka.SetdanePrzesylki(Index: Integer; const ADanePrzesylki: DanePrzesylki);
begin
  FdanePrzesylki := ADanePrzesylki;
  FdanePrzesylki_Specified := True;
end;

function Przesylka.danePrzesylki_Specified(Index: Integer): boolean;
begin
  Result := FdanePrzesylki_Specified;
end;

procedure Przesylka.Setnumer(Index: Integer; const Astring: string);
begin
  Fnumer := Astring;
  Fnumer_Specified := True;
end;

function Przesylka.numer_Specified(Index: Integer): boolean;
begin
  Result := Fnumer_Specified;
end;

procedure Przesylka.Setstatus(Index: Integer; const AInteger: Integer);
begin
  Fstatus := AInteger;
  Fstatus_Specified := True;
end;

function Przesylka.status_Specified(Index: Integer): boolean;
begin
  Result := Fstatus_Specified;
end;

destructor DanePrzesylki.Destroy;
var
  I: Integer;
begin
  for I := 0 to System.Length(Fzdarzenia)-1 do
    System.SysUtils.FreeAndNil(Fzdarzenia[I]);
  System.SetLength(Fzdarzenia, 0);
  System.SysUtils.FreeAndNil(FdataNadania);
  System.SysUtils.FreeAndNil(FurzadNadania);
  System.SysUtils.FreeAndNil(FurzadPrzezn);
  inherited Destroy;
end;

procedure DanePrzesylki.SetdataNadania(Index: Integer; const ATXSDate: TXSDate);
begin
  FdataNadania := ATXSDate;
  FdataNadania_Specified := True;
end;

function DanePrzesylki.dataNadania_Specified(Index: Integer): boolean;
begin
  Result := FdataNadania_Specified;
end;

procedure DanePrzesylki.SetkodKrajuNadania(Index: Integer; const Astring: string);
begin
  FkodKrajuNadania := Astring;
  FkodKrajuNadania_Specified := True;
end;

function DanePrzesylki.kodKrajuNadania_Specified(Index: Integer): boolean;
begin
  Result := FkodKrajuNadania_Specified;
end;

procedure DanePrzesylki.SetkodKrajuPrzezn(Index: Integer; const Astring: string);
begin
  FkodKrajuPrzezn := Astring;
  FkodKrajuPrzezn_Specified := True;
end;

function DanePrzesylki.kodKrajuPrzezn_Specified(Index: Integer): boolean;
begin
  Result := FkodKrajuPrzezn_Specified;
end;

procedure DanePrzesylki.SetkodRodzPrzes(Index: Integer; const Astring: string);
begin
  FkodRodzPrzes := Astring;
  FkodRodzPrzes_Specified := True;
end;

function DanePrzesylki.kodRodzPrzes_Specified(Index: Integer): boolean;
begin
  Result := FkodRodzPrzes_Specified;
end;

procedure DanePrzesylki.SetkrajNadania(Index: Integer; const Astring: string);
begin
  FkrajNadania := Astring;
  FkrajNadania_Specified := True;
end;

function DanePrzesylki.krajNadania_Specified(Index: Integer): boolean;
begin
  Result := FkrajNadania_Specified;
end;

procedure DanePrzesylki.SetkrajPrzezn(Index: Integer; const Astring: string);
begin
  FkrajPrzezn := Astring;
  FkrajPrzezn_Specified := True;
end;

function DanePrzesylki.krajPrzezn_Specified(Index: Integer): boolean;
begin
  Result := FkrajPrzezn_Specified;
end;

procedure DanePrzesylki.Setmasa(Index: Integer; const ASingle: Single);
begin
  Fmasa := ASingle;
  Fmasa_Specified := True;
end;

function DanePrzesylki.masa_Specified(Index: Integer): boolean;
begin
  Result := Fmasa_Specified;
end;

procedure DanePrzesylki.Setnumer(Index: Integer; const Astring: string);
begin
  Fnumer := Astring;
  Fnumer_Specified := True;
end;

function DanePrzesylki.numer_Specified(Index: Integer): boolean;
begin
  Result := Fnumer_Specified;
end;

procedure DanePrzesylki.SetrodzPrzes(Index: Integer; const Astring: string);
begin
  FrodzPrzes := Astring;
  FrodzPrzes_Specified := True;
end;

function DanePrzesylki.rodzPrzes_Specified(Index: Integer): boolean;
begin
  Result := FrodzPrzes_Specified;
end;

procedure DanePrzesylki.SeturzadNadania(Index: Integer; const AJednostka: Jednostka);
begin
  FurzadNadania := AJednostka;
  FurzadNadania_Specified := True;
end;

function DanePrzesylki.urzadNadania_Specified(Index: Integer): boolean;
begin
  Result := FurzadNadania_Specified;
end;

procedure DanePrzesylki.SeturzadPrzezn(Index: Integer; const AJednostka: Jednostka);
begin
  FurzadPrzezn := AJednostka;
  FurzadPrzezn_Specified := True;
end;

function DanePrzesylki.urzadPrzezn_Specified(Index: Integer): boolean;
begin
  Result := FurzadPrzezn_Specified;
end;

procedure DanePrzesylki.SetzakonczonoObsluge(Index: Integer; const ABoolean: Boolean);
begin
  FzakonczonoObsluge := ABoolean;
  FzakonczonoObsluge_Specified := True;
end;

function DanePrzesylki.zakonczonoObsluge_Specified(Index: Integer): boolean;
begin
  Result := FzakonczonoObsluge_Specified;
end;

procedure DanePrzesylki.Setzdarzenia(Index: Integer; const AListaZdarzen: ListaZdarzen);
begin
  Fzdarzenia := AListaZdarzen;
  Fzdarzenia_Specified := True;
end;

function DanePrzesylki.zdarzenia_Specified(Index: Integer): boolean;
begin
  Result := Fzdarzenia_Specified;
end;

initialization
  { SledzeniePortType }
  InvRegistry.RegisterInterface(TypeInfo(SledzeniePortType), 'http://sledzenie.pocztapolska.pl', 'UTF-8');
  InvRegistry.RegisterDefaultSOAPAction(TypeInfo(SledzeniePortType), 'urn:%operationName%');
  InvRegistry.RegisterInvokeOptions(TypeInfo(SledzeniePortType), ioDocument);
  { SledzeniePortType.wersja }
  InvRegistry.RegisterMethodInfo(TypeInfo(SledzeniePortType), 'wersja', '',
                                 '[ReturnName="return"]', IS_OPTN or IS_NLBL);
  InvRegistry.RegisterParamInfo(TypeInfo(SledzeniePortType), 'wersja', 'return', '',
                                '', IS_NLBL);
  { SledzeniePortType.sprawdzPrzesylkiPl }
  InvRegistry.RegisterMethodInfo(TypeInfo(SledzeniePortType), 'sprawdzPrzesylkiPl', '',
                                 '[ReturnName="return"]', IS_OPTN or IS_NLBL);
  InvRegistry.RegisterParamInfo(TypeInfo(SledzeniePortType), 'sprawdzPrzesylkiPl', 'numer', '',
                                '[ArrayItemName="numer"]', IS_UNBD or IS_NLBL);
  InvRegistry.RegisterParamInfo(TypeInfo(SledzeniePortType), 'sprawdzPrzesylkiPl', 'return', '',
                                '[Namespace="http://ws.sledzenie.pocztapolska.pl/xsd"]', IS_NLBL);
  { SledzeniePortType.sprawdzPrzesylkePl }
  InvRegistry.RegisterMethodInfo(TypeInfo(SledzeniePortType), 'sprawdzPrzesylkePl', '',
                                 '[ReturnName="return"]', IS_OPTN or IS_NLBL);
  InvRegistry.RegisterParamInfo(TypeInfo(SledzeniePortType), 'sprawdzPrzesylkePl', 'numer', '',
                                '', IS_NLBL);
  InvRegistry.RegisterParamInfo(TypeInfo(SledzeniePortType), 'sprawdzPrzesylkePl', 'return', '',
                                '[Namespace="http://ws.sledzenie.pocztapolska.pl/xsd"]', IS_NLBL);
  { SledzeniePortType.sprawdzPrzesylkiOdDo }
  InvRegistry.RegisterMethodInfo(TypeInfo(SledzeniePortType), 'sprawdzPrzesylkiOdDo', '',
                                 '[ReturnName="return"]', IS_OPTN or IS_NLBL);
  InvRegistry.RegisterParamInfo(TypeInfo(SledzeniePortType), 'sprawdzPrzesylkiOdDo', 'numer', '',
                                '[ArrayItemName="numer"]', IS_UNBD or IS_NLBL);
  InvRegistry.RegisterParamInfo(TypeInfo(SledzeniePortType), 'sprawdzPrzesylkiOdDo', 'odDnia', '',
                                '', IS_NLBL);
  InvRegistry.RegisterParamInfo(TypeInfo(SledzeniePortType), 'sprawdzPrzesylkiOdDo', 'doDnia', '',
                                '', IS_NLBL);
  InvRegistry.RegisterParamInfo(TypeInfo(SledzeniePortType), 'sprawdzPrzesylkiOdDo', 'return', '',
                                '[Namespace="http://ws.sledzenie.pocztapolska.pl/xsd"]', IS_NLBL);
  { SledzeniePortType.maksymalnaLiczbaPrzesylek }
  InvRegistry.RegisterMethodInfo(TypeInfo(SledzeniePortType), 'maksymalnaLiczbaPrzesylek', '',
                                 '[ReturnName="return"]', IS_OPTN);
  { SledzeniePortType.sprawdzPrzesylke }
  InvRegistry.RegisterMethodInfo(TypeInfo(SledzeniePortType), 'sprawdzPrzesylke', '',
                                 '[ReturnName="return"]', IS_OPTN or IS_NLBL);
  InvRegistry.RegisterParamInfo(TypeInfo(SledzeniePortType), 'sprawdzPrzesylke', 'numer', '',
                                '', IS_NLBL);
  InvRegistry.RegisterParamInfo(TypeInfo(SledzeniePortType), 'sprawdzPrzesylke', 'return', '',
                                '[Namespace="http://ws.sledzenie.pocztapolska.pl/xsd"]', IS_NLBL);
  { SledzeniePortType.sprawdzPrzesylkiOdDoPl }
  InvRegistry.RegisterMethodInfo(TypeInfo(SledzeniePortType), 'sprawdzPrzesylkiOdDoPl', '',
                                 '[ReturnName="return"]', IS_OPTN or IS_NLBL);
  InvRegistry.RegisterParamInfo(TypeInfo(SledzeniePortType), 'sprawdzPrzesylkiOdDoPl', 'numer', '',
                                '[ArrayItemName="numer"]', IS_UNBD or IS_NLBL);
  InvRegistry.RegisterParamInfo(TypeInfo(SledzeniePortType), 'sprawdzPrzesylkiOdDoPl', 'odDnia', '',
                                '', IS_NLBL);
  InvRegistry.RegisterParamInfo(TypeInfo(SledzeniePortType), 'sprawdzPrzesylkiOdDoPl', 'doDnia', '',
                                '', IS_NLBL);
  InvRegistry.RegisterParamInfo(TypeInfo(SledzeniePortType), 'sprawdzPrzesylkiOdDoPl', 'return', '',
                                '[Namespace="http://ws.sledzenie.pocztapolska.pl/xsd"]', IS_NLBL);
  { SledzeniePortType.witaj }
  InvRegistry.RegisterMethodInfo(TypeInfo(SledzeniePortType), 'witaj', '',
                                 '[ReturnName="return"]', IS_OPTN or IS_NLBL);
  InvRegistry.RegisterParamInfo(TypeInfo(SledzeniePortType), 'witaj', 'imie', '',
                                '', IS_NLBL);
  InvRegistry.RegisterParamInfo(TypeInfo(SledzeniePortType), 'witaj', 'return', '',
                                '', IS_NLBL);
  { SledzeniePortType.sprawdzPrzesylki }
  InvRegistry.RegisterMethodInfo(TypeInfo(SledzeniePortType), 'sprawdzPrzesylki', '',
                                 '[ReturnName="return"]', IS_OPTN or IS_NLBL);
  InvRegistry.RegisterParamInfo(TypeInfo(SledzeniePortType), 'sprawdzPrzesylki', 'numer', '',
                                '[ArrayItemName="numer"]', IS_UNBD or IS_NLBL);
  InvRegistry.RegisterParamInfo(TypeInfo(SledzeniePortType), 'sprawdzPrzesylki', 'return', '',
                                '[Namespace="http://ws.sledzenie.pocztapolska.pl/xsd"]', IS_NLBL);
  RemClassRegistry.RegisterXSInfo(TypeInfo(ListaZdarzen), 'http://ws.sledzenie.pocztapolska.pl/xsd', 'ListaZdarzen');
  RemClassRegistry.RegisterXSClass(GodzinyPracy, 'http://ws.sledzenie.pocztapolska.pl/xsd', 'GodzinyPracy');
  RemClassRegistry.RegisterXSInfo(TypeInfo(ListaPrzesylek), 'http://ws.sledzenie.pocztapolska.pl/xsd', 'ListaPrzesylek');
  RemClassRegistry.RegisterXSClass(Jednostka, 'http://ws.sledzenie.pocztapolska.pl/xsd', 'Jednostka');
  RemClassRegistry.RegisterXSClass(Zdarzenie, 'http://ws.sledzenie.pocztapolska.pl/xsd', 'Zdarzenie');
  RemClassRegistry.RegisterXSClass(GodzinyZUwagami, 'http://ws.sledzenie.pocztapolska.pl/xsd', 'GodzinyZUwagami');
  RemClassRegistry.RegisterXSClass(Przyczyna, 'http://ws.sledzenie.pocztapolska.pl/xsd', 'Przyczyna');
  RemClassRegistry.RegisterXSInfo(TypeInfo(sprawdzPrzesylki), 'http://sledzenie.pocztapolska.pl', 'sprawdzPrzesylki');
  RemClassRegistry.RegisterXSClass(SzczDaneJednostki, 'http://ws.sledzenie.pocztapolska.pl/xsd', 'SzczDaneJednostki');
  RemClassRegistry.RegisterXSClass(Komunikat, 'http://ws.sledzenie.pocztapolska.pl/xsd', 'Komunikat');
  RemClassRegistry.RegisterExternalPropName(TypeInfo(Komunikat), 'przesylki', '[ArrayItemName="przesylka"]');
  RemClassRegistry.RegisterXSClass(Przesylka, 'http://ws.sledzenie.pocztapolska.pl/xsd', 'Przesylka');
  RemClassRegistry.RegisterXSClass(DanePrzesylki, 'http://ws.sledzenie.pocztapolska.pl/xsd', 'DanePrzesylki');
  RemClassRegistry.RegisterExternalPropName(TypeInfo(DanePrzesylki), 'zdarzenia', '[ArrayItemName="zdarzenie"]');
end.

Gdzie się zgłosić po browara?

0

Zartujesz sobie ze mnie?. Jakiego browara? Człowieku masz u mnie duzego Jaska Wędrowniczka lub to tam sobie chcesz. Wyslij mi tylko adres.
Jestem Ci bardzo bardzo wdzieczny. Juz się poddałem. Jeszcze duzo nauki przede mna, ale korzystając z pomocy takich ludzi jak TY nie zginę.
WIELKIE DZIEKUJE!!!

0

Jeszce mi się przypomniało - przy dodawaniu nagłówka Security może niektórych dziwić to nieszczęsne 0 w tym miejscu n1 := n1.AddChild('SOAP-ENV:Header', 0);. Otóż okazuje się, że kolejność poszczególnych elementów w pliku XML, który wysyłamy do WS poczty jest WAŻNA! Jeśli dodamy ten element na końcu to przy próbie pobrania info o przesyłce serwis zwróci informację o niemożliwości poprawnego sparsowania dokumentu... A ja głupi zawsze myślałem, że w XMLu kolejność elementów nie ma znaczenia

1 użytkowników online, w tym zalogowanych: 0, gości: 1