See below the example of using the SetMbUpdate operation to save updates to file. The update moniker and save command are sent in the query. The moniker of received file is sent in the request. The obtained moniker can be further used to load update from file.
{
"SetMbUpdate" :
{
"tMbUpdate" :
{
"id" : "S1!M!S!MbUpd1"
},
"tArg" :
{
"pattern" :
{
"execute" : "true"
},
"meta" :
{
"execute" :
{
"command" : "Save",
"async" : "false",
"saveToFile" :
{
"newFormat" : "true"
}
}
},
"metaGet" :
{
"execute" : "true"
}
}
}
}
{
"SetMbUpdateResult" :
{
"id" :
{
"id" : "S1!M!S!MbUpd1"
},
"meta" :
{
"execute" :
{
"resolveTimeout" : "600000",
"state" : "Finished",
"saveToFile" :
{
"binaryId" :
{
"id" : "S1!M!Bin!0"
},
"newFormat" : "1"
}
}
}
}
}
public static SetMbUpdateResult SaveUpdate(string moniker)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tSet = new SetMbUpdate()
{
tArg = new SetMbUpdateArg()
{
pattern = new MbUpdateMdPattern()
{
execute = true
},
meta = new MbUpdateMd()
{
execute = new MbUpdateExecute()
{
command = MbUpdateExecuteCommand.Save,
async = false,
saveToFile = new MbUpdateMdSaveToFile()
{
newFormat = true
}
}
},
metaGet = new MbUpdateMdPattern()
{
execute = true
}
},
tMbUpdate = new MbUpdateId() { id = moniker }
};
//Save update
var result = somClient.SetMbUpdate(tSet);
return result;
}
See also: