<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (C) 2006-2026 BRZ GmbH
    http://www.brz.gv.at

    All rights reserved

-->
<!--
This file was automatically generated by ph-wsdl-gen
https://github.com/phax/ph-wsdl-gen
-->
<xs:schema xmlns:tns="http://erb.eproc.brz.gv.at/ws/erc/async/201602/" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://erb.eproc.brz.gv.at/ws/erc/async/201602/" elementFormDefault="qualified">
  <xs:complexType name="CAPropertyType">
    <xs:annotation>
      <xs:documentation>This type is a generic key-value pair</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute name="name" type="xs:string" use="required">
          <xs:annotation>
            <xs:documentation>The name of this property.
Must be unique within all properties.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="CAMetadataType">
    <xs:annotation>
      <xs:documentation>This contains a set of metadata elements to be returned in the 
callback to ER&gt;B.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Item" type="tns:CAPropertyType" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>A single metadata item</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="CAInvoiceType">
    <xs:annotation>
      <xs:documentation>This contains an invoice document.
As ER&gt;B supports multiple formats, and we can't tell whether it 
will always be XML, the content must be base64Binary encoded. 
It also helps decoupling from a specific XML schema version of
an invoice. 
If it is an XML document, the XML declaration
&lt;?xml version='...' encoding='...'?&gt;
is always contained in the binary encoded data!</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="xs:base64Binary">
        <xs:attribute name="format" type="xs:string" use="required">
          <xs:annotation>
            <xs:documentation>The ER&gt;B internal type of the invoice document.
E.g. 'ebInterface 4.0' or 'AustroFIX 5'.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="encoding" type="xs:string" use="required">
          <xs:annotation>
            <xs:documentation>The original encoding of the document before it was Base64 
encoded. E.g. UTF-8.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="mimetype" type="xs:string" use="required">
          <xs:annotation>
            <xs:documentation>The MIME type of the invoice document.
Usually this is 'application/xml' for all XML data types</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="CARequestAttachmentType">
    <xs:annotation>
      <xs:documentation>This type represents an attachment delivered together with the invoice.
All attachments are Base64 encoded as they are usually binary files.</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="xs:base64Binary">
        <xs:attribute name="name" type="xs:string" use="required">
          <xs:annotation>
            <xs:documentation>The (file)name of this attachment.
It should not contain any path element!</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="encoding" type="xs:string" use="optional">
          <xs:annotation>
            <xs:documentation>The original encoding of the document before it was Base64 
encoded. This is only relevant for text attachments.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="mimetype" type="xs:string" use="optional">
          <xs:annotation>
            <xs:documentation>The MIME type of this attachment</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="CARequestPrintableInvoiceType">
    <xs:annotation>
      <xs:documentation>This type contains a printable invoice - usually a PDF -
that is generated automatically by ER&gt;B.
The transmission is always Base64 encoded.</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="xs:base64Binary">
        <xs:attribute name="mimetype" type="xs:string" use="required">
          <xs:annotation>
            <xs:documentation>The MIME type of the printable invoice. 
For PDF this is e.g. 'application/pdf'.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="CARequestSettingsType">
    <xs:annotation>
      <xs:documentation>This type contains settings relevant for exactly this
invoice transmission.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Extension" type="tns:CAPropertyType" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>Optional request extension point.
Only handled upon bilateral agreement.</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="test" type="xs:boolean" use="required">
      <xs:annotation>
        <xs:documentation>If this flag is set to 'true', the delivery is considered a
test-delivery and should not be processed productively!
For production invoices, this flag is set to 'false'.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="language" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>If ID of the language in which the returned messages should be 
printed. Currently supported are:
'de' - German
'en' - English</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="CARequestType">
    <xs:annotation>
      <xs:documentation>The request type filled in ER&gt;B.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="RecipientType" type="xs:string">
        <xs:annotation>
          <xs:documentation>The type of the recipient ID as bilaterally agreed.
For GLN numbers this may e.g. be 'GLN'. For the
ER&gt;B 'Auftragsreferenz' the value is 'ERB'.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="RecipientID" type="xs:string">
        <xs:annotation>
          <xs:documentation>The ID of the recipient as bilaterally agreed.
This may e.g. be a GLN number or the ER&gt;B 'Auftragsreferenz'.
The syntax of this field differs from case to case.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="DocumentID" type="xs:string">
        <xs:annotation>
          <xs:documentation>The ER&gt;B internal ID that is the key for asynchronous response matching.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Metadata" type="tns:CAMetadataType">
        <xs:annotation>
          <xs:documentation>Contains the metadata for the passed invoice.
This information is mainly present because it must be send back
in the asynchronous callback so that ER&gt;B can build the status
message for the original supplier.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="GenericInvoice" type="tns:CAInvoiceType">
        <xs:annotation>
          <xs:documentation>Contains the AustroFIX invoice XML document.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="OriginalInvoice" type="tns:CAInvoiceType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Contains the original invoice document as delivered to ER&gt;B.
It is optional, if the original document was AustroFIX (e.g. 
by filling out the web form).</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Attachment" type="tns:CARequestAttachmentType" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>All attachments delivered together with the original invoice.
Only certain file types are allowed: PDF, PNG, XLS, XLSX and XML.
The maximum size of all attachments together is currently limited
to 50 MB (before Base64 encoding). The total amount of 
attachments is currently limited to 200.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="PrintableInvoice" type="tns:CARequestPrintableInvoiceType">
        <xs:annotation>
          <xs:documentation>The printable version of the invoice, without any attachments
(if present) as they are passed separately.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Settings" type="tns:CARequestSettingsType">
        <xs:annotation>
          <xs:documentation>Settings that apply only to this single invoice transmission!</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Extension" type="tns:CAPropertyType" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>Optional extension point.
Only handled upon bilateral agreement.</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="CAResponseSuccessType">
    <xs:annotation>
      <xs:documentation>The success type - empty by default as nothing is required.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Extension" type="tns:CAPropertyType" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>Optional success response extension point.
Only handled upon bilateral agreement.</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="CAErrorDetailType">
    <xs:sequence>
      <xs:element name="ErrorCode" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>The internal error code for machine-processing.
A list should be provided.
This text is forwarded to the invoice deliverer.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Field" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>The field containing the error.
This text is forwarded to the invoice deliverer.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Message" type="xs:string">
        <xs:annotation>
          <xs:documentation>The main error message for the specified field.
This should contain a human readable text.
This text is forwarded to the invoice deliverer.
The text should be in the language defined by the request
attribute Settings/@language.</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="CAResponseErrorType">
    <xs:annotation>
      <xs:documentation>The response error type. It contains a list of error details.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="ErrorDetail" type="tns:CAErrorDetailType" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>All error details.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Extension" type="tns:CAPropertyType" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>Optional error response extension point.
Only handled upon bilateral agreement.</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="CAResponseType">
    <xs:annotation>
      <xs:documentation>The global response choice. Either success or error.
If the 'Success' element is present the invoice is considered
to be accepted. Further invoice checking by humans may occur.
In that case the error handling must be bilateral between
the original supplier and the final invoice recipient.
If the 'Error' element is present the invoice is considered 
to be rejected.</xs:documentation>
    </xs:annotation>
    <xs:choice>
      <xs:element name="Success" type="tns:CAResponseSuccessType">
        <xs:annotation>
          <xs:documentation>In case of success this elements is present</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Error" type="tns:CAResponseErrorType">
        <xs:annotation>
          <xs:documentation>In case of error this element is present</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:choice>
  </xs:complexType>
  <xs:complexType name="CAExceptionType">
    <xs:annotation>
      <xs:documentation>The generic exception type in case something goes wrong on the
receiver side.
In an exception is thrown the invoice will be rejected.
The invoice deliverer will get a generic error message without
the exception details.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Message" type="xs:string" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>The human understandable exception message.</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:element name="passInvoicePartInput" type="tns:CARequestType" />
  <xs:element name="passInvoicePartOutput" type="tns:CAResponseType" />
  <xs:element name="passInvoicePartFault" type="tns:CAExceptionType" />
</xs:schema>
