# Table of contents:
# Introduction
CreateRelationships is one of the SOAP actions the Schematized Storage Service provides.
Create one or more relationships between two resources.
# Client/Request
The template used in this action is described on the Schematized Storage Service main page.
# CreateRelationshipsThis element has only one attribute:
xmlns: Is always set tohttp://www.msn.com/webservices/storage/, followed by the version of the schema.
This element contains one or multiple <Relationship> elements.
This element has five children:
<SourceID>: The source resource ID to associate the relationship to.<SourceType>: The source resource type to associate the relationship to:SubProfile: A resource inside the user's profile.
<TargetID>: The target resource ID to associate the relationship to.<TargetType>: The target resource type to associate the relationship to:Photo: A Document object with the type ofPhoto.
<RelationshipName>: The type of relationship being established:ProfilePhoto: The user's profile picture.
# Server/Response
The template used in this action is described on the Schematized Storage Service main page.
# CreateRelationshipsResponseThis empty element has only one attribute:
xmlns: Is always set tohttp://www.msn.com/webservices/storage/, followed by the version of the schema.
# Examples
# Schema version w10
# Binding a Profile's ExpressionProfile to a Photo Document
# Client/Request
POST /storageservice/SchematizedStore.asmx HTTP/1.1
SOAPAction: http://www.msn.com/webservices/storage/w10/CreateRelationships
Cache-Control: no-cache
Content-Type: text/xml; charset=utf-8
Content-Length: 1135
<?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&p=profile</TicketToken>
</StorageUserHeader>
</soap:Header>
<soap:Body>
<CreateRelationships xmlns="http://www.msn.com/webservices/storage/w10">
<relationships>
<Relationship>
<SourceID>cid_4294967298!expressionprofile</SourceID>
<SourceType>SubProfile</SourceType>
<TargetID>cid_4294967298!documents!1</TargetID>
<TargetType>Photo</TargetType>
<RelationshipName>ProfilePhoto</RelationshipName>
</Relationship>
</relationships>
</CreateRelationships>
</soap:Body>
</soap:Envelope>
# Server/Response
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 749
<?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&p=profile</TicketToken>
<IsAdmin>false</IsAdmin>
</StorageUserHeader>
</soap:Header>
<soap:Body>
<CreateRelationshipsResponse xmlns="http://www.msn.com/webservices/storage/w10" />
</soap:Body>
</soap:Envelope>