Previous Page | Next Page

Adding Metadata Objects

Example of an AddMetadata Request That Creates an Association to an Object in Another Repository

This example contains two AddMetadata method calls:

This method call creates the second repository:

<AddMetadata>
  <Metadata>
    <RepositoryBase
      Name="Test repository 2"
      Desc="Second test repository."
      Path="C:\testdat\repository2"
      RepositoryType="Custom">
    </RepositoryBase>
   </Metadata>
   <Reposid>A0000001.A0000001</Reposid>
   <NS>REPOS</NS>
   <!-- OMI_TRUSTED_CLIENT flag -->
   <Flags>268435456</Flags>
   <Options/>
</AddMetadata>

In the method call, note the following:

Here is an example of the output returned by the SAS Metadata Server:

<!-- Using the ADDMETADATA method. -->

<RepositoryBase Name="Test repository 2" Desc="Second test repository." 
  Path="C:\testdat\repository2" Id="A0000001.A5KD78HW" Access="0"
 RepositoryType="Custom"/>

Test repository 2 is assigned the unique repository identifier A0000001.A5KD78HW.

This AddMetadata method call creates the Document object in Test repository 2:

<AddMetadata>
 <Metadata>
    <Document  Name="Sales Summary" Desc="Summary of Sales Activity in the NW Region"
  PublicType="Document">
       <Objects>
        <SASLibrary ObjRef="A53TPPVI.A1000001"/>
       </Objects>
    </Document>
 </Metadata>
 <Reposid>A0000001.A5KD78HW</Reposid>
 <NS>SAS</NS>
 <Flags>268435456</Flags>
 <Options/>
</AddMetadata>

In this method call, note the following:

Here is an example of the output returned by the SAS Metadata Server:

<!-- Using the ADDMETADATA method. -->

<Document Name="Sales Summary" Desc="Summary of Sales Activity in the NW Region" 
  PublicType="Document" Id="A5KD78HW.A1000001">
 <Objects>
   <SASLibrary ObjRef="A53TPPVI.A1000001"/>
 </Objects>
</Document>

Document object A5KD78HW.A1000001 was successfully created in repository A0000001.A5KD78HW.

Previous Page | Next Page | Top of Page