SOAP WSDL Generate Code

FiscalizationServiceSoap / getSalesInvoices

ASP AutoIt C C (Unicode) C++ C++ (Unicode) C# DataFlex Delphi Foxpro Go Java Node.js Objective-C Perl PHP Extension PowerBuilder Powershell PureBasic Python CkPython Ruby SQL Server Swift TCL VB.NET VB6 VBScript Xojo
var
xml: HCkXml;
soapRequestBody: PWideChar;
endpoint: PWideChar;
soapAction: PWideChar;
contentType: PWideChar;
http: HCkHttp;
resp: HCkHttpResponse;
responseXml: HCkXml;
statusCode: Integer;
GetSalesInvoicesResponse_Id: PWideChar;
GetSalesInvoicesResponse_Version: PWideChar;
Header_UUID: PWideChar;
Header_RequestUUID: PWideChar;
Header_SendDateTime: PWideChar;
SalesInvoices_count: PWideChar;
SalesInvoice_FIC: PWideChar;
SalesInvoice_IIC: PWideChar;
SalesInvoice_InvNum: PWideChar;
SalesInvoice_TotPriceWoVAT: PWideChar;
SalesInvoice_TotVATAmt: PWideChar;
SalesInvoice_TotPrice: PWideChar;
Buyer_IDType: PWideChar;
Buyer_IDNum: PWideChar;
Buyer_Name: PWideChar;
Buyer_Address: PWideChar;
Buyer_Town: PWideChar;
Buyer_Country: PWideChar;
Currency_Code: PWideChar;
Currency_ExRate: PWideChar;
Currency_IsBuying: PWideChar;
Signature_Id: PWideChar;
SignedInfo_Id: PWideChar;
CanonicalizationMethod_Algorithm: PWideChar;
SignatureMethod_Algorithm: PWideChar;
HMACOutputLength: PWideChar;
Reference_Id: PWideChar;
Reference_URI: PWideChar;
Reference_Type: PWideChar;
Transform_Algorithm: PWideChar;
DigestMethod_Algorithm: PWideChar;
DigestValue: PWideChar;
SignatureValue: PWideChar;
KeyInfo_Id: PWideChar;
Object_Id: PWideChar;
Object_MimeType: PWideChar;
Object_Encoding: PWideChar;

begin
xml := CkXml_Create();
CkXml_putTag(xml,'soapenv:Envelope');
CkXml_AddAttribute(xml,'xmlns:soapenv','http://schemas.xmlsoap.org/soap/envelope/');
CkXml_AddAttribute(xml,'xmlns:fis','https://eFiskalizimi.tatime.gov.al/FiscalizationService');
CkXml_AddAttribute(xml,'xmlns:al','https://eFiskalizimi.tatime.gov.al/FiscalizationService/schema');
CkXml_AddAttribute(xml,'xmlns:ds','http://www.w3.org/2000/09/xmldsig#');
CkXml_UpdateChildContent(xml,'soapenv:Header','');
CkXml_UpdateAttrAt(xml,'soapenv:Body|al:GetSalesInvoicesRequest',True,'Id','Request');
CkXml_UpdateAttrAt(xml,'soapenv:Body|al:GetSalesInvoicesRequest',True,'Version','3');
CkXml_UpdateAttrAt(xml,'soapenv:Body|al:GetSalesInvoicesRequest|al:Header',True,'UUID','?');
CkXml_UpdateAttrAt(xml,'soapenv:Body|al:GetSalesInvoicesRequest|al:Header',True,'SendDateTime','?');
CkXml_UpdateAttrAt(xml,'soapenv:Body|al:GetSalesInvoicesRequest|al:Header',True,'Source','?');
CkXml_UpdateAttrAt(xml,'soapenv:Body|al:GetSalesInvoicesRequest|al:SalesInvoicesRequestBody',True,'IssueDate','?');
CkXml_UpdateAttrAt(xml,'soapenv:Body|al:GetSalesInvoicesRequest|al:SalesInvoicesRequestBody',True,'TypeOfInv','?');
CkXml_UpdateAttrAt(xml,'soapenv:Body|al:GetSalesInvoicesRequest|al:SalesInvoicesRequestBody',True,'Offset','?');
CkXml_UpdateAttrAt(xml,'soapenv:Body|al:GetSalesInvoicesRequest|ds:Signature',True,'Id','?');
CkXml_UpdateAttrAt(xml,'soapenv:Body|al:GetSalesInvoicesRequest|ds:Signature|ds:SignedInfo',True,'Id','?');
CkXml_UpdateAttrAt(xml,'soapenv:Body|al:GetSalesInvoicesRequest|ds:Signature|ds:SignedInfo|ds:CanonicalizationMethod',True,'Algorithm','?');
CkXml_UpdateAttrAt(xml,'soapenv:Body|al:GetSalesInvoicesRequest|ds:Signature|ds:SignedInfo|ds:SignatureMethod',True,'Algorithm','?');
CkXml_UpdateChildContent(xml,'soapenv:Body|al:GetSalesInvoicesRequest|ds:Signature|ds:SignedInfo|ds:SignatureMethod|ds:HMACOutputLength','integer');
CkXml_UpdateAttrAt(xml,'soapenv:Body|al:GetSalesInvoicesRequest|ds:Signature|ds:SignedInfo|ds:Reference',True,'Id','?');
CkXml_UpdateAttrAt(xml,'soapenv:Body|al:GetSalesInvoicesRequest|ds:Signature|ds:SignedInfo|ds:Reference',True,'URI','?');
CkXml_UpdateAttrAt(xml,'soapenv:Body|al:GetSalesInvoicesRequest|ds:Signature|ds:SignedInfo|ds:Reference',True,'Type','?');
CkXml_UpdateAttrAt(xml,'soapenv:Body|al:GetSalesInvoicesRequest|ds:Signature|ds:SignedInfo|ds:Reference|ds:Transforms|ds:Transform',True,'Algorithm','?');
CkXml_UpdateAttrAt(xml,'soapenv:Body|al:GetSalesInvoicesRequest|ds:Signature|ds:SignedInfo|ds:Reference|ds:DigestMethod',True,'Algorithm','?');
CkXml_UpdateChildContent(xml,'soapenv:Body|al:GetSalesInvoicesRequest|ds:Signature|ds:SignedInfo|ds:Reference|ds:DigestValue','BASE64_DATA');
CkXml_UpdateChildContent(xml,'soapenv:Body|al:GetSalesInvoicesRequest|ds:Signature|ds:SignatureValue','...');
CkXml_UpdateAttrAt(xml,'soapenv:Body|al:GetSalesInvoicesRequest|ds:Signature|ds:KeyInfo',True,'Id','?');
CkXml_UpdateAttrAt(xml,'soapenv:Body|al:GetSalesInvoicesRequest|ds:Signature|ds:Object',True,'Id','?');
CkXml_UpdateAttrAt(xml,'soapenv:Body|al:GetSalesInvoicesRequest|ds:Signature|ds:Object',True,'MimeType','?');
CkXml_UpdateAttrAt(xml,'soapenv:Body|al:GetSalesInvoicesRequest|ds:Signature|ds:Object',True,'Encoding','?');

// In a SOAP HTTP request, including the XML declaration (<?xml version="1.0" encoding="UTF-8"?>) in the XML body is generally not required. 
CkXml_putEmitXmlDecl(xml,False);
soapRequestBody := CkXml__getXml(xml);

endpoint := 'https://efiskalizimi.tatime.gov.al/FiscalizationService-v3';
soapAction := 'https://eFiskalizimi.tatime.gov.al/FiscalizationService/GetSalesInvoices';
//  For SOAP requests, the standard Content-Type is usually set to "text/xml" or "application/soap+xml"
contentType := 'text/xml';

http := CkHttp_Create();

CkHttp_ClearHeaders(http);
CkHttp_SetRequestHeader(http,'Content-Type',contentType);
CkHttp_SetRequestHeader(http,'SOAPAction',soapAction);

resp := CkHttp_PostXml(http,endpoint,soapRequestBody,'utf-8');
if (CkHttp_getLastMethodSuccess(http) = False) then
  begin
    Memo1.Lines.Add(CkHttp__lastErrorText(http));
    Memo1.Lines.Add('Failed to send SOAP request.');
    Exit;
  end;

// Get the XML response body.
responseXml := CkXml_Create();
CkHttpResponse_GetBodyXml(resp,responseXml);

statusCode := CkHttpResponse_getStatusCode(resp);
Memo1.Lines.Add('response status code: ' + IntToStr(statusCode));

CkHttpResponse_Dispose(resp);

// If the status code does not indicate succcess, then show the response XML,
// which probably contains error information.
if (statusCode <> 200) then
  begin
    Memo1.Lines.Add(CkXml__getXml(responseXml));
    Exit;
  end;

Memo1.Lines.Add(CkXml__getXml(responseXml));

// Parse the successful SOAP response XML.

// This is a sample of the response XML, but the namespace prefixes will be different.
// We can parse the result using "*" for the namespace prefixes (see below).

GetSalesInvoicesResponse_Id := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|(Id)');
GetSalesInvoicesResponse_Version := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|(Version)');
Header_UUID := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:Header|(UUID)');
Header_RequestUUID := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:Header|(RequestUUID)');
Header_SendDateTime := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:Header|(SendDateTime)');
SalesInvoices_count := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:SalesInvoices|(count)');
SalesInvoice_FIC := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:SalesInvoices|*:SalesInvoice|(FIC)');
SalesInvoice_IIC := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:SalesInvoices|*:SalesInvoice|(IIC)');
SalesInvoice_InvNum := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:SalesInvoices|*:SalesInvoice|(InvNum)');
SalesInvoice_TotPriceWoVAT := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:SalesInvoices|*:SalesInvoice|(TotPriceWoVAT)');
SalesInvoice_TotVATAmt := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:SalesInvoices|*:SalesInvoice|(TotVATAmt)');
SalesInvoice_TotPrice := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:SalesInvoices|*:SalesInvoice|(TotPrice)');
Buyer_IDType := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:SalesInvoices|*:SalesInvoice|*:Buyer|(IDType)');
Buyer_IDNum := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:SalesInvoices|*:SalesInvoice|*:Buyer|(IDNum)');
Buyer_Name := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:SalesInvoices|*:SalesInvoice|*:Buyer|(Name)');
Buyer_Address := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:SalesInvoices|*:SalesInvoice|*:Buyer|(Address)');
Buyer_Town := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:SalesInvoices|*:SalesInvoice|*:Buyer|(Town)');
Buyer_Country := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:SalesInvoices|*:SalesInvoice|*:Buyer|(Country)');
Currency_Code := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:SalesInvoices|*:SalesInvoice|*:Currency|(Code)');
Currency_ExRate := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:SalesInvoices|*:SalesInvoice|*:Currency|(ExRate)');
Currency_IsBuying := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:SalesInvoices|*:SalesInvoice|*:Currency|(IsBuying)');
Signature_Id := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:Signature|(Id)');
SignedInfo_Id := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:Signature|*:SignedInfo|(Id)');
CanonicalizationMethod_Algorithm := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:Signature|*:SignedInfo|*:CanonicalizationMethod|(Algorithm)');
SignatureMethod_Algorithm := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:Signature|*:SignedInfo|*:SignatureMethod|(Algorithm)');
HMACOutputLength := CkXml__getChildContent(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:Signature|*:SignedInfo|*:SignatureMethod|*:HMACOutputLength');
Reference_Id := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:Signature|*:SignedInfo|*:Reference|(Id)');
Reference_URI := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:Signature|*:SignedInfo|*:Reference|(URI)');
Reference_Type := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:Signature|*:SignedInfo|*:Reference|(Type)');
Transform_Algorithm := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:Signature|*:SignedInfo|*:Reference|*:Transforms|*:Transform|(Algorithm)');
DigestMethod_Algorithm := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:Signature|*:SignedInfo|*:Reference|*:DigestMethod|(Algorithm)');
DigestValue := CkXml__getChildContent(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:Signature|*:SignedInfo|*:Reference|*:DigestValue');
SignatureValue := CkXml__getChildContent(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:Signature|*:SignatureValue');
KeyInfo_Id := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:Signature|*:KeyInfo|(Id)');
Object_Id := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:Signature|*:Object|(Id)');
Object_MimeType := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:Signature|*:Object|(MimeType)');
Object_Encoding := CkXml__chilkatPath(responseXml,'*:Body|*:GetSalesInvoicesResponse|*:Signature|*:Object|(Encoding)');

CkXml_Dispose(xml);
CkHttp_Dispose(http);
CkXml_Dispose(responseXml);

Request XML
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:fis="https://eFiskalizimi.tatime.gov.al/FiscalizationService" xmlns:al="https://eFiskalizimi.tatime.gov.al/FiscalizationService/schema" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
    <soapenv:Header/>
    <soapenv:Body>
        <al:GetSalesInvoicesRequest Id="Request" Version="3">
            <al:Header UUID="?" SendDateTime="?" Source="?"/>
            <al:SalesInvoicesRequestBody IssueDate="?" TypeOfInv="?" Offset="?"/>
            <ds:Signature Id="?">
                <ds:SignedInfo Id="?">
                    <ds:CanonicalizationMethod Algorithm="?"/>
                    <ds:SignatureMethod Algorithm="?">
                        <ds:HMACOutputLength>integer</ds:HMACOutputLength>
                    </ds:SignatureMethod>
                    <ds:Reference Id="?" URI="?" Type="?">
                        <ds:Transforms>
                            <ds:Transform Algorithm="?"/>
                        </ds:Transforms>
                        <ds:DigestMethod Algorithm="?"/>
                        <ds:DigestValue>BASE64_DATA</ds:DigestValue>
                    </ds:Reference>
                </ds:SignedInfo>
                <ds:SignatureValue>...</ds:SignatureValue>
                <ds:KeyInfo Id="?"/>
                <ds:Object Id="?" MimeType="?" Encoding="?"/>
            </ds:Signature>
        </al:GetSalesInvoicesRequest>
    </soapenv:Body>
</soapenv:Envelope>
Response XML
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:fis="https://eFiskalizimi.tatime.gov.al/FiscalizationService" xmlns:al="https://eFiskalizimi.tatime.gov.al/FiscalizationService/schema" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
    <soapenv:Header/>
    <soapenv:Body>
        <al:GetSalesInvoicesResponse Id="Response" Version="3">
            <al:Header UUID="?" RequestUUID="?" SendDateTime="?"/>
            <al:SalesInvoices count="?">
                <al:SalesInvoice FIC="?" IIC="?" InvNum="?" TotPriceWoVAT="?" TotVATAmt="?" TotPrice="?">
                    <al:Buyer IDType="?" IDNum="?" Name="?" Address="?" Town="?" Country="?"/>
                    <al:Currency Code="?" ExRate="?" IsBuying="?"/>
                </al:SalesInvoice>
            </al:SalesInvoices>
            <ds:Signature Id="?">
                <ds:SignedInfo Id="?">
                    <ds:CanonicalizationMethod Algorithm="?"/>
                    <ds:SignatureMethod Algorithm="?">
                        <ds:HMACOutputLength>integer</ds:HMACOutputLength>
                    </ds:SignatureMethod>
                    <ds:Reference Id="?" URI="?" Type="?">
                        <ds:Transforms>
                            <ds:Transform Algorithm="?"/>
                        </ds:Transforms>
                        <ds:DigestMethod Algorithm="?"/>
                        <ds:DigestValue>BASE64_DATA</ds:DigestValue>
                    </ds:Reference>
                </ds:SignedInfo>
                <ds:SignatureValue>...</ds:SignatureValue>
                <ds:KeyInfo Id="?"/>
                <ds:Object Id="?" MimeType="?" Encoding="?"/>
            </ds:Signature>
        </al:GetSalesInvoicesResponse>
    </soapenv:Body>
</soapenv:Envelope>