Table of contents:

Introduction

CreateDocument is one of the SOAP actions the Schematized Storage Service provides.

Create a document.

Client/Request

The template used in this action is described on the Schematized Storage Service main page.

CreateDocument

This element has only one attribute:

This element has three children:

parentHandle

A resource handle.

document

This element has only one attribute:

This element has two children:

DocumentStreams

This element contains one or more <DocumentStream> elements.

DocumentStream

This element has only one attribute:

This element has four children:

Server/Response

The template used in this action is described on the Schematized Storage Service main page.

CreateDocumentResponse

This element has only one attribute:

This element has only one child:

Examples

Schema version w10

Photo document with static image only

Client/Request

POST /storageservice/SchematizedStore.asmx HTTP/1.1
SOAPAction: http://www.msn.com/webservices/storage/w10/CreateDocument
Cache-Control: no-cache
Content-Type: text/xml; charset=utf-8
Content-Length: 1427

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
	xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
>
	<soap:Header>
		<StorageApplicationHeader xmlns="http://www.msn.com/webservices/storage/w10">
			<ApplicationID>Messenger Client 8.5</ApplicationID>
			<Scenario>RoamingIdentityChanged</Scenario>
		</StorageApplicationHeader>
		<StorageUserHeader xmlns="http://www.msn.com/webservices/storage/w10">
			<Puid>0</Puid>
			<TicketToken>t=ticket&amp;p=profile</TicketToken>
		</StorageUserHeader>
	</soap:Header>
	<soap:Body>
		<CreateDocument xmlns="http://www.msn.com/webservices/storage/w10">
			<parentHandle>
				<RelationshipName>/UserTiles</RelationshipName>
				<Alias>
					<Name>4294967298</Name>
					<NameSpace>MyCidStuff</NameSpace>
				</Alias>
			</parentHandle>
			<document xsi:type="Photo">
				<Name>Example Static Image</Name>
				<DocumentStreams>
					<DocumentStream xsi:type="PhotoStream">
						<DocumentStreamType>UserTileStatic</DocumentStreamType>
						<MimeType>image/png</MimeType>
						<Data>[[removed intentionally]]</Data>
						<DataSize>0</DataSize>
					</DocumentStream>
				</DocumentStreams>
			</document>
			<relationshipName>Messenger User Tile</relationshipName>
		</CreateDocument>
	</soap:Body>
</soap:Envelope>

Server/Response

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 845

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
	xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
	<soap:Header>
		<AffinityCacheHeader xmlns="http://www.msn.com/webservices/storage/w10">
			<CacheKey>MjAyNi0wMi0wOFQxMDoxODozNi43MDVa</CacheKey>
		</AffinityCacheHeader>
		<StorageUserHeader xmlns="http://www.msn.com/webservices/storage/w10">
			<Puid>0</Puid>
			<Cid>4294967298</Cid>
			<TicketToken>t=ticket&amp;p=profile</TicketToken>
			<IsAdmin>false</IsAdmin>
		</StorageUserHeader>
	</soap:Header>
	<soap:Body>
		<CreateDocumentResponse xmlns="http://www.msn.com/webservices/storage/w10">
			<CreateDocumentResult>cid_4294967298!documents!1</CreateDocumentResult>
		</CreateDocumentResponse>
	</soap:Body>
</soap:Envelope>

Photo document with both static and dynamic images

Client/Request

POST /storageservice/SchematizedStore.asmx HTTP/1.1
SOAPAction: http://www.msn.com/webservices/storage/w10/CreateDocument
Cache-Control: no-cache
Content-Type: text/xml; charset=utf-8
Content-Length: 1693

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
	xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
>
	<soap:Header>
		<StorageApplicationHeader xmlns="http://www.msn.com/webservices/storage/w10">
			<ApplicationID>Messenger Client 8.5</ApplicationID>
			<Scenario>RoamingIdentityChanged</Scenario>
		</StorageApplicationHeader>
		<StorageUserHeader xmlns="http://www.msn.com/webservices/storage/w10">
			<Puid>0</Puid>
			<TicketToken>t=ticket&amp;p=profile</TicketToken>
		</StorageUserHeader>
	</soap:Header>
	<soap:Body>
		<CreateDocument xmlns="http://www.msn.com/webservices/storage/w10">
			<parentHandle>
				<RelationshipName>/UserTiles</RelationshipName>
				<Alias>
					<Name>4294967298</Name>
					<NameSpace>MyCidStuff</NameSpace>
				</Alias>
			</parentHandle>
			<document xsi:type="Photo">
				<Name>Example Dynamic Image</Name>
				<DocumentStreams>
					<DocumentStream xsi:type="PhotoStream">
						<DocumentStreamType>UserTileStatic</DocumentStreamType>
						<MimeType>image/png</MimeType>
						<Data>[[removed intentionally]]</Data>
						<DataSize>0</DataSize>
					</DocumentStream>
					<DocumentStream xsi:type="PhotoStream">
						<DocumentStreamType>UserTileDynamic</DocumentStreamType>
						<MimeType>application/vnd.ms-cab-compressed</MimeType>
						<Data>[[removed intentionally]]</Data>
						<DataSize>0</DataSize>
					</DocumentStream>
				</DocumentStreams>
			</document>
			<relationshipName>Messenger User Tile</relationshipName>
		</CreateDocument>
	</soap:Body>
</soap:Envelope>

Server/Response

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 845

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
	xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
	<soap:Header>
		<AffinityCacheHeader xmlns="http://www.msn.com/webservices/storage/w10">
			<CacheKey>MjAyNi0wMi0wOFQxMDoxODozNi43MDVa</CacheKey>
		</AffinityCacheHeader>
		<StorageUserHeader xmlns="http://www.msn.com/webservices/storage/w10">
			<Puid>0</Puid>
			<Cid>4294967298</Cid>
			<TicketToken>t=ticket&amp;p=profile</TicketToken>
			<IsAdmin>false</IsAdmin>
		</StorageUserHeader>
	</soap:Header>
	<soap:Body>
		<CreateDocumentResponse xmlns="http://www.msn.com/webservices/storage/w10">
			<CreateDocumentResult>cid_4294967298!documents!1</CreateDocumentResult>
		</CreateDocumentResponse>
	</soap:Body>
</soap:Envelope>

Binary document with Signature Sound

Client/Request

POST /storageservice/SchematizedStore.asmx HTTP/1.1
SOAPAction: http://www.msn.com/webservices/storage/w10/CreateDocument
Cache-Control: no-cache
Content-Type: text/xml; charset=utf-8
Content-Length: 1433

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
	xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
>
	<soap:Header>
		<StorageApplicationHeader xmlns="http://www.msn.com/webservices/storage/w10">
			<ApplicationID>Messenger Client 9.0</ApplicationID>
			<Scenario>RoamingIdentityChanged</Scenario>
		</StorageApplicationHeader>
		<StorageUserHeader xmlns="http://www.msn.com/webservices/storage/w10">
			<Puid>0</Puid>
			<TicketToken>t=ticket&amp;p=profile</TicketToken>
		</StorageUserHeader>
	</soap:Header>
	<soap:Body>
		<CreateDocument xmlns="http://www.msn.com/webservices/storage/w10">
			<parentHandle>
				<RelationshipName>SignatureSound</RelationshipName>
				<Alias>
					<Name>4294967298</Name>
					<NameSpace>MyCidStuff</NameSpace>
				</Alias>
			</parentHandle>
			<document xsi:type="Binary">
				<Name>Example Signature Sound</Name>
				<DocumentStreams>
					<DocumentStream xsi:type="Binary">
						<DocumentStreamType>Binary</DocumentStreamType>
						<MimeType>audio/x-ms-wma</MimeType>
						<Data>[[removed intentionally]]</Data>
						<DataSize>0</DataSize>
					</DocumentStream>
				</DocumentStreams>
			</document>
			<relationshipName>Messenger Signature Sound</relationshipName>
		</CreateDocument>
	</soap:Body>
</soap:Envelope>

Server/Response

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 845

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
	xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
	<soap:Header>
		<AffinityCacheHeader xmlns="http://www.msn.com/webservices/storage/w10">
			<CacheKey>MjAyNi0wMi0wOFQxMDoxODozNi43MDVa</CacheKey>
		</AffinityCacheHeader>
		<StorageUserHeader xmlns="http://www.msn.com/webservices/storage/w10">
			<Puid>0</Puid>
			<Cid>4294967298</Cid>
			<TicketToken>t=ticket&amp;p=profile</TicketToken>
			<IsAdmin>false</IsAdmin>
		</StorageUserHeader>
	</soap:Header>
	<soap:Body>
		<CreateDocumentResponse xmlns="http://www.msn.com/webservices/storage/w10">
			<CreateDocumentResult>cid_4294967298!documents!2</CreateDocumentResult>
		</CreateDocumentResponse>
	</soap:Body>
</soap:Envelope>