CreateCompoundDictionarySource

Syntax

CompoundDictionarySourceResult CreateCompoundDictionarySource(RdsId tRds, CreateCompoundDictionarySourceArg tArg)

Parameters

tRds. Moniker of opened composite MDM dictionary instance.

tArg. Operation execution parameters.

Description

The CreateCompoundDictionarySource operation creates a new data source in a composite MDM dictionary.

Comments

To execute the operation, in the tRds field specify moniker of opened composite MDM dictionary instance, and in the tArg field specify the pattern that will be used to get metadata of the created data source. The moniker can be obtained on executing the OpenRds operation.

The operation results in the metadata of the created style data source.

Further work with the data source is executed using the following operations: GetCompoundDictionarySource, SetCompoundDictionarySource, SaveCompoundDictionarySource. To close the data source, use the CloseCopmpoundDictionarySource operation.

Example

Below is the example of creating a composite MDM dictionary data source. The request contains moniker of composite dictionary instance. The response contains general metadata of the created data source.

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">
<CreateCompoundDictionarySource xmlns="http://www.fsight.ru/PP.SOM.Som">
<tRds xmlns="">
  <id>LFDCEOAJELGFGOAEOHNCJJKKEAEKGGDECKEPMBLACNIPJPNG!M!S!NONBODBBJELGFGOAELOJMHDMDOIMJJHKEJIFCPPBNLHMBJEEO</id>
  </tRds>
<tArg xmlns="">
<metaGet>
  <all>true</all>
  </metaGet>
  </tArg>
  </CreateCompoundDictionarySource>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<CreateCompoundDictionarySourceResult 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>LFDCEOAJELGFGOAEOHNCJJKKEAEKGGDECKEPMBLACNIPJPNG!M!S!NONBODBBJELGFGOAELOJMHDMDOIMJJHKEJIFCPPBNLHMBJEEO!Sources!2</id>
  </id>
<meta xmlns="">
  <k>2</k>
  <id>COMPOUNDDICTIONARYSOURCE1</id>
  <n>Source1</n>
  <vis>1</vis>
  <mappings />
  </meta>
  </CreateCompoundDictionarySourceResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"CreateCompoundDictionarySource" :
{
"tRds" :
{
"id" : "LFDCEOAJELGFGOAEOHNCJJKKEAEKGGDECKEPMBLACNIPJPNG!M!S!NONBODBBJELGFGOAELOJMHDMDOIMJJHKEJIFCPPBNLHMBJEEO"
},
"tArg" :
{
"metaGet" :
{
"all" : "true"
}
}
}
}

JSON response:

{
"CreateCompoundDictionarySourceResult" :
{
"id" :
{
"id" : "LFDCEOAJELGFGOAEOHNCJJKKEAEKGGDECKEPMBLACNIPJPNG!M!S!NONBODBBJELGFGOAELOJMHDMDOIMJJHKEJIFCPPBNLHMBJEEO!Sources!2"
},
"meta" :
{
"k" : "2",
"id" : "COMPOUNDDICTIONARYSOURCE1",
"n" : "Source1",
"vis" : "1",
"mappings" : ""
}
}
}
public static CompoundDictionarySourceResult CreateCompoundDictionarySource(string moniker)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tCreate = new CreateCompoundDictionarySource()
{
tArg = new CreateCompoundDictionarySourceArg()
{
metaGet = new RdsCompoundDictSourcePattern()
{
all = true
}
},
tRds = new RdsId() { id = moniker }
};
// Create a data source in composite MDM dictionary
var tResult = somClient.CreateCompoundDictionarySource(tCreate);
return tResult;
}

See also:

Working with MDM Dictionaries