ConvertTopobase

Syntax

ConvertTopobaseResult ConvertTopobase(TopobaseId tTopobase)

Parameters

tTopobase. Topobase moniker.

Description

The ConvertTopobase operation converts a topobase.

Comments

The operation is executed for topobases that were loaded to repository. After executing the operation the existing topobase formats are updated and new ones are created according to the list of formats supported in the current platform version. To execute the operation, in the tTopobase field specify topobase moniker in repository. The moniker is created based on the repository connection moniker and the topobase key. As a result of conversion, the system creates topobase versions with different formats. These versions will be saved to the repository database and used whenever required.

The operation results in the information about successful or failed completion of conversion.

Example

Below is the example of repository topobase conversion. The request contains a topobase moniker. The response contains whether the operation is completed successfully.

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">
<ConvertTopobase xmlns="http://www.fsight.ru/PP.SOM.Som">
<tTopobase xmlns="">
  <id>S1!M!296652</id>
  </tTopobase>
  </ConvertTopobase>
  </s:Body>
  </s:Envelope>

SOAP response:

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

JSON request:

{
"ConvertTopobase" :
{
"tTopobase" :
{
"id" : "S1!M!296652"
}
}
}

JSON response:

{
"ConvertTopobaseResult" :
{
"result" : "1"
}
}
public static ConvertTopobaseResult ConvertTopobase(MbId mb, string topobaseId)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tArg = new ConvertTopobase()
{
tTopobase = new TopobaseId()
{
id = mb.id + '!' + FindObjectById(mb, topobaseId).k
}
};
// Convert topobase
var tResult = somClient.ConvertTopobase(tArg);
return tResult;
}

See also:

Topobase: Operations