<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns:tns="urn:icsy:venice:types:communication" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:basic="urn:icsy:venice:types:basic" xmlns:domain="urn:icsy:venice:types:domain" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:icsy:venice:types:communication">
	<import namespace="urn:icsy:venice:types:basic" schemaLocation="http://www.v-grid.info/types/basic.xsd"/>
	<import namespace="urn:icsy:venice:types:domain" schemaLocation="http://www.v-grid.info/types/domain.xsd"/>
	<simpleType name="EMailAddress">
		<annotation>
			<documentation>An email address.</documentation>
		</annotation>
		<restriction base="string"/>
	</simpleType>
	<simpleType name="FaxNumber">
		<annotation>
			<documentation>A fax number.</documentation>
		</annotation>
		<restriction base="string"/>
	</simpleType>
	<simpleType name="PhoneNumber">
		<annotation>
			<documentation>A telephone number.</documentation>
		</annotation>
		<restriction base="string"/>
	</simpleType>
	<simpleType name="MessagePriority" final="">
		<annotation>
			<documentation>The priority of a message.</documentation>
		</annotation>
		<restriction base="string">
			<enumeration value="VeryLow"/>
			<enumeration value="Low"/>
			<enumeration value="Normal"/>
			<enumeration value="High"/>
			<enumeration value="VeryHigh"/>
		</restriction>
	</simpleType>
	<simpleType name="MessageEncoding">
		<annotation>
			<documentation>A list of encodings.</documentation>
		</annotation>
		<restriction base="string">
			<enumeration value="US-ASCII"/>
			<enumeration value="Windows-1250"/>
			<enumeration value="Windows-1251"/>
			<enumeration value="Windows-1252"/>
			<enumeration value="Windows-1253"/>
			<enumeration value="Windows-1254"/>
			<enumeration value="Windows-1255"/>
			<enumeration value="Windows-1256"/>
			<enumeration value="Windows-1257"/>
			<enumeration value="Windows-1258"/>
			<enumeration value="ISO-8859-1"/>
			<enumeration value="ISO-8859-2"/>
			<enumeration value="ISO-8859-3"/>
			<enumeration value="ISO-8859-4"/>
			<enumeration value="ISO-8859-5"/>
			<enumeration value="ISO-8859-6"/>
			<enumeration value="ISO-8859-7"/>
			<enumeration value="ISO-8859-8"/>
			<enumeration value="ISO-8859-9"/>
			<enumeration value="ISO-8859-10"/>
			<enumeration value="ISO-8859-11"/>
			<enumeration value="ISO-8859-13"/>
			<enumeration value="ISO-8859-14"/>
			<enumeration value="ISO-8859-15"/>
			<enumeration value="ISO-8859-16"/>
			<enumeration value="KOI8-R"/>
			<enumeration value="UTF-8"/>
			<enumeration value="UTF-16"/>
			<enumeration value="Big5"/>
			<enumeration value="Big5-HKSCS"/>
		</restriction>
	</simpleType>
	<complexType name="EMail">
		<annotation>
			<documentation>An email data structure.</documentation>
		</annotation>
		<sequence>
			<element name="to" type="tns:EMailAddress" maxOccurs="32">
				<annotation>
					<documentation>The recipient of the email.</documentation>
				</annotation>
			</element>
			<element name="cc" type="tns:EMailAddress" minOccurs="0" maxOccurs="32">
				<annotation>
					<documentation>The carbon copy recipients of the email.</documentation>
				</annotation>
			</element>
			<element name="bcc" type="tns:EMailAddress" minOccurs="0" maxOccurs="32">
				<annotation>
					<documentation>The blind carbon copy recipients of the email.</documentation>
				</annotation>
			</element>
			<element name="replyTo" type="tns:EMailAddress" minOccurs="0">
				<annotation>
					<documentation>A reply shall be sent to this address.</documentation>
				</annotation>
			</element>
			<element name="subject">
				<annotation>
					<documentation>The subject of the message.</documentation>
				</annotation>
				<simpleType>
					<restriction base="string">
						<maxLength value="256"/>
					</restriction>
				</simpleType>
			</element>
			<element name="text">
				<annotation>
					<documentation>The actual message text, i.e. the body of the email.</documentation>
				</annotation>
				<simpleType>
					<restriction base="string">
						<maxLength value="10000"/>
					</restriction>
				</simpleType>
			</element>
			<element name="attachments" type="basic:File" minOccurs="0" maxOccurs="32">
				<annotation>
					<documentation>The attachments of the email.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<element name="EMail" type="tns:EMail">
		<annotation>
			<documentation>An email data structure.</documentation>
		</annotation>
	</element>
	<element name="FaxData">
		<annotation>
			<documentation>A datatype representing the data to send via fax.</documentation>
		</annotation>
	</element>
	<complexType name="FaxData">
		<annotation>
			<documentation>A datatype representing the data to send via fax.</documentation>
		</annotation>
		<sequence>
			<choice>
				<annotation>
					<documentation>The recipient(s) of the fax.</documentation>
				</annotation>
				<element name="recipient" type="tns:FaxNumber" maxOccurs="100">
					<annotation>
						<documentation>The recipient fax number(s).</documentation>
					</annotation>
				</element>
				<element name="domain" type="domain:DomainName">
					<annotation>
						<documentation>A domain name to broadcast the fax to.</documentation>
					</annotation>
				</element>
			</choice>
			<choice>
				<annotation>
					<documentation>The data to send via fax.</documentation>
				</annotation>
				<element name="files" type="basic:File" maxOccurs="100">
					<annotation>
						<documentation>The files to send via fax.</documentation>
					</annotation>
				</element>
				<element name="text" type="string">
					<annotation>
						<documentation>A plain text to send via fax.</documentation>
					</annotation>
				</element>
			</choice>
		</sequence>
	</complexType>
	<element name="Message">
		<annotation>
			<documentation>A message.</documentation>
		</annotation>
	</element>
	<complexType name="Message">
		<annotation>
			<documentation>A message.</documentation>
		</annotation>
		<sequence>
			<element name="header" type="tns:MessageHeader" nillable="false">
				<annotation>
					<documentation>The header of the message contains necessary meta information and can be retrieved separately.</documentation>
				</annotation>
			</element>
			<element name="text" nillable="false">
				<annotation>
					<documentation>The messages text body.</documentation>
				</annotation>
				<simpleType>
					<restriction base="string">
						<maxLength value="64000"/>
					</restriction>
				</simpleType>
			</element>
			<element name="attachments" type="basic:File" minOccurs="0" maxOccurs="32">
				<annotation>
					<documentation>The attachments of the message.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<element name="MessageHeader" type="tns:MessageHeader">
		<annotation>
			<documentation>The header information of a message.</documentation>
		</annotation>
	</element>
	<complexType name="MessageHeader">
		<annotation>
			<documentation>The header information of a message.</documentation>
		</annotation>
		<sequence>
			<element name="to" type="domain:UserName" maxOccurs="32">
				<annotation>
					<documentation>The receivers identity.</documentation>
				</annotation>
			</element>
			<element name="replyTo" type="domain:UserName" minOccurs="0">
				<annotation>
					<documentation>The identity to use when replying to this message.</documentation>
				</annotation>
			</element>
			<element name="carbonCopy" type="domain:UserName" minOccurs="0" maxOccurs="32">
				<annotation>
					<documentation>The identity of the users that should receive a carbon copy of this message.</documentation>
				</annotation>
			</element>
			<element name="blindCarbonCopy" type="domain:UserName" minOccurs="0" maxOccurs="32">
				<annotation>
					<documentation>The identity of the users that should receive a blind carbon copy of this message, i.e. all the other users will not see that the message has been sent to those users.</documentation>
				</annotation>
			</element>
			<element name="from" type="domain:UserName" minOccurs="0">
				<annotation>
					<documentation>The identity of the message sender.</documentation>
				</annotation>
			</element>
			<element name="ID" type="basic:UUID" minOccurs="0">
				<annotation>
					<documentation>The unique ID if the message.</documentation>
				</annotation>
			</element>
			<element name="refersToID" type="basic:UUID" minOccurs="0">
				<annotation>
					<documentation>If the message is a reply to another message, then this field indicated the ID it refers to.</documentation>
				</annotation>
			</element>
			<element name="timestamp" type="dateTime" minOccurs="0">
				<annotation>
					<documentation>The timestamp when the message has been sent.</documentation>
				</annotation>
			</element>
			<element name="encoding" type="tns:MessageEncoding" default="UTF-8" nillable="false" minOccurs="0">
				<annotation>
					<documentation>The character encoding of the message (subject and text).</documentation>
				</annotation>
			</element>
			<element name="subject" type="basic:String" nillable="false">
				<annotation>
					<documentation>The message's subject.</documentation>
				</annotation>
			</element>
			<element name="priority" type="tns:MessagePriority" default="Normal" minOccurs="0">
				<annotation>
					<documentation>The priority of the message.</documentation>
				</annotation>
			</element>
			<element name="sendMessageDispositionNotification" type="boolean" default="false" minOccurs="0">
				<annotation>
					<documentation>If this flag is set, a message will be sent back to the "from" address when the message has been downloaded by the receiver ("to" addresses only).</documentation>
				</annotation>
			</element>
			<element name="sendDeliveryStatusNotification" type="boolean" default="false" minOccurs="0">
				<annotation>
					<documentation>If this flag is set, a message will be sent back to the "from" address when the message has been delivered to the receiver's message box ("to" addresses only).</documentation>
				</annotation>
			</element>
			<element name="X" type="basic:KeyValuePair" minOccurs="0" maxOccurs="32">
				<annotation>
					<documentation>The extension fiields of a message will remain untouched by any service forwarding the message.</documentation>
				</annotation>
			</element>
			<element name="attachmentCount" type="int" minOccurs="0">
				<annotation>
					<documentation>The number of attachments if any. This field will be set by the service.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<element name="MessageHeaderArray" type="tns:MessageHeader">
		<annotation>
			<documentation>An array of message headers.</documentation>
		</annotation>
	</element>
	<complexType name="MessageHeaderArray">
		<annotation>
			<documentation>An array of message headers.</documentation>
		</annotation>
		<sequence>
			<element name="contents" type="tns:MessageHeader" minOccurs="0" maxOccurs="unbounded"/>
		</sequence>
	</complexType>
</schema>

