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 extracted: all data about object, except for icons, is requested. The response contains the obtained information.
{ "GetCustomOb" : { "tCustomOb" : { "id" : "S1!M!S!T1" }, "tArg" : { "pattern" : { "obInst" : "true", "all" : "true", "execHandler" : "Default", "customClass" : { "smallImage" : "false", "largeImage" : "false" } } } } }
{ "GetCustomObResult" : { "id" : { "id" : "S1!M!S!T1" }, "meta" : { "obInst" : { "obDesc" : { "@fullUrl" : "\/", "@isShortcut" : "0", "@isLink" : "0", "i" : "CUST_OBJ", "n" : "Data handler", "k" : "38194", "c" : "71425", "p" : "38193", "h" : "0", "isPermanent" : "1", "isTemp" : "0" } }, "dirty" : "0", "data" : { "refs" : { "its" : "" }, "content" : "" }, "handlerResult" : "", "classes" : { "its" : { "it" : [ { "k" : "1", "id" : "WORKER", "n" : "Worker", "vis" : "1", "implURL" : "", "operations" : { "its" : { "it" : [ { "k" : "1", "id" : "CLS1OP1", "n" : "Import", "vis" : "1" }, { "k" : "2", "id" : "CLS1OP2", "n" : "Export", "vis" : "1" } ] } } } ] } } } } }
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 user class object var tResult = somClient.GetCustomOb(tGet); return tResult; }
See also: