Getting Information about Dictionary Child Elements

Below is the example of using the GetDimMetadata operation to get information about child elements of the dictionary. The request contains the dictionary moniker and the pattern, in which specify whether to get information about selection schemas, groups of elements and alternative hierarchies of the dictionary. The response contains the obtained information.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetDimMetadata xmlns="http://www.fsight.ru/PP.SOM.Som">
<tDim xmlns="">
  <id>S1!M!S!S1</id>
  </tDim>
<tArg xmlns="">
<pattern>
  <obInst>false</obInst>
  <getHiers>true</getHiers>
  <getGroups>true</getGroups>
  <getSchemas>true</getSchemas>
  </pattern>
  </tArg>
  </GetDimMetadata>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetDimMetadataResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<id xmlns="">
  <id>S1!M!S!S1</id>
  </id>
<data xmlns="">
<hiers>
<it>
  <k>1</k>
  <id>SOURCE1</id>
  <n>Dim_1 (En)</n>
  <vis>1</vis>
  <sourceDimKey>154</sourceDimKey>
  <originalDimKey>116</originalDimKey>
  </it>
<it>
  <k>2</k>
  <id>SOURCE2</id>
  <n>X32</n>
  <vis>1</vis>
  <sourceDimKey>51924</sourceDimKey>
  <originalDimKey>116</originalDimKey>
  </it>
<it>
  <k>3</k>
  <id>SOURCE3</id>
  <n>Dim_1 (alternative)</n>
  <vis>1</vis>
  <sourceDimKey>105777</sourceDimKey>
  <originalDimKey>116</originalDimKey>
  </it>
  </hiers>
<groups>
<it>
  <k>157</k>
  <id>GROUP1</id>
  <n>Group of elements (according to list)</n>
  <vis>0</vis>
  </it>
  </groups>
<schemas>
<it>
  <k>158</k>
  <id>SCHEME1</id>
  <n>Selection schema (according to list)</n>
  <vis>0</vis>
  </it>
  </schemas>
  </data>
  </GetDimMetadataResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetDimMetadata" :
{
"tDim" :
{
"id" : "S1!M!S!S1"
},
"tArg" :
{
"pattern" :
{
"obInst" : "false",
"getHiers" : "true",
"getGroups" : "true",
"getSchemas" : "true"
}
}
}
}

JSON response:

{
"GetDimMetadataResult" :
{
"id" :
{
"id" : "S1!M!S!S1"
},
"data" :
{
"hiers" :
{
"it" :
[
{
"k" : "1",
"id" : "SOURCE1",
"n" : "Dim_1 (En)",
"vis" : "1",
"sourceDimKey" : "154",
"originalDimKey" : "116"
},
{
"k" : "2",
"id" : "SOURCE2",
"n" : "X32",
"vis" : "1",
"sourceDimKey" : "51924",
"originalDimKey" : "116"
},
{
"k" : "3",
"id" : "SOURCE3",
"n" : "Dim_1 (alternative)",
"vis" : "1",
"sourceDimKey" : "105777",
"originalDimKey" : "116"
}
]
},
"groups" :
{
"it" :
{
"k" : "157",
"id" : "GROUP1",
"n" : "Group of elements (according to list)",
"vis" : "0"
}
},
"schemas" :
{
"it" :
{
"k" : "158",
"id" : "SCHEME1",
"n" : "Selection schema (according to list)",
"vis" : "0"
}
}
}
}
}
public static GetDimMetadataResult GetChildrenObjectInfo(DmId moniker)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tMeta = new GetDimMetadata()
{
tArg = new GetDimMetadataArg()
{
pattern = new DmMetadataPattern()
{
getGroups = true,
getHiers = true,
getSchemas = true,
obInst = false
}
},
tDim = moniker
};
//Get information about dictionary structure
var result = somClient.GetDimMetadata(tMeta);
return result;
}

See also:

GetDimMetadata: Operation