<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
        targetNamespace="http://www.example.org/Request"
        xmlns:tns="http://www.example.org/Request"
        elementFormDefault="qualified">
		
  <element name="ShipmentCreationRequest" type="tns:ShipmentCreationRequestType" ></element>
 <complexType name="ShipmentCreationRequestType">
    	<sequence>
    		<element name="Context" type="tns:ContextType" minOccurs="1"
    			maxOccurs="1">
    			<annotation>
    				<documentation></documentation>
    			</annotation>
    		</element>
    		<element name="OutputOptions" type="tns:OutputOptionsType"
    			minOccurs="1" maxOccurs="1">
    		</element>
    		<element name="ShipmentsList" minOccurs="1" maxOccurs="1" type="tns:ShipmentsListType">
                <annotation>
                	<documentation></documentation></annotation>
    		</element>
    	</sequence>
    </complexType>

    <complexType name="ContextType">
    	<sequence>
    		<element name="Login" type="string" minOccurs="1" maxOccurs="1" nillable="false">
    			<annotation>
    				<documentation>
    					The user name of the client who calls the
    					service operation. Will be used for
    					authentication. The user name will be provided
    					by MondialRelay.
    				</documentation>
    			</annotation>
    		</element>
    		<element name="Password" type="string" minOccurs="1" maxOccurs="1" nillable="false">
    			<annotation>
    				<documentation>
    					The password of the client who calls the service
    					operation. Will be used for authentication. The
    					password will be provided by MondialRelay.
    				</documentation>
    			</annotation>
    		</element>
    		<element name="CustomerId" minOccurs="1" maxOccurs="1">
    			<annotation>
    				<documentation>
    					The Customer Id of the client who calls the
    					service operation. Will be used for
    					authentication. The customerId will be provided
    					by MondialRelay.
    				</documentation>
    			</annotation>
    			<simpleType>
    				<restriction base="string">
    					<minLength value="2"></minLength>
    					<maxLength value="8"></maxLength>
    					<whiteSpace value="collapse"></whiteSpace>
    				</restriction>
    			</simpleType>
    		</element>
    		<element name="Culture" minOccurs="1" maxOccurs="1">
    			<annotation>
    				<documentation>
    					The culture that will be used to process the
    					request and produce the output expected format :
    					en-US
    				</documentation>
    			</annotation>
    			<simpleType>
    				<restriction base="string">
    					<length value="5"></length>
    					<pattern value="\w{2}-\w{2}"></pattern>
    				</restriction>
    			</simpleType>
    		</element>
    		<element name="VersionAPI" minOccurs="1" maxOccurs="1">
    			<annotation>
    				<documentation>
    					The reference of the API version.
    				</documentation>
    			</annotation>
    			<simpleType>
    				<restriction base="string">
    					<minLength value="0"></minLength>
    				</restriction>
    			</simpleType>
    		</element>
    	</sequence>
    </complexType>

    <complexType name="OutputOptionsType">
    	<sequence>
    		<element name="OutputFormat" minOccurs="0" maxOccurs="1">
    			<annotation>
    				<documentation>
    					The printer model that will receive the ZPL
    					code. Bellow the model list of compatible
    					printers:
    				</documentation>
    			</annotation>
    			<simpleType>
    				<restriction base="string">
    					<minLength value="0"></minLength>
    				</restriction>
    			</simpleType>
    		</element>
    		<element name="OutputType" minOccurs="1" maxOccurs="1">
    			<simpleType>
    				<restriction base="string">
    					<minLength value="0"></minLength>
    				</restriction>
    			</simpleType>
    		</element>
    	</sequence>
    </complexType>

    <complexType name="ShipmentsListType">
    	<sequence>
    		<element name="Shipment" type="tns:ShipmentType" minOccurs="1" maxOccurs="unbounded"></element>
    	</sequence>
    </complexType>

    <complexType name="ShipmentType">
    	<sequence>
    		<element name="OrderNo" minOccurs="0" maxOccurs="1">
    			<annotation>
    				<documentation>
    					Customer internal order reference of the shipped
    					content
    				</documentation>
    			</annotation>
    			<simpleType>
    				<restriction base="string">
    					<minLength value="0"></minLength>
    					<maxLength value="15"></maxLength>
    				</restriction>
    			</simpleType>
    		</element>
    		<element name="CustomerNo" minOccurs="0" maxOccurs="1">
    			<simpleType>
    				<restriction base="string">
    					<minLength value="0"></minLength>
    					<maxLength value="9"></maxLength>
    				</restriction>
    			</simpleType>
    		</element>
    		<element name="ParcelCount" minOccurs="1" maxOccurs="1"
    			nillable="false">
    			<annotation>
    				<documentation>
    					Number of parcels included in the shipment, this
    					number has to be coherent with the delivery and
    					the collection mode selected
    				</documentation>
    			</annotation>
    			<simpleType>
    				<restriction base="int">
    					<minInclusive value="1"></minInclusive>
    					<maxInclusive value="99"></maxInclusive>
    				</restriction>
    			</simpleType>
    		</element>
    		<element name="ShipmentValue"
    			type="tns:MonetaryAmountType">
    			<annotation>
    				<documentation>Value of the content</documentation>
    			</annotation>
    		</element>
    		<element name="Options" type="tns:OptionListType"
    			minOccurs="0" maxOccurs="1">
    		</element>
    		<element name="DeliveryMode"
    			type="tns:ProductConfigurationType" minOccurs="1" maxOccurs="1"
    			nillable="false">
    		</element>
    		<element name="CollectionMode"
    			type="tns:ProductConfigurationType" minOccurs="1"
    			maxOccurs="1">
    		</element>
    		<element name="Parcels" type="tns:ParcelListType"
    			minOccurs="1" maxOccurs="1" nillable="false">
    			<annotation>
    				<documentation>
    					List of parcels included in the shipment
    				</documentation>
    			</annotation>
    		</element>
    		<element name="DeliveryInstruction" minOccurs="0"
    			maxOccurs="1">
    			<simpleType>
    				<restriction base="string">
    					<minLength value="0"></minLength>
    				</restriction>
    			</simpleType>
    		</element>
    		<element name="Sender" type="tns:SenderDetailsType" minOccurs="1" maxOccurs="1" nillable="false">
    			<annotation>
    				<documentation>Informations about the sender of the parcel</documentation>
    			</annotation></element>
    		<element name="Recipient" type="tns:RecipientDetailsType" minOccurs="1" maxOccurs="1" nillable="false">
    			<annotation>
    				<documentation>Informations about the recipient of the parcel</documentation>
    			</annotation></element>
    	</sequence>
    </complexType>

    <complexType name="MonetaryAmountType">
    	<sequence>
    	</sequence>
    	<attribute name="Currency">
            <annotation>
            	<documentation>Currency of the amount</documentation>
            </annotation>
            <simpleType>
            	<restriction base="string">
            		<minLength value="0"></minLength>
            		<enumeration value="value">
            			<annotation>
            				<documentation>Devise du montant</documentation>
            			</annotation></enumeration>
            	</restriction>
            </simpleType>
    	</attribute>
    	<attribute name="Amount" type="float"></attribute>
    </complexType>

    <complexType name="OptionListType">
    	<sequence>
    		<element name="Option" type="tns:KeyValueType" minOccurs="0" maxOccurs="unbounded"></element>
    	</sequence>
    </complexType>

    <complexType name="KeyValueType">
    	<attribute name="Key" type="string"></attribute>
    	<attribute name="Value" type="string"></attribute>
    </complexType>

    <complexType name="ProductConfigurationType">
    	<sequence></sequence>
    	<attribute name="Mode" type="string" use="required">
    		<annotation>
    			<documentation>The product code for the operation</documentation>
    		</annotation></attribute>
    	<attribute name="Location" type="string" use="optional">
    		<annotation>
    			<documentation>Location code where the presatation will be done (ie : the parcel shop ID (FR00001) for parcel shop delivery )</documentation></annotation></attribute>
    </complexType>

    <complexType name="ParcelListType">
    	<sequence>
    		<element name="Parcel" type="tns:ParcelType" minOccurs="1" maxOccurs="unbounded" nillable="false">
    			<annotation>
    				<documentation>each parcel of the shipment will be described with an element
</documentation>
    			</annotation></element>
    	</sequence>
    </complexType>

    <complexType name="ParcelType">
    	<sequence>
    		<element name="Content" minOccurs="0" maxOccurs="1">
                <annotation>
                	<documentation>A brief description of the parcel content</documentation></annotation>
                <simpleType>
    				<restriction base="string">
    					<minLength value="0"></minLength>
    					<maxLength value="40"></maxLength>
    				</restriction>
    			</simpleType>
    		</element>
    		<element name="Length" minOccurs="0" maxOccurs="1" type="tns:MeasureAmountType">
                <annotation>
                	<documentation>The length of the parcel (in cm) , unit has to be specified in the unit attribute</documentation>
                </annotation>
    		</element>
    		<element name="Width" minOccurs="0" maxOccurs="1" type="tns:MeasureAmountType">
                <annotation>
                	<documentation>The width of the parcel (in cm) , unit has to be specified in the unit attribute</documentation></annotation>
    		</element>
    		<element name="Depth" type="tns:MeasureAmountType" minOccurs="0" maxOccurs="1">
    			<annotation>
    				<documentation>The depth of the parcel (in cm) , unit has to be specified in the unit attribute</documentation></annotation></element>
    		<element name="Weight" type="tns:MeasureAmountType" minOccurs="1" maxOccurs="1">
    			<annotation>
    				<documentation>The weight of the parcel (in gram) , unit has to be specified in the unit attribute</documentation></annotation></element>
    	</sequence>
    </complexType>

    <complexType name="MeasureAmountType">
    	<attribute name="Value" type="float" use="required"></attribute>
    	<attribute name="Unit" use="required">
    		<simpleType>
    			<restriction base="string">
    					<minLength value="0"></minLength>
    			</restriction>
    		</simpleType>
    	</attribute>
    </complexType>

    <complexType name="SenderDetailsType">
    	<sequence>
    		<element name="Address" type="tns:AddressType" minOccurs="1" maxOccurs="1" nillable="true"></element>
    	</sequence>
    </complexType>
    
    <complexType name="RecipientDetailsType">
    	<sequence>
    		<element name="Address" type="tns:AddressType" minOccurs="1" maxOccurs="1" nillable="false"></element>
    	</sequence>
    </complexType>

    <complexType name="AddressType">
    	<sequence>
    		<element name="Title" nillable="true" minOccurs="0"
    			maxOccurs="1">
                <annotation>
                	<documentation>If the address is a person, this field is for the person title (Mr, Ms, Miss, ...)</documentation>
                </annotation>
                <simpleType>
    				<restriction base="string">
    					<minLength value="0"></minLength>
    					<maxLength value="30"></maxLength>
    				</restriction>
    			</simpleType>
    		</element>
    		<element name="Firstname" minOccurs="0" maxOccurs="1">
    			<annotation>
    				<documentation>
    					If the address is a person
    				</documentation>
    			</annotation>
    			<simpleType>
    				<restriction base="string">
    					<minLength value="0"></minLength>
    					<maxLength value="30"></maxLength>
    				</restriction>
    			</simpleType>
    		</element>
    		<element name="Lastname" minOccurs="0" maxOccurs="1">
    			<annotation>
    				<documentation>If the address is a person, 
    				</documentation>
    			</annotation>
    			<simpleType>
    				<restriction base="string">
    					<minLength value="0"></minLength>
    					<maxLength value="30"></maxLength>
    				</restriction>
    			</simpleType>
    		</element>
    		<element name="Streetname" type="string" minOccurs="1" maxOccurs="1">
    			<annotation>
    				<documentation></documentation>
    			</annotation></element>
    		<element name="HouseNo" minOccurs="0" maxOccurs="1">
    			<simpleType>
    				<restriction base="string">
    					<minLength value="0"></minLength>
    					<maxLength value="10"></maxLength>
    				</restriction>
    			</simpleType>
    		</element>
    		<element name="CountryCode" minOccurs="1" maxOccurs="1" nillable="false">
                <annotation>
                	<documentation>The two letter country code of the addressee (e. g. DE, GB). For a complete list of country code, refer to the standard ISO 3166-1-alpha-2</documentation></annotation>
                <simpleType>
    				<restriction base="string">
    					<length value="2"></length>
    				</restriction>
    			</simpleType>
    		</element>
    		<element name="PostCode" nillable="false" minOccurs="1" maxOccurs="1">
    			<simpleType>
    				<restriction base="string">
    					<minLength value="0"></minLength>
    					<maxLength value="10"></maxLength>
    				</restriction>
    			</simpleType>
    		</element>
    		<element name="City" minOccurs="1" maxOccurs="1" nillable="false">
    			<simpleType>
    				<restriction base="string">
    					<minLength value="0"></minLength>
    					<maxLength value="30"></maxLength>
    				</restriction>
    			</simpleType>
    		</element>
    		<element name="AddressAdd1" minOccurs="0" maxOccurs="1">
    			<simpleType>
    				<restriction base="string">
    					<minLength value="0"></minLength>
    					<maxLength value="30"></maxLength>
    				</restriction>
    			</simpleType>
    		</element>
    		<element name="AddressAdd2" minOccurs="0" maxOccurs="1">
                <annotation>
                	<documentation>Additional address information (e.g. Building, Floor). </documentation>
                </annotation>
                <simpleType>
    				<restriction base="string">
    					<minLength value="0"></minLength>
    					<maxLength value="30"></maxLength>
    				</restriction>
    			</simpleType>
    		</element>
    		<element name="AddressAdd3" minOccurs="0" maxOccurs="1">
    			<annotation>
    				<documentation>
    					Additional address information (e.g. locality
    					name).
    				</documentation>
    			</annotation>
    			<simpleType>
    				<restriction base="string">
    					<minLength value="0"></minLength>
    					<maxLength value="30"></maxLength>
    				</restriction>
    			</simpleType>
    		</element>
    		<element name="PhoneNo" minOccurs="0" maxOccurs="1">
    			<annotation>
    				<documentation>
    					The phone number of the addressee. Please
    					specify the area code (e.g. +33 for FRANCE).
    				</documentation>
    			</annotation>
    			<simpleType>
    				<restriction base="string">
    					<minLength value="0"></minLength>
    					<maxLength value="20"></maxLength>
    					<pattern value="\+\d{3,20}"></pattern>
    				</restriction>
    			</simpleType>
    		</element>
    		<element name="MobileNo" minOccurs="0" maxOccurs="1">
    			<annotation>
    				<documentation>
    					The mobile phone number of the addressee. Please
    					specify the area code (e.g. +33 for FRANCE).
    				</documentation>
    			</annotation>
    			<simpleType>
    				<restriction base="string">
    					<minLength value="0"></minLength>
    					<maxLength value="20"></maxLength>
    					<pattern value="\+\d{3,20}"></pattern>
    				</restriction>
    			</simpleType>
    		</element>
    		<element name="Email" maxOccurs="1" minOccurs="0">
                <annotation>
                	<documentation>The email address of the addressee.
Format : xxxxxx@xxx.xx
</documentation></annotation>
                <simpleType>
                	<restriction base="string">
                		<minLength value="0"></minLength>
                		<maxLength value="70"></maxLength>
                	</restriction>
                </simpleType>
    		</element>
    	</sequence>
    </complexType>
</schema>