<?xml version="1.0" encoding="UTF-8"?>
<!-- ============================================================================================================
         * File Name :               	RetrieveTIGroupsV1.xsd
         * Author :                    	Davy Tielens
         * Owner :                    	CBSS
         * Creation date :          	29/04/2010
         * Last revision date :    	23/05/2011
         * Status :                    	Planned
         * Description :             	Types XSD for webservice enabling the PCSA's to fetch TI's from the NR
         * Current version :        	0.4
         * Revision History : 		0.1 - 29/04/2010 - DTI - Initial version
												0.2 - 29/07/2010 - MDS - Completion of first version of XSD
												0.3 - 23/05/2011   import rn25_Release201103 vs  rn25_Release201100
												0.4  17/11/2011 ATI change schema RRN 201104 vs 20103
============================================================================================================= -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://kszbcss.fgov.be/types/RetrieveTIGroups/v1" xmlns:rn="http://www.ibz.rrn.fgov.be/XSD/xm25/rn25Schema" targetNamespace="http://kszbcss.fgov.be/types/RetrieveTIGroups/v1" elementFormDefault="unqualified" attributeFormDefault="unqualified">
	<xsd:import namespace="http://www.ibz.rrn.fgov.be/XSD/xm25/rn25Schema" schemaLocation="rn25_Release201104.xsd"/>
	<xsd:complexType name="RetrieveTIGroupsRequestType">
		<xsd:sequence>
			<xsd:element name="informationCustomer" type="InformationCustomerType">
				<xsd:annotation>
					<xsd:documentation>Customer information.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="informationCBSS" type="InformationCBSSType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>CBSS information.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="searchInformation" type="SearchInformationType">
				<xsd:annotation>
					<xsd:documentation>Search parameters.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="RetrieveTIGroupsResponseType">
		<xsd:sequence>
			<xsd:element name="informationCustomer" type="InformationCustomerType">
				<xsd:annotation>
					<xsd:documentation>Customer information.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="informationCBSS" type="InformationCBSSType">
				<xsd:annotation>
					<xsd:documentation>CBSS Information.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="status" type="StatusType">
				<xsd:annotation>
					<xsd:documentation>Status of the treatment.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="searchInformation" type="SearchInformationType">
				<xsd:annotation>
					<xsd:documentation>Search parameters used for the request.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="rrn_it_implicit" type="rn:FileInfoType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>A listing of IT's for the given SSIN.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="RetrieveTIGroupsFaultType">
		<xsd:sequence>
			<xsd:element name="informationCustomer" type="InformationCustomerType"/>
			<xsd:element name="informationCBSS" type="InformationCBSSType"/>
			<xsd:element name="error" type="MessageType" maxOccurs="30"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="StatusType">
		<xsd:sequence>
			<xsd:element name="value">
				<xsd:annotation>
					<xsd:documentation>Global status of the result.</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:enumeration value="DATA_FOUND"/>
						<xsd:enumeration value="NO_DATA_FOUND"/>
						<xsd:enumeration value="NO_RESULT"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="code">
				<xsd:annotation>
					<xsd:documentation>The code of the status.</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:maxLength value="16"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="description" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>The description of the status.</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:maxLength value="256"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="information" type="InformationType" minOccurs="0" maxOccurs="5"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="retrieveTIResponse">
		<xsd:sequence/>
	</xsd:complexType>
	<xsd:complexType name="InformationCBSSType">
		<xsd:annotation>
			<xsd:documentation>Information block from CBSS.</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="ticketCBSS" type="UUIDType">
				<xsd:annotation>
					<xsd:documentation>Ticket attributed to this treatment by the CBSS.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="timestampReceive" type="xsd:dateTime">
				<xsd:annotation>
					<xsd:documentation>Time request was received by CBSS.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="timestampReply" type="xsd:dateTime">
				<xsd:annotation>
					<xsd:documentation>Time reply was sent by CBSS.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="InformationCustomerType">
		<xsd:annotation>
			<xsd:documentation>Information block that can be used by the customer for diagnostic use.</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="ticket" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Client can assign their own ticket reference for the request. Not mandatory.</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:maxLength value="32"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="timestampSent" type="xsd:dateTime" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Timestamp when client sent request.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="customerIdentification" type="CustomerIdentificationType">
				<xsd:annotation>
					<xsd:documentation>Identification of the customer. Either a CBE number, or a sector/institution combination is needed.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="CustomerIdentificationType">
		<xsd:choice>
			<xsd:element name="cbeNumber" type="CbeNumberType">
				<xsd:annotation>
					<xsd:documentation>Customer CBE number.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:sequence>
				<xsd:element name="sector">
					<xsd:annotation>
						<xsd:documentation>Customer sector.</xsd:documentation>
					</xsd:annotation>
					<xsd:simpleType>
						<xsd:restriction base="xsd:unsignedShort">
							<xsd:maxInclusive value="999"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:element>
				<xsd:element name="institution">
					<xsd:annotation>
						<xsd:documentation>Customer institution.</xsd:documentation>
					</xsd:annotation>
					<xsd:simpleType>
						<xsd:restriction base="xsd:unsignedShort">
							<xsd:maxInclusive value="999"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:element>
			</xsd:sequence>
		</xsd:choice>
	</xsd:complexType>
	<xsd:simpleType name="CbeNumberType">
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="\d{10}"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="SSINType">
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="\d{11}"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:complexType name="MessageType">
		<xsd:sequence>
			<xsd:element name="severity" type="SeverityType"/>
			<xsd:element name="reasonCode">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:maxLength value="16"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="diagnostic">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:maxLength value="256"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="authorCode">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:maxLength value="64"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="information" type="InformationType" minOccurs="0" maxOccurs="5"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="InformationType">
		<xsd:sequence>
			<xsd:element name="fieldName" minOccurs="0">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:maxLength value="64"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="fieldValue" minOccurs="0">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:maxLength value="256"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:simpleType name="SeverityType">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="INFORMATION"/>
			<xsd:enumeration value="WARNING"/>
			<xsd:enumeration value="FATAL"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="UUIDType">
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="LanguageType">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="nl"/>
			<xsd:enumeration value="fr"/>
			<xsd:enumeration value="de"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:complexType name="SearchInformationType">
		<xsd:sequence>
			<xsd:element name="ssin" type="SSINType">
				<xsd:annotation>
					<xsd:documentation>SSIN for the search.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="language" type="LanguageType" default="fr" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Language to use.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="history" type="xsd:boolean" default="false" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Whether or not to return history.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
</xsd:schema>
