4 Protocol Examples

SharePoint

The following example is a request and response for creating a new term set group.

The following example is a request to create a new term set group.

 <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
    <s:Header>
       <a:Action s:mustUnderstand="1">http://schemas.microsoft.com/sharepoint/taxonomy/soap/IDataAccessReadWrite/Write</a:Action>
          <a:MessageID>urn:uuid:6a748631-3e61-47fd-bd06-c8656b70e48f</a:MessageID>
          <a:ReplyTo>
             <a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
          </a:ReplyTo>
       <ServiceContext xmlns="http://schemas.microsoft.com/sharepoint/servicecontext" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
          <correlationId>9a3c5118-388a-49ef-b4c4-7ce6ad2aa4ab</correlationId>
          <locale>en-US</locale>
          <siteSubscriptionId>00000000-0000-0000-0000-000000000000</siteSubscriptionId>
       </ServiceContext>
       <a:To s:mustUnderstand="1">http://SERVER/b77ccb6b285d41c68335fb6d8f7d8e3e/MetadataWebService.svc</a:To>
    </s:Header>
    <s:Body>
       <Write xmlns="http://schemas.microsoft.com/sharepoint/taxonomy/soap/">
          <data>
             <Root>
                <Partition Id="8CDCD08F-1C05-4d17-AE04-FC19E918E32B" /><G a5="0" a6="-1" a9="5e89a57f-e7c6-49b8-ad32-a761817c9233" a0="8CDCD08F-1C05-4d17-AE04-FC19E918E32B" a11="" a12="new group" a15="0" />
             </Root>
          </data>
       </Write>
    </s:Body>
 </s:Envelope>

The following example is a response to the request to create a new term set group.

 <s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope">
    <s:Header>
       <a:Action s:mustUnderstand="1">http://schemas.microsoft.com/sharepoint/taxonomy/soap/IDataAccessReadWrite/WriteResponse</a:Action>
       <ActivityId CorrelationId="ba16deee-f88e-4af6-b84f-b5fd96b81e14" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">9a927f0a-4f83-4e49-becf-f8cc2fd7894f</ActivityId>
    </s:Header>
    <s:Body>
       <WriteResponse xmlns="http://schemas.microsoft.com/sharepoint/taxonomy/soap/"></WriteResponse>
    </s:Body>
 </s:Envelope>

The following example is a request and response for creating a new term set.

The following example is a request to create a new term set.

 <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
    <s:Header>
       <a:Action s:mustUnderstand="1">http://schemas.microsoft.com/sharepoint/taxonomy/soap/IDataAccessReadWrite/Write</a:Action>
       <a:MessageID>urn:uuid:adc74086-3ce6-4a84-a9e4-ce4d145f897b</a:MessageID>
       <a:ReplyTo>
          <a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
       </a:ReplyTo>
       <ServiceContext xmlns="http://schemas.microsoft.com/sharepoint/servicecontext" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
          <correlationId>033747f4-70e9-4250-8744-682a5b9e4f44</correlationId>
          <locale>en-US</locale>
          <siteSubscriptionId>00000000-0000-0000-0000-000000000000</siteSubscriptionId>
       </ServiceContext>
       <a:To s:mustUnderstand="1">http://SERVER/b77ccb6b285d41c68335fb6d8f7d8e3e/MetadataWebService.svc</a:To>
    </s:Header>
    <s:Body>
       <Write xmlns="http://schemas.microsoft.com/sharepoint/taxonomy/soap/">
          <data>
             <Root>
                <Partition Id="8CDCD08F-1C05-4d17-AE04-FC19E918E32B" />
 <TS a5="0" a6="-1" a9="60936ba7-8be1-43b7-83d6-87fb85be6ca9" a0="8CDCD08F-1C05-4d17-AE04-FC19E918E32B" a12="new term set" a11="" a15="0" a16="false" a17="true" a18="" a68="" a1="3" a14="USERNAME" a67="" />
             </Root>
          </data>
       </Write>
    </s:Body>
 </s:Envelope>

The following example is a response to the request to create a new term set.

 <s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope">
    <s:Header>
       <a:Action s:mustUnderstand="1">http://schemas.microsoft.com/sharepoint/taxonomy/soap/IDataAccessReadWrite/WriteResponse</a:Action>
       <ActivityId CorrelationId="4e70461f-8f7c-4b92-9181-6140e569cf76" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">6793b70e-c75f-467e-8b2d-44f37942f838</ActivityId>
    </s:Header>
    <s:Body>
       <WriteResponse xmlns="http://schemas.microsoft.com/sharepoint/taxonomy/soap/"></WriteResponse>
    </s:Body>
 </s:Envelope>

The following example is a request and response for creating a new term.

The following example is a request to create a new term.

 <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
    <s:Header>
       <a:Action s:mustUnderstand="1">http://schemas.microsoft.com/sharepoint/taxonomy/soap/IDataAccessReadWrite/Write</a:Action>
       <a:MessageID>urn:uuid:3a86e6a6-6466-48c1-9cb5-c71f17d5276e</a:MessageID>
       <a:ReplyTo>
          <a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
       </a:ReplyTo>
       <ServiceContext xmlns="http://schemas.microsoft.com/sharepoint/servicecontext" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
          <correlationId>d392da82-08fb-4a5c-a277-1eea029db935</correlationId>
          <locale>en-US</locale>
          <siteSubscriptionId>00000000-0000-0000-0000-000000000000</siteSubscriptionId>
       </ServiceContext>
       <a:To s:mustUnderstand="1">http://SERVER/b77ccb6b285d41c68335fb6d8f7d8e3e/MetadataWebService.svc</a:To>
    </s:Header>
    <s:Body>
       <Write xmlns="http://schemas.microsoft.com/sharepoint/taxonomy/soap/">
          <data>
             <Root>
                <Partition Id="8CDCD08F-1C05-4d17-AE04-FC19E918E32B" />
                <T a5="0" a6="-1" a9="019bfde5-af07-4532-8f39-64774b5bfe92" a0="8CDCD08F-1C05-4d17-AE04-FC19E918E32B" a14="USERNAME" a19="2009-06-29T21:44:27.487297Z" a20="0" a21="false" a17="true" a67="" a24="4" a26="true"><TL a5="0" a31="true" a32="term #1" a33="1033" a35="false" />
                </T>
             </Root>
          </data>
       </Write>
    </s:Body>
 </s:Envelope>

The following example is a request to a response to create a new term.

 <s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope">
    <s:Header>
       <a:Action s:mustUnderstand="1">http://schemas.microsoft.com/sharepoint/taxonomy/soap/IDataAccessReadWrite/WriteResponse</a:Action>
       <ActivityId CorrelationId="191ecf08-3479-4880-bf51-571d1adf3de3" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">f9df67b3-e0e9-4ee4-8c20-86a7d7c4c629</ActivityId>
    </s:Header>
    <s:Body>
       <WriteResponse xmlns="http://schemas.microsoft.com/sharepoint/taxonomy/soap/"></WriteResponse>
    </s:Body>
 </s:Envelope>

The following example is a request and response for editing the description of an existing term.

The following example is a request to edit the description of an existing term.

 <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
    <s:Header>
       <a:Action s:mustUnderstand="1">http://schemas.microsoft.com/sharepoint/taxonomy/soap/IDataAccessReadWrite/Write</a:Action>
       <a:MessageID>urn:uuid:50aeb41e-2d6c-48d5-acdb-156ad493caa4</a:MessageID>
       <a:ReplyTo>
          <a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
       </a:ReplyTo>
       <ServiceContext xmlns="http://schemas.microsoft.com/sharepoint/servicecontext" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
          <correlationId>8142658a-1b6f-4cbb-8130-2b84f2609fa1</correlationId>
          <locale>en-US</locale>
          <siteSubscriptionId>00000000-0000-0000-0000-000000000000</siteSubscriptionId>
       </ServiceContext>
       <a:To s:mustUnderstand="1">http://SERVER/b77ccb6b285d41c68335fb6d8f7d8e3e/MetadataWebService.svc</a:To>
    </s:Header>
    <s:Body>
       <Write xmlns="http://schemas.microsoft.com/sharepoint/taxonomy/soap/">
          <data>
             <Root>
                <Partition Id="8CDCD08F-1C05-4d17-AE04-FC19E918E32B" />
                <T a5="1" a6="4" a0="8CDCD08F-1C05-4d17-AE04-FC19E918E32B" a8="2009-06-29T21:45:07.513Z" a14="USERNAME" a19="2009-06-29T21:44:31.15Z" a20="0" a21="false" a17="true" a67="" a24="4" a26="true"><TD a5="0" a11="Sample term description" a33="1033" /><TM a5="1" a24="4" a17="true" a67="" a26="true" />
                </T>
             </Root>
          </data>
       </Write>
    </s:Body>
 </s:Envelope>

The following example is a response to a request to edit the description of an existing term.

 <s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope">
    <s:Header>
       <a:Action s:mustUnderstand="1">http://schemas.microsoft.com/sharepoint/taxonomy/soap/IDataAccessReadWrite/WriteResponse</a:Action>
       <ActivityId CorrelationId="cecebb73-dca5-483f-b658-4ad4f30907df" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">ce16a80e-65d6-47ab-83b6-9fca95cc31b3</ActivityId>
    </s:Header>
    <s:Body>
       <WriteResponse xmlns="http://schemas.microsoft.com/sharepoint/taxonomy/soap/">
       </WriteResponse>
    </s:Body>
 </s:Envelope>

The following example is a request and response for retrieving a term set by GUID.

The following example is a request to retrieve a term set by GUID.

 <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
    <s:Header>
       <a:Action s:mustUnderstand="1">http://schemas.microsoft.com/sharepoint/taxonomy/soap/IDataAccessReadOnly/GetTermSets</a:Action>
       <a:MessageID>urn:uuid:7637ed0a-4250-43a6-82f4-016270fced49</a:MessageID>
       <a:ReplyTo>
          <a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
       </a:ReplyTo>
       <ServiceContext xmlns="http://schemas.microsoft.com/sharepoint/servicecontext" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
          <correlationId>033747f4-70e9-4250-8744-682a5b9e4f44</correlationId>
          <locale>en-US</locale>
          <siteSubscriptionId>00000000-0000-0000-0000-000000000000</siteSubscriptionId>
       </ServiceContext>
       <a:To s:mustUnderstand="1">http://SERVER/b77ccb6b285d41c68335fb6d8f7d8e3e/MetadataWebService.svc</a:To>
    </s:Header>
    <s:Body>
       <GetTermSets xmlns="http://schemas.microsoft.com/sharepoint/taxonomy/soap/">
          <rawPartitionId>8CDCD08F-1C05-4d17-AE04-FC19E918E32B</rawPartitionId>
          <termSetGuids xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
             <b:guid>60936ba7-8be1-43b7-83d6-87fb85be6ca9</b:guid>
          </termSetGuids>
       </GetTermSets>
    </s:Body>
 </s:Envelope>

The following example is a response to a request to retrieve a term set by GUID.

 <s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope">
    <s:Header>
       <a:Action s:mustUnderstand="1">http://schemas.microsoft.com/sharepoint/taxonomy/soap/IDataAccessReadOnly/GetTermSetsResponse</a:Action>
       <ActivityId CorrelationId="40439e5b-e097-488f-90f0-8a4d680207ba" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">9b90d173-3614-4e83-bd66-32c6b3c1c95b</ActivityId>
    </s:Header>
    <s:Body>
       <GetTermSetsResponse xmlns="http://schemas.microsoft.com/sharepoint/taxonomy/soap/">
          <GetTermSetsResult>
             <Root>
                <G a6="3" a0="8CDCD08F-1C05-4d17-AE04-FC19E918E32B" a9="5e89a57f-e7c6-49b8-ad32-a761817c9233" a12="new group" a11="" a8="2009-06-29T21:44:13.397Z" a7="2009-06-29T21:43:55.197Z" a15="0" />
                <NextResult />
                <NextResult />
                <GTSIds a1="3" a6="4" />
                <NextResult />
                <TS a6="4" a0="8CDCD08F-1C05-4d17-AE04-FC19E918E32B" a7="2009-06-29T21:44:13.397Z" a8="2009-06-29T21:44:13.397Z" a14="USERNAME" a9="60936ba7-8be1-43b7-83d6-87fb85be6ca9" a12="new term set" a11="" a15="0" a16="False" a17="True" a18="" a68="" a1="3" />
               <NextResult />
            </Root>
         </GetTermSetsResult>
       </GetTermSetsResponse>
    </s:Body>
 </s:Envelope>

The following example is a request and response for searching for a term based on a term label.

The following example is a request to search for a term based on a term label.

 <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
    <s:Header>
       <a:Action s:mustUnderstand="1">http://schemas.microsoft.com/sharepoint/taxonomy/soap/IDataAccessReadOnly/SearchTermByLabel</a:Action>
       <a:MessageID>urn:uuid:4978e393-2f00-46d1-b9de-d4b63b16adcc</a:MessageID>
       <a:ReplyTo>
          <a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
       </a:ReplyTo>
       <ServiceContext xmlns="http://schemas.microsoft.com/sharepoint/servicecontext" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
          <correlationId>ef836e6f-a1fd-4a45-aa76-82afee2f1bc8</correlationId>
          <locale>en-US</locale>
          <siteSubscriptionId>00000000-0000-0000-0000-000000000000</siteSubscriptionId>
       </ServiceContext>
       <a:To s:mustUnderstand="1">http://SERVER/b77ccb6b285d41c68335fb6d8f7d8e3e/MetadataWebService.svc</a:To>
    </s:Header>
    <s:Body>
       <SearchTermByLabel xmlns="http://schemas.microsoft.com/sharepoint/taxonomy/soap/">
          <rawPartitionId>8CDCD08F-1C05-4d17-AE04-FC19E918E32B</rawPartitionId>
          <termSetId i:nil="true" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"></termSetId>
          <anchorId i:nil="true" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"></anchorId>
          <label>term #1</label>
          <lcid>1033</lcid>
          <defaultLabelOnly>false</defaultLabelOnly>
          <includeIdPath>true</includeIdPath>
          <stringMatchOption>StartsWith</stringMatchOption>
          <resultCollectionSize>20</resultCollectionSize>
          <getFullPath>true</getFullPath>
          <defaultLcid i:nil="true" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"></defaultLcid>
          <isOptimized>true</isOptimized>
          <getAllLocalTermSets>true</getAllLocalTermSets>
       </SearchTermByLabel>
    </s:Body>
 </s:Envelope>

The following example is a response to a request to search for a term based on a term label.

 <s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope">
    <s:Header>
       <a:Action s:mustUnderstand="1">http://schemas.microsoft.com/sharepoint/taxonomy/soap/IDataAccessReadOnly/SearchTermByLabelResponse</a:Action>
       <ActivityId CorrelationId="6e446b6c-bf65-4814-b1ec-8aec17be73fa" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">82d80524-be41-4173-867d-e3c7edd75030</ActivityId>
    </s:Header>
    <s:Body>
       <SearchTermByLabelResponse xmlns="http://schemas.microsoft.com/sharepoint/taxonomy/soap/">
          <SearchTermByLabelResult>
             <Root>
                <TS a6="4" a0="8CDCD08F-1C05-4d17-AE04-FC19E918E32B" a7="2009-06-29T21:44:13.397Z" a8="2009-06-29T21:44:31.15Z" a14="USERNAME" a9="60936ba7-8be1-43b7-83d6-87fb85be6ca9" a12="new term set" a11="" a15="0" a16="False" a17="True" a18="" a68="" a1="3" /><NextResult /><T a6="3" a0="8CDCD08F-1C05-4d17-AE04-FC19E918E32B" a7="2009-06-29T21:44:27.567Z" a8="2009-06-29T21:44:27.567Z" a14="USERNAME" a9="019bfde5-af07-4532-8f39-64774b5bfe92" a19="2009-06-29T21:44:27.567Z" a20="0" a21="False" a22="False" /><NextResult /><TL a34="3" a33="1033" a32="term #1" a31="True" /><NextResult /><NextResult /><NextResult /><TM a24="4" a34="3" a39="3" a25="0" a17="True" a26="True" a40="" a71="5E89A57F-E7C6-49B8-AD32-A761817C9233|60936BA7-8BE1-43B7-83D6-87FB85BE6CA9|019BFDE5-AF07-4532-8F39-64774B5BFE92" a42="1033|new term set" a41="60936ba7-8be1-43b7-83d6-87fb85be6ca9" a15="0" />
               <NextResult />
            </Root>
          </SearchTermByLabelResult>
       </SearchTermByLabelResponse>
    </s:Body>
 </s:Envelope>
Show: