SOAP WSDL Generate Code

FiscalizationServiceSoap / registerTI

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
#import <CkoXml.h>
#import <NSString.h>
#import <CkoHttp.h>
#import <CkoHttpResponse.h>

CkoXml *xml = [[CkoXml alloc] init];
xml.Tag = @"soapenv:Envelope";
[xml AddAttribute: @"xmlns:soapenv" value: @"http://schemas.xmlsoap.org/soap/envelope/"];
[xml AddAttribute: @"xmlns:fis" value: @"https://eFiskalizimi.tatime.gov.al/FiscalizationService"];
[xml AddAttribute: @"xmlns:al" value: @"https://eFiskalizimi.tatime.gov.al/FiscalizationService/schema"];
[xml AddAttribute: @"xmlns:ds" value: @"http://www.w3.org/2000/09/xmldsig#"];
[xml UpdateChildContent: @"soapenv:Header" value: @""];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest" autoCreate: YES attrName: @"Id" attrValue: @"Request"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest" autoCreate: YES attrName: @"Version" attrValue: @"3"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest" autoCreate: YES attrName: @"Source" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:Header" autoCreate: YES attrName: @"UUID" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:Header" autoCreate: YES attrName: @"SendDateTime" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:Header" autoCreate: YES attrName: @"SubseqDelivType" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:Header" autoCreate: YES attrName: @"Source" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI" autoCreate: YES attrName: @"Type" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI" autoCreate: YES attrName: @"Transaction" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI" autoCreate: YES attrName: @"IssueDateTime" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI" autoCreate: YES attrName: @"OperatorCode" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI" autoCreate: YES attrName: @"BusinUnitCode" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI" autoCreate: YES attrName: @"SoftCode" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI" autoCreate: YES attrName: @"TIOrdNum" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI" autoCreate: YES attrName: @"TINum" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI" autoCreate: YES attrName: @"ValueOfGoods" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI" autoCreate: YES attrName: @"VehOwnership" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI" autoCreate: YES attrName: @"VehPlates" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI" autoCreate: YES attrName: @"StartAddr" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI" autoCreate: YES attrName: @"StartCity" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI" autoCreate: YES attrName: @"StartDateTime" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI" autoCreate: YES attrName: @"StartPoint" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI" autoCreate: YES attrName: @"DestinAddr" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI" autoCreate: YES attrName: @"DestinCity" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI" autoCreate: YES attrName: @"DestinDateTime" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI" autoCreate: YES attrName: @"DestinPoint" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI" autoCreate: YES attrName: @"IsGoodsFlammable" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI" autoCreate: YES attrName: @"IsEscortRequired" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI" autoCreate: YES attrName: @"PackType" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI" autoCreate: YES attrName: @"PackNum" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI" autoCreate: YES attrName: @"ItemsNum" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI" autoCreate: YES attrName: @"TIIC" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI" autoCreate: YES attrName: @"TIICSignature" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI" autoCreate: YES attrName: @"IsEinvoice" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI|al:Issuer" autoCreate: YES attrName: @"NUIS" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI|al:Issuer" autoCreate: YES attrName: @"Name" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI|al:Issuer" autoCreate: YES attrName: @"Address" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI|al:Issuer" autoCreate: YES attrName: @"Town" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI|al:Carrier" autoCreate: YES attrName: @"IDType" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI|al:Carrier" autoCreate: YES attrName: @"IDNum" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI|al:Carrier" autoCreate: YES attrName: @"Name" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI|al:Carrier" autoCreate: YES attrName: @"Address" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI|al:Carrier" autoCreate: YES attrName: @"Town" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI|al:Receiver" autoCreate: YES attrName: @"NUIS" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI|al:Receiver" autoCreate: YES attrName: @"Name" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI|al:Receiver" autoCreate: YES attrName: @"Address" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI|al:Receiver" autoCreate: YES attrName: @"Town" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI|al:Items|al:I" autoCreate: YES attrName: @"N" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI|al:Items|al:I" autoCreate: YES attrName: @"C" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI|al:Items|al:I" autoCreate: YES attrName: @"U" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|al:TI|al:Items|al:I" autoCreate: YES attrName: @"Q" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|ds:Signature" autoCreate: YES attrName: @"Id" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|ds:Signature|ds:SignedInfo" autoCreate: YES attrName: @"Id" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|ds:Signature|ds:SignedInfo|ds:CanonicalizationMethod" autoCreate: YES attrName: @"Algorithm" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|ds:Signature|ds:SignedInfo|ds:SignatureMethod" autoCreate: YES attrName: @"Algorithm" attrValue: @"?"];
[xml UpdateChildContent: @"soapenv:Body|al:RegisterTIRequest|ds:Signature|ds:SignedInfo|ds:SignatureMethod|ds:HMACOutputLength" value: @"integer"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|ds:Signature|ds:SignedInfo|ds:Reference" autoCreate: YES attrName: @"Id" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|ds:Signature|ds:SignedInfo|ds:Reference" autoCreate: YES attrName: @"URI" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|ds:Signature|ds:SignedInfo|ds:Reference" autoCreate: YES attrName: @"Type" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|ds:Signature|ds:SignedInfo|ds:Reference|ds:Transforms|ds:Transform" autoCreate: YES attrName: @"Algorithm" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|ds:Signature|ds:SignedInfo|ds:Reference|ds:DigestMethod" autoCreate: YES attrName: @"Algorithm" attrValue: @"?"];
[xml UpdateChildContent: @"soapenv:Body|al:RegisterTIRequest|ds:Signature|ds:SignedInfo|ds:Reference|ds:DigestValue" value: @"BASE64_DATA"];
[xml UpdateChildContent: @"soapenv:Body|al:RegisterTIRequest|ds:Signature|ds:SignatureValue" value: @"..."];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|ds:Signature|ds:KeyInfo" autoCreate: YES attrName: @"Id" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|ds:Signature|ds:Object" autoCreate: YES attrName: @"Id" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|ds:Signature|ds:Object" autoCreate: YES attrName: @"MimeType" attrValue: @"?"];
[xml UpdateAttrAt: @"soapenv:Body|al:RegisterTIRequest|ds:Signature|ds:Object" autoCreate: YES attrName: @"Encoding" attrValue: @"?"];

// In a SOAP HTTP request, including the XML declaration (<?xml version="1.0" encoding="UTF-8"?>) in the XML body is generally not required. 
xml.EmitXmlDecl = NO;
NSString *soapRequestBody = [xml GetXml];

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

CkoHttp *http = [[CkoHttp alloc] init];

[http ClearHeaders];
[http SetRequestHeader: @"Content-Type" value: contentType];
[http SetRequestHeader: @"SOAPAction" value: soapAction];

CkoHttpResponse *resp = [http PostXml: endpoint xmlDoc: soapRequestBody charset: @"utf-8"];
if (http.LastMethodSuccess == NO) {
    NSLog(@"%@",http.LastErrorText);
    NSLog(@"%@",@"Failed to send SOAP request.");
    return;
}

// Get the XML response body.
CkoXml *responseXml = [[CkoXml alloc] init];
[resp GetBodyXml: responseXml];

int statusCode = [resp.StatusCode intValue];
NSLog(@"%@%d",@"response status code: ",statusCode);

// If the status code does not indicate succcess, then show the response XML,
// which probably contains error information.
if (statusCode != 200) {
    NSLog(@"%@",[responseXml GetXml]);
    return;
}

NSLog(@"%@",[responseXml GetXml]);

// 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).

NSString *RegisterTIResponse_Id = [responseXml ChilkatPath: @"*:Body|*:RegisterTIResponse|(Id)"];
NSString *RegisterTIResponse_Version = [responseXml ChilkatPath: @"*:Body|*:RegisterTIResponse|(Version)"];
NSString *Header_UUID = [responseXml ChilkatPath: @"*:Body|*:RegisterTIResponse|*:Header|(UUID)"];
NSString *Header_RequestUUID = [responseXml ChilkatPath: @"*:Body|*:RegisterTIResponse|*:Header|(RequestUUID)"];
NSString *Header_SendDateTime = [responseXml ChilkatPath: @"*:Body|*:RegisterTIResponse|*:Header|(SendDateTime)"];
NSString *FTIC = [responseXml GetChildContent: @"*:Body|*:RegisterTIResponse|*:FTIC"];
NSString *Signature_Id = [responseXml ChilkatPath: @"*:Body|*:RegisterTIResponse|*:Signature|(Id)"];
NSString *SignedInfo_Id = [responseXml ChilkatPath: @"*:Body|*:RegisterTIResponse|*:Signature|*:SignedInfo|(Id)"];
NSString *CanonicalizationMethod_Algorithm = [responseXml ChilkatPath: @"*:Body|*:RegisterTIResponse|*:Signature|*:SignedInfo|*:CanonicalizationMethod|(Algorithm)"];
NSString *SignatureMethod_Algorithm = [responseXml ChilkatPath: @"*:Body|*:RegisterTIResponse|*:Signature|*:SignedInfo|*:SignatureMethod|(Algorithm)"];
NSString *HMACOutputLength = [responseXml GetChildContent: @"*:Body|*:RegisterTIResponse|*:Signature|*:SignedInfo|*:SignatureMethod|*:HMACOutputLength"];
NSString *Reference_Id = [responseXml ChilkatPath: @"*:Body|*:RegisterTIResponse|*:Signature|*:SignedInfo|*:Reference|(Id)"];
NSString *Reference_URI = [responseXml ChilkatPath: @"*:Body|*:RegisterTIResponse|*:Signature|*:SignedInfo|*:Reference|(URI)"];
NSString *Reference_Type = [responseXml ChilkatPath: @"*:Body|*:RegisterTIResponse|*:Signature|*:SignedInfo|*:Reference|(Type)"];
NSString *Transform_Algorithm = [responseXml ChilkatPath: @"*:Body|*:RegisterTIResponse|*:Signature|*:SignedInfo|*:Reference|*:Transforms|*:Transform|(Algorithm)"];
NSString *DigestMethod_Algorithm = [responseXml ChilkatPath: @"*:Body|*:RegisterTIResponse|*:Signature|*:SignedInfo|*:Reference|*:DigestMethod|(Algorithm)"];
NSString *DigestValue = [responseXml GetChildContent: @"*:Body|*:RegisterTIResponse|*:Signature|*:SignedInfo|*:Reference|*:DigestValue"];
NSString *SignatureValue = [responseXml GetChildContent: @"*:Body|*:RegisterTIResponse|*:Signature|*:SignatureValue"];
NSString *KeyInfo_Id = [responseXml ChilkatPath: @"*:Body|*:RegisterTIResponse|*:Signature|*:KeyInfo|(Id)"];
NSString *Object_Id = [responseXml ChilkatPath: @"*:Body|*:RegisterTIResponse|*:Signature|*:Object|(Id)"];
NSString *Object_MimeType = [responseXml ChilkatPath: @"*:Body|*:RegisterTIResponse|*:Signature|*:Object|(MimeType)"];
NSString *Object_Encoding = [responseXml ChilkatPath: @"*:Body|*:RegisterTIResponse|*:Signature|*:Object|(Encoding)"];
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:RegisterTIRequest Id="Request" Version="3" Source="?">
            <al:Header UUID="?" SendDateTime="?" SubseqDelivType="?" Source="?"/>
            <al:TI Type="?" Transaction="?" IssueDateTime="?" OperatorCode="?" BusinUnitCode="?" SoftCode="?" TIOrdNum="?" TINum="?" ValueOfGoods="?" VehOwnership="?" VehPlates="?" StartAddr="?" StartCity="?" StartDateTime="?" StartPoint="?" DestinAddr="?" DestinCity="?" DestinDateTime="?" DestinPoint="?" IsGoodsFlammable="?" IsEscortRequired="?" PackType="?" PackNum="?" ItemsNum="?" TIIC="?" TIICSignature="?" IsEinvoice="?">
                <al:Issuer NUIS="?" Name="?" Address="?" Town="?"/>
                <al:Carrier IDType="?" IDNum="?" Name="?" Address="?" Town="?"/>
                <al:Receiver NUIS="?" Name="?" Address="?" Town="?"/>
                <al:Items>
                    <al:I N="?" C="?" U="?" Q="?"/>
                </al:Items>
            </al:TI>
            <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:RegisterTIRequest>
    </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:RegisterTIResponse Id="Response" Version="3">
            <al:Header UUID="?" RequestUUID="?" SendDateTime="?"/>
            <al:FTIC>string</al:FTIC>
            <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:RegisterTIResponse>
    </soapenv:Body>
</soapenv:Envelope>