OpenCube

Syntax

OpenCubeResult OpenCube(OdId tOb, OpenCubeArg tArg)

Parameters

tOb. Moniker of the object that is a cube.

tArg. Parameters of cube opening.

Description

The OpenCube operation opens a repository cube and returns context for working with cube's structure.

Comments

The operation gets access to the structure and settings of various repository cubes. To execute the operation, in the tOb parameter specify moniker of the object that is a cube, and in the tArg parameter specify parameters of its opening. The object moniker can be obtained on executing the GetObjects operation. In the tArg.metaGet field specify the pattern that will be used to open cube metadata on opening. If the tArg.metaGet field is not determined, the operation results only in the opened cube instance moniker.

To further work with the cube, use the GetCube and SetCube operations. Use the CloseCube operation to close the cube instance.

Example

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

SOAP response:

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

JSON request:

{
"OpenCube" :
{
"tOb" :
{
"id" : "S1!M!5857"
},
"tArg" :
{
"args" :
{
"bind" : "true",
"openForEdit" : "true"
}
}
}
}

JSON response:

{
"OpenCubeResult" :
{
"id" :
{
"id" : "S1!M!S!C1"
}
}
}
public static OpenCubeResult OpenCube(MbId mb, string id)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tOpen = new OpenCube()
{
tArg = new OpenCubeArg()
{
args = new CubeOpenArgs()
{
bind = true,
openForEdit = true
}
},
tOb = new OdId() { id = mb.id + "!" + FindObjectById(mb, id).k }
};
//Open cube
var tResult = somClient.OpenCube(tOpen);
return tResult;
}

See also:

Working with Cubes