OpenRdsDatabase

Syntax

OpenRdsDatabaseResult OpenRdsDatabase(OdId tOb, OpenRdsDatabaseArg tArg)

Parameters

tOb. Moniker of repository object that is MDM repository.

tArg. Operation execution parameters.

Description

The OpenRdsDatabase operation opens MDM repository.

Comments

To execute the operation, in the tOb field specify moniker of the repository object that is MDM repository, and in the tArg field specify opening parameters. The operation results in the moniker of opened MDM repository instance and metadata if the tArg.metaGet field was defined.

Further work is executed using the GetRdsDatabase and SetRdsDatabase operations.

To close the MDM repository instance, use the CloseRdsDatabase operation.

Example

Below is the example of opening MDM repository for edit. The request contains the moniker of the repository object that is MDM repository. The response contains the moniker of MDM repository instance opened for edit.

The example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier example.

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">
<OpenRdsDatabase xmlns="http://www.fsight.ru/PP.SOM.Som">
<tOb xmlns="">
  <id>S1!M!219759</id>
  </tOb>
<tArg xmlns="">
<args>
  <bind>true</bind>
  <openForEdit>true</openForEdit>
  </args>
  </tArg>
  </OpenRdsDatabase>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<OpenRdsDatabaseResult 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!RD1</id>
  </id>
  </OpenRdsDatabaseResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"OpenRdsDatabase" :
{
"tOb" :
{
"id" : "S1!M!219759"
},
"tArg" :
{
"args" :
{
"bind" : "true",
"openForEdit" : "true"
}
}
}
}

JSON response:

{
"OpenRdsDatabaseResult" :
{
"id" :
{
"id" : "S1!M!S!RD1"
}
}
}
public static OpenRdsDatabaseResult OpenRDSDatabase(MbId mb, string id)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tOpen = new OpenRdsDatabase()
{
tArg = new OpenRdsDatabaseArg()
{
args = new RdsDatabaseOpenArgs()
{
bind = true,
openForEdit = true
}
},
tOb = new OdId() { id = mb.id + "!" + FindObjectById(mb, id).k }
};
//Open MDM repository
var tResult = somClient.OpenRdsDatabase(tOpen);
return tResult;
}

See also:

Working with MDM Dictionaries