Documentation/Data formats

For administrators

exchange.xml

Exchange profiles, tables, files and documents transferred by the mobile application.

exchange.xml defines the data the mobile application receives from the server and the documents or files it sends back. The integrator prepares this file and places it directly in outbox with the name exchange.xml.

After updating the file in outbox, run the built-in Download exchange file action on the device. The application replaces its local configuration and displays the available profiles.

Exchange profiles

The root element is <palm-client>. It contains one or more <exchange> profiles.

<?xml version="1.0" encoding="UTF-8"?>
<palm-client>
  <exchange name="complete" view="Download data">
    <get>
      <dbs>
        <db name="ref_products"/>
        <db name="ref_customers"/>
      </dbs>
    </get>
  </exchange>
</palm-client>
ElementPurpose
<exchange>One profile, displayed to the user under the name in view.
<get>Data and files the device receives from outbox.
<post>Documents and files the device sends to the server.
<db>An XML table name without the .xml extension.
<file>An ordinary file or a file pattern for transfer.

Documents sent by the device

Within <post>, each <document> element describes one document type. It specifies the document name, header table, transfer conditions and fields.

<document name="order" view="Orders" tableName="doc_orders">
  <syncFields>
    <field name="send_status" value="0" set="1"/>
  </syncFields>
  <docHead>
    <field name="number"/>
    <field name="customer_code"/>
  </docHead>
  <docTable tableName="doc_orders_products">
    <field name="code"/>
    <field name="count"/>
  </docTable>
</document>
  • <syncFields> defines the fields and values used to select documents for transfer.
  • <docHead> defines the document header fields.
  • <docTable> defines the table section fields.

The value attribute specifies the field value used to select documents, while set specifies the value the application writes after a successful transfer. In this example, send_status="0" means that the document has not yet been sent; after transfer, the application sets send_status="1".

A document can have no table section. If it has one, each <document> allows only one <docTable>.

Example

For the first exchange, use the prepared exchange.xml example. It contains profiles for sending documents and downloading tables, images, settings and print forms.

See First exchange for the data preparation steps.