git_bsmd/nsw/Source/bsmd.dbh/NSWResponse.xsd
2016-03-13 19:40:06 +00:00

244 lines
11 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<!--Created with Liquid XML Studio - FREE Community Edition 7.0.3.780 (http://www.liquid-technologies.com)-->
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Root">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="Version">
<xs:annotation>
<xs:documentation>Version number of schema</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="1" />
<xs:maxLength value="5" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="MessageId" type="xs:string">
<xs:annotation>
<xs:documentation>Unique message identifier.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="VisitId">
<xs:annotation>
<xs:documentation>Required when TransitId is missing and field "Type" is not "VISIT or "TRANSIT"</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="(DE)([A-Z]{3})-([0-9]{4})-([A-Z]{6})" />
<xs:length value="17" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element minOccurs="0" name="TransitId">
<xs:annotation>
<xs:documentation>Required when VisitId is missing and field "Type" is not "VISIT or "TRANSIT"</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="(ZZNOK)-([0-9]{4})-([A-Z]{6})" />
<xs:length value="17" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element minOccurs="0" name="SisNumbers">
<xs:annotation>
<xs:documentation>A list of SIS numbers. An empty list means that all sent numbers will be deleted. Sending a new list overwrites existing ones completely.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="SisNumber">
<xs:annotation>
<xs:documentation>One SIS number</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z0-9]{4}" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Timestamp" type="xs:dateTime">
<xs:annotation>
<xs:documentation>Timestamp, when the message is sent</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="SenderReference">
<xs:annotation>
<xs:documentation>A customer reference that can be freely filled and will be send back in the following response. No checks are made on this field. When a new Visit- or TransitId is obtained, it should be used as a reference to match the response to its corresponding request.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="35" />
<xs:minLength value="0" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Type">
<xs:annotation>
<xs:documentation>The message type (should be the same as in the request message):
- VISIT: Creates a new declaration with the application for a VisitId. It's allowed to send further data in one or more reporting classes
- TRANSIT: same with TransitId
- DATA: Only data for one or more reporting classes are included
- RESET: The data of one or more reporting classes are deleted
- CANCEL: The whole declaration is cancelled</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="VISIT" />
<xs:enumeration value="TRANSIT" />
<xs:enumeration value="DATA" />
<xs:enumeration value="RESET" />
<xs:enumeration value="CANCEL" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element minOccurs="0" name="ReportingClassesFull">
<xs:annotation>
<xs:documentation>Reporting classes that are received with all necessary data.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="ReportingClass" type="ReportingClassCode">
<xs:annotation>
<xs:documentation>The code of a reporting class.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="ReportingClassesPartial">
<xs:annotation>
<xs:documentation>Reporting classes that are received with some data missing (see Messages for errors/violations).</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="ReportingClass" type="ReportingClassCode">
<xs:annotation>
<xs:documentation>The code of a reporting class.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="ReportingClassesError">
<xs:annotation>
<xs:documentation>Reporting classes that are received with some data missing (see Messages for errors/violations).</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="ReportingClass" type="ReportingClassCode">
<xs:annotation>
<xs:documentation>The code of a reporting class.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="ReportingClassesResetted">
<xs:annotation>
<xs:documentation>Reporting classes that are resetted (due to a message with Type RESET).</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="ReportingClass" type="ReportingClassCode">
<xs:annotation>
<xs:documentation>The code of a reporting class.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Messages">
<xs:annotation>
<xs:documentation>Errors, Violations, etc.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="Message">
<xs:complexType>
<xs:sequence>
<xs:element name="ID">
<xs:annotation>
<xs:documentation>ID (given from NSW)</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="3" />
<xs:maxLength value="4" />
<xs:pattern value="([1-9][0-9]{2,3})" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Type">
<xs:annotation>
<xs:documentation>Type of Message (functional error, process error in report, process error in message basket, process error during status request, or violation)</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="INFO" />
<xs:enumeration value="WARNING" />
<xs:enumeration value="VIOLATION" />
<xs:enumeration value="ERROR" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Location">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="1" />
<xs:maxLength value="32" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Text">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="1" />
<xs:maxLength value="255" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="ReportingClassCode">
<xs:restriction base="xs:string">
<xs:enumeration value="NOA_NOD" />
<xs:enumeration value="ATA" />
<xs:enumeration value="ATD" />
<xs:enumeration value="SEC" />
<xs:enumeration value="AGNT" />
<xs:enumeration value="POBA" />
<xs:enumeration value="POBD" />
<xs:enumeration value="NAME" />
<xs:enumeration value="TIEFA" />
<xs:enumeration value="TIEFD" />
<xs:enumeration value="BKRA" />
<xs:enumeration value="BKRD" />
<xs:enumeration value="STAT" />
<xs:enumeration value="LADG" />
<xs:enumeration value="INFO" />
<xs:enumeration value="SERV" />
<xs:enumeration value="PRE72H" />
<xs:enumeration value="MDH" />
<xs:enumeration value="WAS" />
<xs:enumeration value="CREW" />
<xs:enumeration value="PAS" />
<xs:enumeration value="BPOL" />
<xs:enumeration value="TOWA" />
<xs:enumeration value="TOWD" />
<xs:enumeration value="HAZA" />
<xs:enumeration value="HAZD" />
</xs:restriction>
</xs:simpleType>
</xs:schema>