CloseQuery

Syntax

bool CloseQuery(OdId tOb)

Parameters

tOb. Moniker of opened instance of the Query object.

Description

The CloseQuery operation closes the opened instance of the Query object.

Comments

To execute the operation, in the tOb field specify moniker of query instance to be closed. The operation results in the logical True if the object was closed successfully.

Example

The example of closing query instance. The request contains moniker of opened instance of the Query object. The response returns whether closing was successful.

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">
<CloseQuery xmlns="http://www.fsight.ru/PP.SOM.Som">
<tOb xmlns="">
  <id>S1!M!S!QUERY6</id>
  </tOb>
  </CloseQuery>
  </s:Body>
  </s:Envelope>

SOAP response:

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

JSON request:

{
"CloseQuery" :
{
"tOb" :
{
"id" : "S1!M!S!QUERY6"
}
}
}

JSON response:

{
"CloseQueryResult" : "1"
}
public static bool CloseQuery(string moniker)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tClose = new CloseQuery()
{
tOb = new OdId() { id = moniker }
};
//Close query instance
var b = somClient.CloseQuery(tClose);
return b;
}

See also:

Working with Relational Objects of Repository