Skip to main content
Skip table of contents

XML file format for Fax-to-Applications

Instead of using a metadata file to add information, Fax-to-Applications uses customer templates for the XML output format. A template is used to build an XML schema file that is sent to you via SOAP_POST/PLAIN_POST/GHX_UrlEncoded_POST (SOAP is used to communicate with the customer's web service).

The templates are currently stored locally in a directory by the customer, but in the future the service will be configured via the EAS portal.

Using the customer number in the filename, the application retrieves the correct template and creates the XML output file containing the job data and documents in base64 format. For the time being, the application is available via the standard Retarus template, which is used for test customers who do not have their own template and do not have a specific template in mind. Here is the file:

XML
[#ftl]
 <?xml version=1.0 encoding=UTF-8?>
 [#if job.timeZone??]
    [#setting time_zone = job.timeZone]
 [#else]
    [#setting time_zone=CET]
 [/#if]
   <Fax>
     <Authentication>
       <AuthenticationMethod>UserPassword</AuthenticationMethod>
       <Username>User</Username>
       <Password>xxxxx</Password>
     </Authentication>
     <FaxDetails>
       <JobID>${job.xml(job.vampHeader.callId)}</JobID>

<DateReceived>${job.vampHeader.timeStamp?string(yyyy-MM-dd'T'HH:mm:ssZ)}</DateReceived> <!-- Date/Time of the fax transmission -->
       <CalledNumber>${job.vampHeader.calledNo}</CalledNumber>
       <SenderFaxId>${job.xml(job.vampHeader.senderFaxId)}</SenderFaxId>
       <FaxName>${job.xml(job.vampHeader.receiverFaxId)}</FaxName>
       <AccountID>${job.xml(job.vampHeader.billingCode)}</AccountID>
       <FileType>${job.mainDocFormat?lower_case}</FileType>
       <Resolution>
       [#if job.vampHeader.resolution?matches(H*) ]HIGH
       [#elseif job.vampHeader.resolution?matches(L*) ]LOW
       [#else]MIXED
       [/#if]
       </Resolution>
       <TotalDuration>${job.vampHeader.totalDuration}</TotalDuration>
       <BaudRate>${job.vampHeader.baudRate}</BaudRate>
       <PageCount>${job.vampHeader.pageCount}</PageCount>
       [#if OK == job.vampHeader.status?upper_case]
      <Status>OK</Status>
       [#else]
      <Status>ERR</Status>
       [/#if]
       <CSID>${job.xml(job.vampHeader.receiverFaxId)}</CSID>
       <CallingNumber>${job.vampHeader.senderIsdn}</CallingNumber>
       <ArchivingStatus>${job.archivingStatus}</ArchivingStatus>
       [#if not configured == job.archivingStatus]
      <ArchivedUntil></ArchivedUntil>
      [#else]
      <ArchivedUntil>${job.archiveExpiry?string(yyyy/MM/dd)}</ArchivedUntil>
      [/#if]
      <Service>Fax2WS</Service>
     </FaxDetails>
     [#list files as f]
      [#if f.noMetaData]
       <FaxFile>
          <FileType>${f.type}</FileType>
          <FileName>${f.shortFileName}</FileName>
          <FileContent>${f.asBase64}</FileContent>
       </FaxFile>
      [/#if]
    [/#list]
  </Fax>

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.