GetModule

Syntax

GetModuleResult GetModule(OdId tObject)

Parameters

tObject. Unit moniker.

Description

The GetModule operation gets information about repository Fore unit.

Comments

To execute the operation, in the tObject parameter specify moniker of the repository object that is unit. The object moniker can be obtained on executing the GetObjects operation. The operation results in the code implemented in the unit, and a list of links to the assemblies connected to the unit.

Example

Bellow is the example of using the GetModule operation to get information about the unit. The request contains moniker of unit in the repository. The response contains unit text, the list of connected assemblies and also description of the unit as a repository object. 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">
<GetModule xmlns="http://www.fsight.ru/PP.SOM.Som">
<tObject xmlns="">
  <id>S1!M!172002</id>
  </tObject>
  </GetModule>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetModuleResult 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">
<meta xmlns="">
  <text>Public Class TestObject: Object _arr: Array Of Double; Public Constructor Create; Begin _arr := New Double[5]; End Constructor Create; Public Constructor CreateWithParams(Size: Integer; DefaultValue: Double = 0); Begin _arr := New Double[Size]; If DefaultValue <> 0 Then //... End If; End Constructor CreateWithParams; Public Sub Run; Begin //... End Sub Run; End Class TestObject; Sub Main; Var obj: TestObject; Begin obj := New TestObject.CreateWithParams(10, 100); Debug.WriteLine("The main procedure is running. The object is created."); //... End Sub Main;</text>
<references>
<builtinReferences>
  <s>Collections</s>
  <s>Cubes</s>
  <s>Metabase</s>
  </builtinReferences>
  <repoReferences />
  </references>
<desc ds="" isShortcut="0" isLink="0" ver="18" hf="0">
  <i>M_ADDITIONAL</i>
  <n>Additional</n>
  <k>172002</k>
  <c>1537</c>
  <p>171999</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  </desc>
  </meta>
  </GetModuleResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetModule" :
{
"tObject" :
{
"id" : "S1!M!172002"
}
}
}

JSON response:

{
"GetModuleResult" :
{
"meta" :
{
"text" : "Public Class TestObject: Object \t_arr: Array Of Double; \tPublic Constructor Create; \tBegin \t\t_arr := New Double[5]; \tEnd Constructor Create; \tPublic Constructor CreateWithParams(Size: Integer; DefaultValue: Double = 0); \tBegin \t\t_arr := New Double[Size]; \t\tIf DefaultValue <> 0 Then \t\t\t\/\/... \t\tEnd If; \tEnd Constructor CreateWithParams; \tPublic Sub Run; \tBegin \t\t\/\/... \tEnd Sub Run; End Class TestObject; Sub Main; Var \tobj: TestObject; Begin \tobj := New TestObject.CreateWithParams(10, 100); \tDebug.WriteLine("The main procedure is running. The object is created."); \t\/\/... End Sub Main;",
"references" :
{
"builtinReferences" :
{
"s" :
[
"Collections",
"Cubes",
"Metabase"
]
},
"repoReferences" : ""
},
"desc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "18",
"@hf" : "0",
"i" : "M_ADDITIONAL",
"n" : "Additional",
"k" : "172002",
"c" : "1537",
"p" : "171999",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0"
}
}
}
}
public static GetModuleResult GetModuleInfo(MbId mb, string modId)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tGet = new GetModule()
{
//Create object moniker
tObject = new OdId() { id = mb.id + "!" + FindObjectById(mb, modId).k }
};
//Get unit information
var result = somClient.GetModule(tGet);
return result;
}

See also:

Working with Development Environment