SOAP WSDL Generate Code

FiscalizationServiceSoap / getBusinessUnits

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
Chilkat.Xml xml = new Chilkat.Xml();
xml.Tag = "soapenv:Envelope";
xml.AddAttribute("xmlns:soapenv","http://schemas.xmlsoap.org/soap/envelope/");
xml.AddAttribute("xmlns:fis","https://eFiskalizimi.tatime.gov.al/FiscalizationService");
xml.AddAttribute("xmlns:al","https://eFiskalizimi.tatime.gov.al/FiscalizationService/schema");
xml.AddAttribute("xmlns:ds","http://www.w3.org/2000/09/xmldsig#");
xml.UpdateChildContent("soapenv:Header","");
xml.UpdateAttrAt("soapenv:Body|al:GetBusinessUnitsRequest",true,"Id","Request");
xml.UpdateAttrAt("soapenv:Body|al:GetBusinessUnitsRequest",true,"Version","3");
xml.UpdateAttrAt("soapenv:Body|al:GetBusinessUnitsRequest|al:Header",true,"UUID","?");
xml.UpdateAttrAt("soapenv:Body|al:GetBusinessUnitsRequest|al:Header",true,"SendDateTime","?");
xml.UpdateAttrAt("soapenv:Body|al:GetBusinessUnitsRequest|ds:Signature",true,"Id","?");
xml.UpdateAttrAt("soapenv:Body|al:GetBusinessUnitsRequest|ds:Signature|ds:SignedInfo",true,"Id","?");
xml.UpdateAttrAt("soapenv:Body|al:GetBusinessUnitsRequest|ds:Signature|ds:SignedInfo|ds:CanonicalizationMethod",true,"Algorithm","?");
xml.UpdateAttrAt("soapenv:Body|al:GetBusinessUnitsRequest|ds:Signature|ds:SignedInfo|ds:SignatureMethod",true,"Algorithm","?");
xml.UpdateChildContent("soapenv:Body|al:GetBusinessUnitsRequest|ds:Signature|ds:SignedInfo|ds:SignatureMethod|ds:HMACOutputLength","integer");
xml.UpdateAttrAt("soapenv:Body|al:GetBusinessUnitsRequest|ds:Signature|ds:SignedInfo|ds:Reference",true,"Id","?");
xml.UpdateAttrAt("soapenv:Body|al:GetBusinessUnitsRequest|ds:Signature|ds:SignedInfo|ds:Reference",true,"URI","?");
xml.UpdateAttrAt("soapenv:Body|al:GetBusinessUnitsRequest|ds:Signature|ds:SignedInfo|ds:Reference",true,"Type","?");
xml.UpdateAttrAt("soapenv:Body|al:GetBusinessUnitsRequest|ds:Signature|ds:SignedInfo|ds:Reference|ds:Transforms|ds:Transform",true,"Algorithm","?");
xml.UpdateAttrAt("soapenv:Body|al:GetBusinessUnitsRequest|ds:Signature|ds:SignedInfo|ds:Reference|ds:DigestMethod",true,"Algorithm","?");
xml.UpdateChildContent("soapenv:Body|al:GetBusinessUnitsRequest|ds:Signature|ds:SignedInfo|ds:Reference|ds:DigestValue","BASE64_DATA");
xml.UpdateChildContent("soapenv:Body|al:GetBusinessUnitsRequest|ds:Signature|ds:SignatureValue","...");
xml.UpdateAttrAt("soapenv:Body|al:GetBusinessUnitsRequest|ds:Signature|ds:KeyInfo",true,"Id","?");
xml.UpdateAttrAt("soapenv:Body|al:GetBusinessUnitsRequest|ds:Signature|ds:Object",true,"Id","?");
xml.UpdateAttrAt("soapenv:Body|al:GetBusinessUnitsRequest|ds:Signature|ds:Object",true,"MimeType","?");
xml.UpdateAttrAt("soapenv:Body|al:GetBusinessUnitsRequest|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. 
xml.EmitXmlDecl = false;
string soapRequestBody = xml.GetXml();

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

Chilkat.Http http = new Chilkat.Http();

http.ClearHeaders();
http.SetRequestHeader("Content-Type",contentType);
http.SetRequestHeader("SOAPAction",soapAction);

Chilkat.HttpResponse resp = http.PostXml(endpoint,soapRequestBody,"utf-8");
if (http.LastMethodSuccess == false) {
    Debug.WriteLine(http.LastErrorText);
    Debug.WriteLine("Failed to send SOAP request.");
    return;
}

// Get the XML response body.
Chilkat.Xml responseXml = new Chilkat.Xml();
resp.GetBodyXml(responseXml);

int statusCode = resp.StatusCode;
Debug.WriteLine("response status code: " + Convert.ToString(statusCode));

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

Debug.WriteLine(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).

string GetBusinessUnitsResponse_Id = responseXml.ChilkatPath("*:Body|*:GetBusinessUnitsResponse|(Id)");
string GetBusinessUnitsResponse_Version = responseXml.ChilkatPath("*:Body|*:GetBusinessUnitsResponse|(Version)");
string Header_UUID = responseXml.ChilkatPath("*:Body|*:GetBusinessUnitsResponse|*:Header|(UUID)");
string Header_RequestUUID = responseXml.ChilkatPath("*:Body|*:GetBusinessUnitsResponse|*:Header|(RequestUUID)");
string Header_SendDateTime = responseXml.ChilkatPath("*:Body|*:GetBusinessUnitsResponse|*:Header|(SendDateTime)");
string BusinessUnit = responseXml.GetChildContent("*:Body|*:GetBusinessUnitsResponse|*:BusinessUnits|*:BusinessUnit");
string Signature_Id = responseXml.ChilkatPath("*:Body|*:GetBusinessUnitsResponse|*:Signature|(Id)");
string SignedInfo_Id = responseXml.ChilkatPath("*:Body|*:GetBusinessUnitsResponse|*:Signature|*:SignedInfo|(Id)");
string CanonicalizationMethod_Algorithm = responseXml.ChilkatPath("*:Body|*:GetBusinessUnitsResponse|*:Signature|*:SignedInfo|*:CanonicalizationMethod|(Algorithm)");
string SignatureMethod_Algorithm = responseXml.ChilkatPath("*:Body|*:GetBusinessUnitsResponse|*:Signature|*:SignedInfo|*:SignatureMethod|(Algorithm)");
string HMACOutputLength = responseXml.GetChildContent("*:Body|*:GetBusinessUnitsResponse|*:Signature|*:SignedInfo|*:SignatureMethod|*:HMACOutputLength");
string Reference_Id = responseXml.ChilkatPath("*:Body|*:GetBusinessUnitsResponse|*:Signature|*:SignedInfo|*:Reference|(Id)");
string Reference_URI = responseXml.ChilkatPath("*:Body|*:GetBusinessUnitsResponse|*:Signature|*:SignedInfo|*:Reference|(URI)");
string Reference_Type = responseXml.ChilkatPath("*:Body|*:GetBusinessUnitsResponse|*:Signature|*:SignedInfo|*:Reference|(Type)");
string Transform_Algorithm = responseXml.ChilkatPath("*:Body|*:GetBusinessUnitsResponse|*:Signature|*:SignedInfo|*:Reference|*:Transforms|*:Transform|(Algorithm)");
string DigestMethod_Algorithm = responseXml.ChilkatPath("*:Body|*:GetBusinessUnitsResponse|*:Signature|*:SignedInfo|*:Reference|*:DigestMethod|(Algorithm)");
string DigestValue = responseXml.GetChildContent("*:Body|*:GetBusinessUnitsResponse|*:Signature|*:SignedInfo|*:Reference|*:DigestValue");
string SignatureValue = responseXml.GetChildContent("*:Body|*:GetBusinessUnitsResponse|*:Signature|*:SignatureValue");
string KeyInfo_Id = responseXml.ChilkatPath("*:Body|*:GetBusinessUnitsResponse|*:Signature|*:KeyInfo|(Id)");
string Object_Id = responseXml.ChilkatPath("*:Body|*:GetBusinessUnitsResponse|*:Signature|*:Object|(Id)");
string Object_MimeType = responseXml.ChilkatPath("*:Body|*:GetBusinessUnitsResponse|*:Signature|*:Object|(MimeType)");
string Object_Encoding = responseXml.ChilkatPath("*:Body|*:GetBusinessUnitsResponse|*: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:GetBusinessUnitsRequest Id="Request" Version="3">
            <al:Header UUID="?" SendDateTime="?"/>
            <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:GetBusinessUnitsRequest>
    </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:GetBusinessUnitsResponse Id="Response" Version="3">
            <al:Header UUID="?" RequestUUID="?" SendDateTime="?"/>
            <al:BusinessUnits>
                <al:BusinessUnit>...</al:BusinessUnit>
            </al:BusinessUnits>
            <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:GetBusinessUnitsResponse>
    </soapenv:Body>
</soapenv:Envelope>