Hello,
I tried to find solution to my problem in several places already including stackoverflow
When consuming a SOAP web service, response to a request comes in fine, but it is not populated in response object in code. I already provided details in above link. Let me know if they really need to be in this post, please.
I added all files needed to test my case. I did not provide username and password as they are irrelevant to my problem. Below is an example code to use provided units.
uses
EFinans.EArsivFatura;
procedure TForm1.Button1Click(Sender: TObject);
var
Input: TFaturaOlusturInput;
begin
// required before calling any EFinans.EArsivFatura procedure/function
EFinans.EArsivFatura.URLEArsivFatura := 'https://earsiv.efinans.com.tr/earsiv/ws/EarsivWebService';
EFinans.EArsivFatura.Username := 'someuser';
EFinans.EArsivFatura.Password := 'somepassword';
// preparing parameters
Input.donenBelgeFormati := Ord(TGelenBelgeFormatlari.gePDF);
Input.goruntuOlusturulsunMu := 1; // 0=hayır, 1=evet
Input.islemId := TGUID.NewGuid.ToString().Substring(1, 36).ToLower();
Input.vkn := '123456789';
Input.sube := '000000';
Input.kasa := '0000';
Input.numaraVerilsinMi := 0;
Input.faturaSeri := EmptyStr;
Input.sablonAdi := 'einvoice_efinans_15_06_04_3.xslt';
Input.erpKodu := 'ERP1';
Input.gzip := 1;
if not EFinans.EArsivFatura.AFaturaOlustur(Input, TGidenBelgeFormatlari.PDF, 'test.zip', 'test.pdf') then
begin
ShowMessage(EFinans.EArsivFatura.LastError);
Exit();
end;
end;
Above sample code will get you an error response from web service. That response will be saved in "response.xml" file in same directory as your EXE.
If you debug and put a break point in line 237 of EFinans.EArsivFatura.pas you should see that Response.return is nil. That is my problem. I have same problem in other methods, too. Just trying to see how I fix this single one now.
Thanks & regards,
Ertan
EarsivWebService1.pas
EFinans.EarsivFatura.Utils.pas
EFinans.EArsivFatura.pas
response.xml
test.zip