Explore Categories

 

 PDF

XML Message Formats

A message format is an encoded spatial or time-sequential arrangement of the parts of a message that is recorded in or on a data storage medium. XML Messaging format is specified for exchanging structured information in the implementation of Web Services in computer networks. An XML interface can form the foundation layer of a web services protocol stack, providing a basic messaging framework upon which web services can be built.

XML standard format has lots of potential as a data representation and messaging mechanism. Data representation typically involves translating the data from a local format into XML, and then back into the same format or even a completely different one, on the other end of a connection. In TallyPrime, XML messaging format is used for the purpose of integration. Here TallyPrime uses XML format for communication with external applications including other instances of TallyPrime. The data exchange happens by way of Request / Response. TallyPrime identifies certain tags for Request and sends a Response accordingly based on the Request.

All Requests and Responses are used in Tally.NET Messages contain custom HTTP headers to identify the requests that needs to be processed or forwarded.

Note: An XML fragment is everything from the start tag to the end tag. A fragment can contain other fragments, simple text or a mixture of both. Fragments can also have attributes. XML documents do not carry information about how to display the data. Since XML tags are "invented" by the author of the XML document, browsers do not know if a tag like <table> describes an HTML table or a dining table. Without any information about how to display the data, most browsers will just display the XML document as it is.

XML Message Format Template

TallyPrime follows the XML interface for exchanging data with other systems or with other TallyPrime instances. This XML interface specifies the following format for communication.

<ENVELOPE>

<HEADER> . . . </HEADER>

<BODY> . . . </BODY>

</ENVELOPE>

Request Template

The XML structure used for requesting messages is as follows:

<ENVELOPE>

<HEADER>

<VERSION>Version Number</VERSION>

<TALLYREQUEST>Request Type</TALLYREQUEST>

<TYPE>Information Type</TYPE>

<SUBTYPE>Sub Type</SUBTYPE>

<ID >Identifier</ID>

</HEADER>

<BODY>

<DESC>

<STATICVARIABLES>

Static Variables Specification

</STATICVARIABLES>

<REPEATVARIABLES>

Repeat Variables Specification

</REPEATVARIABLES>

<FETCHLIST>

Fetch Specification </FETCHLIST>

<FUNCPARAMLIST>

Parameter Specification in the case of function type

</FUNCPARAMLIST>

<TDL>

TDL Information

</TDL>

</DESC>

<DATA>

Data (if applicable)

</DATA>

</BODY>

</ENVELOPE>

Response Template

The XML structure used for response is as follows:

<ENVELOPE>

<HEADER>

<VERSION>Version Number</VERSION> <STATUS>-1/0/1</STATUS>

</HEADER>

<BODY>

<DESC>

<STATICVARIABLES>

Static Variables Specification

</STATICVARIABLES>

<REPEATVARIABLES>

Repeat Variables Specification

</REPEATVARIABLES>

<FETCHLIST>

Fetch Specification </FETCHLIST>

<FUNCPARAMLIST>

Parameter Specification

</FUNCPARAMLIST>

<TDL>

TDL Information

</TDL>

</DESC>

<DATA>

Data (if applicable)

</DATA>

</BODY>

</ENVELOPE>

Generic Failure Format

In case of a failure, all responses could be made to respond using the following format:

<ENVELOPE>

<HEADER>

<VERSION>Version</VERSION>

<STATUS>0</STATUS>

</HEADER>

<BODY>

<DATA>

<STATUS.LIST>

<STATUS>

<CODE>Code</CODE>

<DESC>Description</DESC>

</STATUS>

<STATUS.LIST>

</DATA>

</BODY>

</ENVELOPE>

Example

<ENVELOPE>

<HEADER>

<VERSION>1</VERSION>

<STATUS>0</STATUS>

</HEADER>

<BODY>

<DATA>

</DATA>

</BODY>

</ENVELOPE>

TallyHelpwhatsAppbanner
Is this information useful?
YesNo
Helpful?
/* */