Opening Dictionary

Below is the example of using the OpenDim operation to open a repository dictionary. The request contains moniker of the object that is a dictionary. The response contains the opened dictionary instance moniker. Any additional data is not obtained.

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">
<OpenDim xmlns="http://www.fsight.ru/PP.SOM.Som">
<tObject xmlns="">
  <id>S1!M!116</id>
  </tObject>
<tArg xmlns="">
  <openArgs />
  </tArg>
  </OpenDim>
  </s:Body>
  </s:Envelope>

SOAP response:

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

JSON request:

{
"OpenDim" :
{
"tObject" :
{
"id" : "S1!M!116"
},
"tArg" :
{
"openArgs" : ""
}
}
}

JSON response:

{
"OpenDimResult" :
{
"id" :
{
"id" : "S1!M!S!S1"
}
}
}
public static OpenDimResult OpenDimension(MbId mb, string id)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tOpen = new OpenDim()
{
tArg = new OpenDimArg()
{
openArgs = new DmOpenArgs()
},
tObject = new OdId() { id = mb.id + "!" + FindObjectById(mb, id).k }
};
//Open dictionary
var tResult = somClient.OpenDim(tOpen);
return tResult;
}

See also:

OpenDim: Operation