<?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/ShoppingCartResponse"
    xmlns="http://www.egis-online.de/EBC/schema/ShoppingCartResponse"
    elementFormDefault="qualified">
    <xs:element name="ShoppingCartResponse">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="TransactionHeader"/>
                <xs:element ref="ShoppingCart" 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" nillable="true" type="xs:string"/>

    <xs:element name="ShoppingCart">
        <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="ShoppingCartIdentification"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="ShoppingCartIdentification">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="ShoppingCartIdentifier"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="ShoppingCartIdentifier">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="ShoppingCartName"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="ShoppingCartName">
        <xs:simpleType>
            <xs:restriction base="xs:string">
                <xs:maxLength value="35"></xs:maxLength>
            </xs:restriction>
        </xs:simpleType>
    </xs:element>

    <xs:element name="Body">
        <xs:complexType>
            <xs:sequence>
                <xs:element maxOccurs="unbounded" ref="LineItem"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="LineItem">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="DistributorDescription"/>
                <xs:element ref="ProductIdentification"/>
                <xs:element ref="Status"/>
                <xs:element ref="StatusCode"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="DistributorDescription">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="ProprietaryDistributorIdentifier"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    
    <xs:element name="ProductIdentification">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="ProprietaryProductIdentifier"/>
                <xs:element ref="DistributorProductIdentifier"/>
                <xs:element ref="ManufacturerProductIdentifier"/>
                <xs:element ref="GlobalProductIdentifier"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="ProprietaryProductIdentifier">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="ProprietaryProductNumber"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="DistributorProductIdentifier">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="DistributorProductNumber"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="ManufacturerProductIdentifier">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="ManufacturerProductNumber"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="GlobalProductIdentifier">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="GlobalProductNumber"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="ProprietaryDistributorIdentifier" type="xs:string" nillable="true"/>
    <xs:element name="ProprietaryProductNumber" type="xs:string" nillable="true"/>
    <xs:element name="DistributorProductNumber" type="xs:string" nillable="true"/>
    <xs:element name="ManufacturerProductNumber" type="xs:string" nillable="true"/>
    <xs:element name="GlobalProductNumber" type="xs:string" nillable="true"/>

    <xs:element name="Status">
		<xs:simpleType>
			<xs:restriction base="xs:string">
				<xs:enumeration value = "ok"/>
				<xs:enumeration value = "error"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>
    <xs:element name="StatusCode">
        <xs:simpleType>
            <xs:restriction base="xs:int">
                <xs:enumeration value="0"/>
                <xs:enumeration value="2"/>
                <xs:enumeration value="3"/>
                <xs:enumeration value="4"/>
				<xs:enumeration value="5"/>
            </xs:restriction>
        </xs:simpleType>
    </xs:element>
</xs:schema>