SaveObject

Syntax

SaveObject(OdId tObject)

Parameters

tObject. Changed object moniker.

Description

The SaveObject operation saves changes of the repository object.

Comments

This operation is used to save the changes made using various Set* operations. To execute the operation, in the tObject parameter specify the moniker of the object that is opened for edit and contains any changes. The operation does not return any result.

Example

Below is the example of saving object changes. The request contains object moniker. The response contains whether changes are saved successfully.

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">
<SaveObject xmlns="http://www.fsight.ru/PP.SOM.Som">
<tObject xmlns="">
  <id>FNDKOLJACBNNFOAEDCEENEKPOGMMOOGEBLEIHFKEJOFOFMNJ!M!S!PEBKNNPLACBNNFOAEFJIHENGMLLEEFMNEGKDLLLINOAOGLEBE</id>
  </tObject>
  </SaveObject>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <SaveObjectResult 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">1</SaveObjectResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SaveObject" :
{
"tObject" :
{
"id" : "FNDKOLJACBNNFOAEDCEENEKPOGMMOOGEBLEIHFKEJOFOFMNJ!M!S!PEBKNNPLACBNNFOAEFJIHENGMLLEEFMNEGKDLLLINOAOGLEBE"
}
}
}

JSON response:

{
"SaveObjectResult" : "1"
}
//public static SaveObjectResult SaveObject(string moniker)
public static bool SaveObject(string moniker)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
var tSave = new SaveObject()
{
tObject = new OdId()
{
id = moniker
}
};
//Save object changes
var result = somClient.SaveObject(tSave);
return result;
}

See also:

Common Operations