SetSemanticLayerSources

Syntax

bool SetSemanticLayerSources(string mon, SemanticLayerSources tArg)

Parameters

mon. Moniker for working with data model sources.

tArg. Operation execution parameters.

Description

The SetSemanticLayerSources operation changes data model sources settings.

Comments

To execute the operation, in the mon field specify moniker of opened data model instance with the !Sources postfix, and in the tArg field specify updated source settings. The moniker can be obtained on executing the OpenSemanticLayer operation.

The operation results in the logical True if the settings were changed successfully.

Example

Below is the example of renaming a source in a data model. The request contains moniker for working with sources, key, and new source name. The response contains whether changes were applied successfully.

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">
<SetSemanticLayerSources xmlns="http://www.fsight.ru/PP.SOM.Som">
  <mon xmlns="">LGKNEBJOALBDGOAEFGACCMDHGCIOGFIEGLGKDJFJGPOGPIHE!M!S!PNAAJNCJOALBDGOAEIJDIFGIHNEOBEMIEHIIKOKDEILMGLDPK!Sources</mon>
<tArg xmlns="">
<its>
<it>
  <k>1</k>
  <n>DBServer connection</n>
  </it>
  </its>
  </tArg>
  </SetSemanticLayerSources>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <SetSemanticLayerSourcesResult 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">1</SetSemanticLayerSourcesResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SetSemanticLayerSources" :
{
"mon" : "LGKNEBJOALBDGOAEFGACCMDHGCIOGFIEGLGKDJFJGPOGPIHE!M!S!PNAAJNCJOALBDGOAEIJDIFGIHNEOBEMIEHIIKOKDEILMGLDPK!Sources",
"tArg" :
{
"its" :
{
"it" :
[
{
"k" : "1",
"n" : "DBServer connection"
}
]
}
}
}
}

JSON response:

{
"SetSemanticLayerSourcesResult" : "1"
}
public static bool SetSemanticLayerSources(string moniker, SemanticLayerSource setSource)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetSemanticLayerSources()
{
tArg = new SemanticLayerSources()
{
its = new SemanticLayerSource[]
{
setSource
}
},
// Moniker of opened data model instance
mon = moniker + "!Sources"
};
// Change information about data model source
var result = somClient.SetSemanticLayerSources(tSet);
return result;
}

See also:

Working with Data Models