Getting Information about Custom Class Object

Below is the example of using the GetCustomOb operation for getting information about a custom class object. The request contains the object moniker and the pattern, according to which information is obtained: all data about object, except for icons, is requested. The response contains the obtained information.

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">
<GetCustomOb xmlns="http://www.fsight.ru/PP.SOM.Som">
<tCustomOb xmlns="">
  <id>LDPFDGAHAHHCGOAEBAFLLHKHMOALEEDEMKDKCJAAKNELDHAE!M!S!TGHNHGJAHAHHCGOAENBPOBGJCGMEKKAFEILDEOPPCHPKFAHNO</id>
  </tCustomOb>
<tArg xmlns="">
<pattern>
  <obInst>true</obInst>
  <parsOwnDefVals>true</parsOwnDefVals>
  <all>true</all>
  <execHandler>Default</execHandler>
<customClass>
  <smallImage>false</smallImage>
  <largeImage>false</largeImage>
  </customClass>
  </pattern>
  </tArg>
  </GetCustomOb>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetCustomObResult 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>LDPFDGAHAHHCGOAEBAFLLHKHMOALEEDEMKDKCJAAKNELDHAE!M!S!TGHNHGJAHAHHCGOAENBPOBGJCGMEKKAFEILDEOPPCHPKFAHNO</id>
  </id>
<meta xmlns="">
<obInst>
<obDesc ds="" isShortcut="0" isLink="0" ver="1" hf="0">
  <i>CUST_OBJ</i>
  <n>Data handler</n>
  <k>38194</k>
  <c>71425</c>
  <p>38193</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  <isPermanent>1</isPermanent>
  <isTemp>0</isTemp>
  </obDesc>
  </obInst>
  <dirty>0</dirty>
<data>
<refs>
  <its />
  </refs>
  <content />
  </data>
  <handlerResult />
<classes>
<its>
<it ic="0">
  <k>1</k>
  <id>WORKER</id>
  <n>Data handler</n>
  <vis>1</vis>
  <implURL />
<operations>
<its>
<it>
  <k>1</k>
  <id>CLS1OP1</id>
  <n>Import</n>
  <vis>1</vis>
  </it>
<it>
  <k>2</k>
  <id>CLS1OP2</id>
  <n>Export</n>
  <vis>1</vis>
  </it>
  </its>
  </operations>
  <c>71425</c>
  <h>0</h>
  </it>
  </its>
  </classes>
  </meta>
  </GetCustomObResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetCustomOb" :
{
"tCustomOb" :
{
"id" : "LDPFDGAHAHHCGOAEBAFLLHKHMOALEEDEMKDKCJAAKNELDHAE!M!S!TGHNHGJAHAHHCGOAENBPOBGJCGMEKKAFEILDEOPPCHPKFAHNO"
},
"tArg" :
{
"pattern" :
{
"obInst" : "true",
"parsOwnDefVals" : "true",
"all" : "true",
"execHandler" : "Default",
"customClass" :
{
"smallImage" : "false",
"largeImage" : "false"
}
}
}
}
}

JSON response:

{
"GetCustomObResult" :
{
"id" :
{
"id" : "LDPFDGAHAHHCGOAEBAFLLHKHMOALEEDEMKDKCJAAKNELDHAE!M!S!TGHNHGJAHAHHCGOAENBPOBGJCGMEKKAFEILDEOPPCHPKFAHNO"
},
"meta" :
{
"obInst" :
{
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "1",
"@hf" : "0",
"i" : "CUST_OBJ",
"n" : "Data handler",
"k" : "38194",
"c" : "71425",
"p" : "38193",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0",
"isPermanent" : "1",
"isTemp" : "0"
}
},
"dirty" : "0",
"data" :
{
"refs" :
{
"its" : ""
},
"content" : ""
},
"handlerResult" : "",
"classes" :
{
"its" :
{
"it" :
[
{
"@ic" : "0",
"k" : "1",
"id" : "WORKER",
"n" : "Data handler",
"vis" : "1",
"implURL" : "",
"operations" :
{
"its" :
{
"it" :
[
{
"k" : "1",
"id" : "CLS1OP1",
"n" : "Import",
"vis" : "1"
},
{
"k" : "2",
"id" : "CLS1OP2",
"n" : "Export",
"vis" : "1"
}
]
}
},
"c" : "71425",
"h" : "0"
}
]
}
}
}
}
}
public static GetCustomObResult GetCustomObjectInfo(CustomObId moniker)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tGet = new GetCustomOb()
{
tArg = new GetCustomObArg()
{
pattern = new CustomObMdPattern()
{
all = true,
customClass = new CustomClassPattern()
{
largeImage = false,
smallImage = false
},
execHandler = CustomObHandlerType.Default
}
},
tCustomOb = moniker
};
// Get information about custom class object
var tResult = somClient.GetCustomOb(tGet);
return tResult;
}

See also:

GetCustomOb: Operation