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.
{
"GetCustomOb" :
{
"tCustomOb" :
{
"id" : "LDPFDGAHAHHCGOAEBAFLLHKHMOALEEDEMKDKCJAAKNELDHAE!M!S!TGHNHGJAHAHHCGOAENBPOBGJCGMEKKAFEILDEOPPCHPKFAHNO"
},
"tArg" :
{
"pattern" :
{
"obInst" : "true",
"parsOwnDefVals" : "true",
"all" : "true",
"execHandler" : "Default",
"customClass" :
{
"smallImage" : "false",
"largeImage" : "false"
}
}
}
}
}
{
"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: