eFatura Hizli Bilişim

Delphi'de kod yazma ile ilgili sorularınızı bu foruma yazabilirsiniz.
Cevapla
MuhammedYasir
Üye
Mesajlar: 3
Kayıt: 01 Ağu 2013 02:57

eFatura Hizli Bilişim

Mesaj gönderen MuhammedYasir »

Merhaba arkadaşlar.
Hızlı Bilişimin efatura web servisini kullanırken bir noktaya takıldım:

Kod: Tümünü seç

CevapKontrol := Servis.SendApplicationResponse( ... )
Bu kodun içeriğini nasıl dolduracağım?
Servisin ilgili bölümlerinin kodlarıda şunlar:

Kod: Tümünü seç

// Fatura Red-Kabul
   function  SendApplicationResponse(
               const sendApplicationResponse: SendApplicationResponse2):
               ResponseMessage2; stdcall;

Kod: Tümünü seç

SendApplicationResponse2 = class(TRemotable)
  private
    FAppType: Integer;
    FAppType_Specified: boolean;
    FDocuments: ArrayOfApplicationReponseDocumentInfo;
    FDocuments_Specified: boolean;
    FResponseCode: string;
    FResponseCode_Specified: boolean;
    FResponseDescription: string;
    FResponseDescription_Specified: boolean;
    procedure SetAppType(Index: Integer; const AInteger: Integer);
    function  AppType_Specified(Index: Integer): boolean;
    procedure SetDocuments(Index: Integer; const AArrayOfApplicationReponseDocumentInfo: ArrayOfApplicationReponseDocumentInfo);
    function  Documents_Specified(Index: Integer): boolean;
    procedure SetResponseCode(Index: Integer; const Astring: string);
    function  ResponseCode_Specified(Index: Integer): boolean;
    procedure SetResponseDescription(Index: Integer; const Astring: string);
    function  ResponseDescription_Specified(Index: Integer): boolean;
  public
    destructor Destroy; override;
  published
    property AppType:             Integer                                Index (IS_OPTN) read FAppType write SetAppType stored AppType_Specified;
    property Documents:           ArrayOfApplicationReponseDocumentInfo  Index (IS_OPTN or IS_NLBL) read FDocuments write SetDocuments stored Documents_Specified;
    property ResponseCode:        string                                 Index (IS_OPTN or IS_NLBL) read FResponseCode write SetResponseCode stored ResponseCode_Specified;
    property ResponseDescription: string                                 Index (IS_OPTN or IS_NLBL) read FResponseDescription write SetResponseDescription stored ResponseDescription_Specified;
  end;
Servis Dokumanı https://econnect.hizliteknoloji.com.tr/ ... nguageId=1

Yardımcı olabilirseniz memnun olurum
En son MuhammedYasir tarafından 20 Nis 2021 11:41 tarihinde düzenlendi, toplamda 1 kere düzenlendi.
mkysoft
Kıdemli Üye
Mesajlar: 3103
Kayıt: 26 Ağu 2003 12:35
Konum: Berlin
İletişim:

Re: eFatura Hizli Bilişim

Mesaj gönderen mkysoft »

SendApplicationResponse2 tipinde bir nesne yaratarak servise gondermniz yeterli olmali.
MuhammedYasir
Üye
Mesajlar: 3
Kayıt: 01 Ağu 2013 02:57

Re: eFatura Hizli Bilişim

Mesaj gönderen MuhammedYasir »

mkysoft yazdı: 18 Nis 2021 03:43 SendApplicationResponse2 tipinde bir nesne yaratarak servise gondermniz yeterli olmali.
Cevabınız için teşekkür ederim.
Söylediğiniz şekilde yaptım:

Kod: Tümünü seç

procedure TFGelenler.BtnKabulClick(Sender: TObject);
Var
  Servis: IHizliService;
  CevapKontrol: ResponseMessage2;
  Talep: SendApplicationResponse2;
  Dokuman: ArrayOfApplicationReponseDocumentInfo;
  Tarih: TXSDateTime;
begin
  MemoLog.Lines.Clear;

  HTTPRIO1.HTTPWebNode.GetHTTPReqResp.UserName := DMHizli.FQHizliKULLANICI.AsString;
  HTTPRIO1.HTTPWebNode.GetHTTPReqResp.Password := DMHizli.FQHizliSIFRE.AsString;
  Servis := GetIHizliService(false, DMHizli.FQHizliSERVIS.AsString, HTTPRIO1);

  Tarih := TXSDateTime.Create;
  Tarih.AsDateTime := VTGonderilenlerIssueDate.AsDateTime;

  Setlength(Dokuman, 1);
  Dokuman[0] := ApplicationReponseDocumentInfo2.Create;

  Dokuman[0].DocumentDate := Tarih;
  Dokuman[0].DocumentId := VTGonderilenlerDocumentId.AsString;
  Dokuman[0].DocumentUUID := VTGonderilenlerEnvelopeUUID.AsString;

  Talep := SendApplicationResponse2.Create;
  Talep.AppType := 1;
  Talep.ResponseCode := 'RED';
  Talep.Documents := Dokuman;

  CevapKontrol := Servis.SendApplicationResponse(Talep);
 
end;
Lakin bir yerde hata yaptım sanırım, sonuç alamadım.

Kod: Tümünü seç

20:34:51 GÖNDERİLECEK XML KODLARI

<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<SOAP-ENV:Body>
		<SendApplicationResponse xmlns="http://tempuri.org/">
			<sendApplicationResponse>
				<AppType xmlns="http://schemas.datacontract.org/2004/07/HizliWebApp.Services">1</AppType>
				<Documents xmlns="http://schemas.datacontract.org/2004/07/HizliWebApp.Services">
					<ApplicationReponseDocumentInfo>
						<DocumentDate>2021-04-17T00:00:00.000+03:00</DocumentDate>
						<DocumentId>FAT2021000000020</DocumentId>
						<DocumentUUID>cbc0f541-179f-4833-bcb8-ac7cc9fa2469</DocumentUUID>
					</ApplicationReponseDocumentInfo>
				</Documents>
				<ResponseCode xmlns="http://schemas.datacontract.org/2004/07/HizliWebApp.Services">RED</ResponseCode>
			</sendApplicationResponse>
		</SendApplicationResponse>
	</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


20:34:51 CEVAP OLARAK GELEN XML KODLARI

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
	<s:Body>
		<SendApplicationResponseResponse xmlns="http://tempuri.org/">
			<SendApplicationResponseResult xmlns:a="http://schemas.datacontract.org/2004/07/HizliWebApp.Services" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
				<a:IsSucceeded>false</a:IsSucceeded>
				<a:Message>(SendApplicationResponse) Hata Detayı : System.NullReferenceException: Object reference not set to an instance of an object.&#xD;
   at HizliWebApp.DonusumIslemler.EFatura.InvoiceManager.UygulamaYanitiOlustur(String cevapkodu, String cevaptanım, String uuid, String faturano, String SenderIdentifier, Int32 EntegratorId, Int32 AppType, String Tur)&#xD;
   at HizliWebApp.DonusumIslemler.EFatura.InvoiceManager.SendApplicationResponseALL(Int32 Entegrator, SendApplicationResponseBody ARbody)</a:Message>
			</SendApplicationResponseResult>
		</SendApplicationResponseResponse>
	</s:Body>
</s:Envelope>


Acaba neyi gözden kaçırıyorum?
mkysoft
Kıdemli Üye
Mesajlar: 3103
Kayıt: 26 Ağu 2003 12:35
Konum: Berlin
İletişim:

Re: eFatura Hizli Bilişim

Mesaj gönderen mkysoft »

Karsi taraf size direk kendi hatasini donmus. Anlasilan pek saglikli bir servis degil. Deger atamasi yaptiginiz alan icin _Specified ile biten alana da atama yapmayi deneyin. Ayrica gonderdiginiz veriyi kontrol edin, xml olarak dogru gittiginden emin olun. Bunu enkolay requestcatcher.com uzerinden yapabilirsiniz. Servisi uc noktasi olarak requestcatcher.com uzerinden yaratacaginiz hesabin adresini girin (kullaniciadiniz.requestcatcher.com). Veri gonderimi yaptiginizda site uzerinde goreceksiniz.
MuhammedYasir
Üye
Mesajlar: 3
Kayıt: 01 Ağu 2013 02:57

Re: eFatura Hizli Bilişim

Mesaj gönderen MuhammedYasir »

Published bölümünde dört veri isteniyor, FAppType_Specified istenmiyor.

Kod: Tümünü seç

 published
    property AppType:             Integer                                Index (IS_OPTN) read FAppType write SetAppType stored AppType_Specified;
    property Documents:           ArrayOfApplicationReponseDocumentInfo  Index (IS_OPTN or IS_NLBL) read FDocuments write SetDocuments stored Documents_Specified;
    property ResponseCode:        string                                 Index (IS_OPTN or IS_NLBL) read FResponseCode write SetResponseCode stored ResponseCode_Specified;
    property ResponseDescription: string                                 Index (IS_OPTN or IS_NLBL) read FResponseDescription write SetResponseDescription stored ResponseDescription_Specified;
  end;
requestcatcher.com hiç bilmediğim bir yer ona da bakacağım, teşekkürler...
ertank
Kıdemli Üye
Mesajlar: 1650
Kayıt: 12 Eyl 2015 12:45

Re: eFatura Hizli Bilişim

Mesaj gönderen ertank »

MuhammedYasir yazdı: 18 Nis 2021 08:43 Acaba neyi gözden kaçırıyorum?
"ResponseDescription" değerini doldurmamışsınız. Bilgi göndermeyecek olsanız dahi boş metin bilgisi olarak doldurmanız gerekli sanıırım web servis çalışması için.
ertank
Kıdemli Üye
Mesajlar: 1650
Kayıt: 12 Eyl 2015 12:45

Re: eFatura Hizli Bilişim

Mesaj gönderen ertank »

Maalesef kullandığım bir özel entegratör değil.
Cevapla