OpenMetabaseLink

Syntax

MetabaseLinkResult OpenMetabaseLink(OdId tOb, OpenMetabaseLinkArg tArg)

Parameters

tOb. Moniker of repository object that is repository connection.

tArg. Operation execution parameters.

Description

The OpenMetabaseLink operation opens repository connection and returns context of working with it.

Comments

The operation enables the user to get access to repository connection settings. To execute the operation, in the tOb field specify moniker of the repository object that is repository connection, and in the tArg field specify opening parameters. In the tArg.metaGet field specify parameters for getting metadata. The operation results in the moniker of opened repository connection instance and also requested metadata if the appropriate pattern was specified on executing the operation. The further work with opened repository connection instance is executed using the GetMetabaseLink and SetMetabaseLink operations. To close the opened repository connection instance, use the CloseMetabaseLink operation.

Example

The example of opening repository connection for edit. The request contains repository connection moniker. The response contains moniker of opened repository connection instance.

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

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

SOAP response:

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

JSON request:

{
"OpenMetabaseLink" :
{
"tOb" :
{
"id" : "S1!M!174241"
},
"tArg" :
{
"args" :
{
"openForEdit" : "true"
}
}
}
}

JSON response:

{
"OpenMetabaseLinkResult" :
{
"id" :
{
"id" : "S1!M!S!ML7"
}
}
}
public static MetabaseLinkResult OpenMetabaseLink(MbId mb, string id)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tOpen = new OpenMetabaseLink()
{
tArg = new OpenMetabaseLinkArg()
{
args = new MetabaseLinkOpenArgs()
{
openForEdit = true
}
},
tOb = new OdId() { id = mb.id + "!" + FindObjectById(mb, id).k }
};
//Open repository connection
var tResult = somClient.OpenMetabaseLink(tOpen);
return tResult;
}

See also:

Working with Relational Objects of Repository