<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.egis-online.de/EBC/schema/ProjectQueryResponse"
    xmlns="http://www.egis-online.de/EBC/schema/ProjectQueryResponse"
    elementFormDefault="qualified">
    <xs:element name="ProjectQueryResponse">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="TransactionHeader"/>
                <xs:element ref="ProjectQueryResponseItem" minOccurs="0"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="TransactionHeader">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="VersionId"/>
                <xs:element ref="GenerationDateTime"/>
                <xs:element maxOccurs="1" minOccurs="0" ref="Exception"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="VersionId" type="xs:decimal"/>
    <xs:element name="GenerationDateTime" type="xs:dateTime"/>

    <xs:element name="Exception">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="ErrorNumber"/>
                <xs:element ref="ErrorMessage"/>
                <xs:element ref="ErrorDescription"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:element name="ErrorNumber" type="xs:int"/>
    <xs:element name="ErrorMessage" type="xs:string"/>
    <xs:element name="ErrorDescription" type="xs:string" nillable="true"/>

    <xs:element name="ProjectQueryResponseItem">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="Header"/>
                <xs:element ref="Body"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="Header">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="DistributorReference"/>
                <xs:element ref="ProductReference"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="DistributorReference">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="DistributorDescription"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="DistributorDescription">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="DistributorName"/>
                <xs:element ref="ProprietaryDistributorIdentifier"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="DistributorName" type="xs:string"/>
    <xs:element name="ProprietaryDistributorIdentifier" type="xs:string"/>

    <xs:element name="ProductReference">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="ProductIdentification"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="ProductIdentification">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="DistributorProductNumber"/>
                <xs:element ref="ProductDescription"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="DistributorProductNumber" type="xs:string"/>
    <xs:element name="ProductDescription" type="xs:string"/>

    <xs:element name="Body">
        <xs:complexType>
            <xs:sequence>
                <xs:element maxOccurs="1" minOccurs="1" ref="ProjectList"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="ProjectList">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="Project"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="Project">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="ProjectNumber"/>
                <xs:element ref="ProjectPrice"/>
                <xs:element ref="ProjectMinQty"/>
                <xs:element ref="ProjectAvailableQty"/>
                <xs:element ref="ProjectDescription"/>
                <xs:element ref="ProjectFrom"/>
                <xs:element ref="ProjectTill"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="ProjectNumber" type="xs:string"/>
    <xs:element name="ProjectPrice" type="xs:decimal"/>
    <xs:element name="ProjectMinQty" type="xs:int"/>
    <xs:element name="ProjectAvailableQty" type="xs:int"/>
    <xs:element name="ProjectDescription" type="xs:string"/>
    <xs:element name="ProjectFrom" nillable="true" type="xs:dateTime"/>
    <xs:element name="ProjectTill" nillable="true" type="xs:dateTime"/>
</xs:schema>