Does anyone have any example can use the wsdl file? I have an example of using webservice but the code is in php, and I have a serious problem with translating this to Delphi. If this helps, here is the code php
Does anyone have any example can use the wsdl file? I have an example of using webservice but the code is in php, and I have a serious problem with translating this to Delphi. If this helps, here is the code php
https://e-nadawca.poczta-polska.pl/download/webapi---ver.-angielska-do-v.5.0.0---01012014.zip
https://e-nadawca.poczta-polska.pl/download/webapi---ver.-angielska-do-v.5.0.0---01012014.zip
Well I import it, and write some procedure, but I've got problem with add packages to shipment. I connect correctly, add shipment correctly but when I try to add packagest to the shipment it returns errors
ReplyDeleteHere's some code:
procedure TForm6.Button1Click(Sender: TObject);
var
WS: elektronicznynadawca;
inp: hello;
paczka:addshipment;
moja:paczkapocztowaplustype;
q:string;
karta:getkarty;
kartaakt:setAktywnaKarta;
bufor:CreateEnvelopeBufor;
bufor1:bufortype;
adres:adrestype;
nrguid:getguid;
envelope:getenvelopestatus;
begin
inp := hello.Create;
try
q:='asd';
ws:=(httprio1 as elektronicznynadawca);
inp.in_:='test';
karta:=getkarty.Create;
kartaakt:=setAktywnaKarta.Create;
button1.Caption:=inttostr( kartaakt.idKarta); //ok daje zero
bufor1:=bufortype.Create;
bufor1.active:=true;
paczka:=addshipment.Create;
adres:=adrestype.Create;
adres.nazwa:='a';
adres.ulica:='poiuytr';
moja:=paczkapocztowaplustype.Create;
moja.posteRestante:=true;// Boolean;
moja.kategoria:= kategoriaType(0);
moja.adres:=adres;
ws.addShipment(paczka);
ShowMessage('OK: ' + inp.ToString + #13#10)
except on E:exception do ShowMessage( ' not OK');
end;
inp.Free;
end;
Why don't you at least tell us which errors you are receiving?
ReplyDeleteAt that code above I've got: unrecognized header. When I delete line "e.addshipment(tmp)" its show message "OK", but when I want to use some "get" command its receiving "unable to connect".
ReplyDelete