<?xml version="1.0" encoding="UTF-8"?>
<!--
	Reverse engineered MSN AddressBook webservice XML Schema
	Part: Service types. (Convience types to use with the web service binding)

	by Michaël Larouche <michael.larouche@kdemail.net>
	and Javier Kohen <javier.kohen@buddystream.com>
	Latest update: 27 July 2006
-->
<xsd:schema
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns="http://www.msn.com/webservices/AddressBook"
	xmlns:msnab="http://www.msn.com/webservices/AddressBook"
	targetNamespace="http://www.msn.com/webservices/AddressBook"
	 version="1.0"
	 elementFormDefault="qualified" >
	<xsd:annotation>
		<xsd:documentation>
			Copyright (c) 2006 Michaël Larouche &lt;michael.larouche@kdemail.net&gt;

			Permission to use, copy, modify and distribute this XML Schema
			and its accompanying documentation for any purpose and without fee
			is hereby granted in perpetuity, provided that the above copyright
			notice and this paragraph appear in all copies.  The copyright
			holders make no representation about the suitability of the XML Schema for
			any purpose. It is provided "as is" without expressed or implied
			warranty.

			This a reverse engineered XML Schema done for interopability purpose.
		</xsd:documentation>
	</xsd:annotation>
	<xsd:annotation>
		<xsd:documentation>
			This XML Schema expose the service types(Convience types to use with the web service binding) of the MSN AddressBook Web service
			used by Windows Live Messenger. Microsoft did not disclose the description of
			the web service so we are stuck reverse engineering it. This XML Schema along with the WSDL
			description will automate the generation of a WDSL binding to MSN AddressBook Web service.
		</xsd:documentation>
	</xsd:annotation>

	<!-- Include MSN AddressBook data types -->
	<xsd:include schemaLocation="msnab_datatypes.xsd" />

	<xsd:element name="ABApplicationHeader">
		<xsd:annotation>
			<xsd:documentation>
				ABApplicationHeader is a part of request SOAP header, it identify the application information.
			</xsd:documentation>
		</xsd:annotation>

		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="ApplicationId" type="Guid" fixed="09607671-1C32-421F-A6A6-CBFAA51AB5F4" />
				<xsd:element name="IsMigration" type="xsd:boolean" />
				<xsd:element name="PartnerScenario" type="xsd:string" />
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="ABAuthHeader">
		<xsd:annotation>
			<xsd:documentation>
				ABAuthHeader meaning unknow for the moment but it's a part of request SOAP header.
			</xsd:documentation>
		</xsd:annotation>

		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="ManagedGroupRequest" type="xsd:boolean" />
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="ServiceHeader">
		<xsd:annotation>
			<xsd:documentation>
				ServiceHeade is the SOAP Header received in a MSN AddressBook webservice response.
			</xsd:documentation>
		</xsd:annotation>

		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="Version" type="xsd:string" />
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>


	<xsd:complexType name="FindMembershipRequestType">
		<xsd:annotation>
			<xsd:documentation>
				Parameters to the FindMembership SOAP Action
			</xsd:documentation>
		</xsd:annotation>

		<xsd:sequence>
			<xsd:element name="serviceFilter">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="Types">
							<xsd:complexType>
								<xsd:sequence>
									<xsd:element name="ServiceType" type="xsd:string" maxOccurs="unbounded" />
								</xsd:sequence>
							</xsd:complexType>
						</xsd:element>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>

			<xsd:element name="View" type="xsd:string" minOccurs="0" />
			<xsd:element name="deltasOnly" type="xsd:boolean" minOccurs="0" />
			<xsd:element name="lastChange" type="xsd:dateTime" minOccurs="0" />
		</xsd:sequence>
	</xsd:complexType>

	<xsd:element name="FindMembership" type="FindMembershipRequestType" />

	<xsd:complexType name="FindMembershipResultType">
		<xsd:annotation>
			<xsd:documentation>
				FindMembershipResult contains a list of Service and the "myself" information.
			</xsd:documentation>
		</xsd:annotation>

		<xsd:sequence>
			<xsd:element name="Services">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="Service" type="ServiceType" minOccurs="0" maxOccurs="unbounded" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="OwnerNamespace">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="Info">
							<xsd:complexType>
								<xsd:sequence>
									<xsd:element name="Handle">
										<xsd:complexType>
											<xsd:sequence>
												<xsd:element name="Id" type="xsd:string" />
												<xsd:element name="IsPassportNameHidden" type="xsd:boolean" />
												<xsd:element name="CID" type="xsd:integer" />
											</xsd:sequence>
										</xsd:complexType>
									</xsd:element>
									<xsd:element name="CreatorPuid" type="xsd:integer" />
									<xsd:element name="CreatorCID" type="xsd:integer" />
									<xsd:element name="CreatorPassportName" type="xsd:string" />
									<xsd:element name="CircleAttributes">
										<xsd:complexType>
											<xsd:sequence>
												<xsd:element name="IsPresenceEnabled" type="xsd:boolean" />
												<xsd:element name="IsEvent" type="xsd:boolean" />
												<xsd:element name="Domain" type="xsd:string" />
											</xsd:sequence>
										</xsd:complexType>
									</xsd:element>
								</xsd:sequence>
							</xsd:complexType>
						</xsd:element>
						<xsd:element name="Changes" type="xsd:string" /> <!-- Temp -->
						<xsd:element name="CreateDate" type="xsd:dateTime" />
						<xsd:element name="LastChange" type="xsd:dateTime" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:element name="FindMembershipResponse">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="FindMembershipResult" type="FindMembershipResultType" />
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<xsd:complexType name="ABFindAllRequestType">
		<xsd:annotation>
			<xsd:documentation>
				Parameters to the ABFindAll SOAP Action
			</xsd:documentation>
		</xsd:annotation>

		<xsd:sequence>
			<xsd:element name="abId" type="Guid" fixed="00000000-0000-0000-0000-000000000000" />
			<xsd:element name="abView" type="xsd:string" minOccurs="0" />
			<xsd:element name="deltasOnly" type="xsd:boolean" minOccurs="0" />
			<xsd:element name="lastChange" type="xsd:dateTime" minOccurs="0" />
		</xsd:sequence>
	</xsd:complexType>

	<xsd:element name="ABFindAll" type="ABFindAllRequestType" />

	<xsd:complexType name="ABFindAllResultType">
		<xsd:annotation>
			<xsd:documentation>
				ABFindAllResult contains a list of contacts and address
				book information.
			</xsd:documentation>
		</xsd:annotation>

		<xsd:sequence>
			<xsd:element name="groups">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="Group" type="GroupType"
							minOccurs="0" maxOccurs="unbounded" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="contacts">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="Contact" type="ContactType"
							minOccurs="0" maxOccurs="unbounded" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="CircleResult">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="CircleTicket" type="xsd:string" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="ab">
				<xsd:complexType>
					<xsd:sequence>
                        <xsd:element name="abId" type="Guid">
						</xsd:element>
                        <xsd:element name="abInfo">
							<xsd:complexType>
								<xsd:sequence>
									<xsd:element name="ownerPuid"
										type="xsd:integer" />
									<xsd:element name="OwnerCID"
										type="xsd:integer" />
									<xsd:element name="ownerEmail"
										type="xsd:string" />
									<xsd:element name="fDefault"
										type="xsd:boolean" />
									<xsd:element name="joinedNamespace"
										type="xsd:boolean" />
									<xsd:element name="IsBot" type="xsd:boolean" />
									<xsd:element name="IsParentManaged" type="xsd:boolean" />
									<xsd:element name="SubscribeExternalPartner" type="xsd:boolean" />
									<xsd:element name="NotifyExternalPartner" type="xsd:boolean" />
									<xsd:element name="AddressBookType" type="xsd:string" />
								</xsd:sequence>
							</xsd:complexType>
						</xsd:element>
						<xsd:element name="lastChange"
							type="xsd:dateTime" />
						<xsd:element name="DynamicItemLastChanged"
							type="xsd:dateTime" />
						<xsd:element name="createDate"
							type="xsd:dateTime" />
						<xsd:element name="propertiesChanged"
							type="xsd:string"><!-- Is this a list? --></xsd:element>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:element name="ABFindAllResponse">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="ABFindAllResult" type="ABFindAllResultType" />
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<xsd:complexType name="ABContactAddRequestType">
		<xsd:annotation>
			<xsd:documentation>
				Parameters to the ABContactAdd SOAP Action
			</xsd:documentation>
		</xsd:annotation>

		<xsd:sequence>
			<xsd:element name="abId" type="Guid" fixed="00000000-0000-0000-0000-000000000000" />
			<xsd:element name="contacts">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="Contact" type="ContactType"
							minOccurs="0" maxOccurs="unbounded" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="options" maxOccurs="1" minOccurs="0">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="EnableAllowListManagement" type="xsd:boolean" minOccurs="0" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:element name="ABContactAdd" type="ABContactAddRequestType" />

	<xsd:complexType name="ABContactAddResultType">
		<xsd:annotation>
			<xsd:documentation>
				ABContactAddResult optionally contains the contact ID.
			</xsd:documentation>
		</xsd:annotation>

		<xsd:sequence>
			<xsd:element name="guid" type="Guid" />
		</xsd:sequence>
	</xsd:complexType>

	<xsd:element name="ABContactAddResponse">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="ABContactAddResult" type="ABContactAddResultType" maxOccurs="1" minOccurs="0" />
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<xsd:complexType name="ABGroupContactAddRequestType">
		<xsd:annotation>
			<xsd:documentation>
				Parameters to the ABGroupContactAdd SOAP Action
			</xsd:documentation>
		</xsd:annotation>

		<xsd:sequence>
			<xsd:element name="abId" type="Guid" fixed="00000000-0000-0000-0000-000000000000" />
			<xsd:element name="groupFilter" type="groupFilterType" />
			<xsd:element name="contacts">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="Contact" type="ContactType"
							minOccurs="0" maxOccurs="unbounded" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="groupContactAddOptions" maxOccurs="1" minOccurs="0">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="fGenerateMissingQuickName" type="xsd:boolean" minOccurs="0" />
						<xsd:element name="EnableAllowListManagement" type="xsd:boolean" minOccurs="0" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:element name="ABGroupContactAdd" type="ABGroupContactAddRequestType" />

	<xsd:complexType name="ABGroupContactAddResultType">
		<xsd:annotation>
			<xsd:documentation>
				ABGroupContactAddResult optionally contains the group ID.
			</xsd:documentation>
		</xsd:annotation>

		<xsd:sequence>
			<xsd:element name="guid" type="Guid" />
		</xsd:sequence>
	</xsd:complexType>

	<xsd:element name="ABGroupContactAddResponse">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="ABGroupContactAddResult" type="ABGroupContactAddResultType" maxOccurs="1" minOccurs="0" />
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<xsd:complexType name="ABGroupAddRequestType">
		<xsd:annotation>
			<xsd:documentation>
				Parameters to the ABGroupAdd SOAP Action
			</xsd:documentation>
		</xsd:annotation>

		<xsd:sequence>
			<xsd:element name="abId" type="Guid" fixed="00000000-0000-0000-0000-000000000000" />
			<xsd:element name="groupAddOptions">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="fRenameOnMsgrConflict" type="xsd:boolean" minOccurs="0" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="groupInfo">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="GroupInfo" type="groupInfoType" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:element name="ABGroupAdd" type="ABGroupAddRequestType" />

	<xsd:complexType name="ABGroupAddResultType">
		<xsd:annotation>
			<xsd:documentation>
				ABGroupAddResult contains the group ID.
			</xsd:documentation>
		</xsd:annotation>

		<xsd:sequence>
			<xsd:element name="guid" type="Guid" />
		</xsd:sequence>
	</xsd:complexType>

	<xsd:element name="ABGroupAddResponse">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="ABGroupAddResult" type="ABGroupAddResultType" maxOccurs="1" minOccurs="0" />
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<xsd:complexType name="ABGroupUpdateRequestType">
		<xsd:annotation>
			<xsd:documentation>
				Parameters to the ABGroupUpdate SOAP Action
			</xsd:documentation>
		</xsd:annotation>

		<xsd:sequence>
			<xsd:element name="abId" type="Guid" fixed="00000000-0000-0000-0000-000000000000" />
			<xsd:element name="groups">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="Group" type="GroupType"
							minOccurs="0" maxOccurs="unbounded" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:element name="ABGroupUpdate" type="ABGroupUpdateRequestType" />

	<xsd:element name="ABGroupUpdateResponse">
		<xsd:complexType>
		</xsd:complexType>
	</xsd:element>

	<xsd:complexType name="ABGroupDeleteRequestType">
		<xsd:annotation>
			<xsd:documentation>
				Specifies what groups to delete.
			</xsd:documentation>
		</xsd:annotation>

		<xsd:sequence>
			<xsd:element name="abId" type="Guid" fixed="00000000-0000-0000-0000-000000000000" />
			<xsd:element name="groupFilter" type="groupFilterType" />
		</xsd:sequence>
	</xsd:complexType>

	<xsd:element name="ABGroupDelete" type="ABGroupDeleteRequestType" />

	<xsd:element name="ABGroupDeleteResponse">
		<xsd:complexType>
		</xsd:complexType>
	</xsd:element>

	<xsd:complexType name="ABGroupContactDeleteRequestType">
		<xsd:annotation>
			<xsd:documentation>
				Specifies what groups to delete.
			</xsd:documentation>
		</xsd:annotation>

		<xsd:sequence>
			<xsd:element name="abId" type="Guid" fixed="00000000-0000-0000-0000-000000000000" />
			<xsd:element name="contacts">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="Contact" type="ContactType"
							minOccurs="0" maxOccurs="unbounded" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="groupFilter" type="groupFilterType" />
		</xsd:sequence>
	</xsd:complexType>

	<xsd:element name="ABGroupContactDelete" type="ABGroupContactDeleteRequestType" />

	<xsd:element name="ABGroupContactDeleteResponse">
		<xsd:complexType>
		</xsd:complexType>
	</xsd:element>

	<xsd:complexType name="AddMemberRequestType">
		<xsd:annotation>
			<xsd:documentation>
				Requests that a contact is granted the specified member role.
			</xsd:documentation>
		</xsd:annotation>

		<xsd:sequence>
			<xsd:element name="serviceHandle" type="HandleType" />
			<xsd:element name="memberships">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="Membership" type="msnab:Membership" minOccurs="0" maxOccurs="unbounded" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:complexType name="ABContactUpdateRequestType">
		<xsd:annotation>
			<xsd:documentation>
				Parameters to the ABContactUpdate SOAP Action
			</xsd:documentation>
		</xsd:annotation>

		<xsd:sequence>
			<xsd:element name="abId" type="Guid" fixed="00000000-0000-0000-0000-000000000000" />
			<xsd:element name="contacts">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="Contact" type="ContactType"
							minOccurs="0" maxOccurs="unbounded" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:element name="ABContactUpdate" type="ABContactUpdateRequestType" />

	<xsd:element name="ABContactUpdateResponse">
		<xsd:complexType>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="AddMember" type="AddMemberRequestType" />

	<xsd:element name="AddMemberResponse">
		<xsd:complexType>
		</xsd:complexType>
	</xsd:element>

	<xsd:complexType name="DeleteMemberRequestType">
		<xsd:annotation>
			<xsd:documentation>
				Requests that a contact is revoked the specified member role.
			</xsd:documentation>
		</xsd:annotation>

		<xsd:sequence>
			<xsd:element name="serviceHandle" type="HandleType" />
			<xsd:element name="memberships">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="Membership" type="msnab:Membership" minOccurs="0" maxOccurs="unbounded" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:element name="DeleteMember" type="DeleteMemberRequestType" />

	<xsd:element name="DeleteMemberResponse">
		<xsd:complexType>
		</xsd:complexType>
	</xsd:element>
</xsd:schema>
