CloseWsp

Syntax

bool CloseWsp(WspId tWsp)

Parameters

tWsp. Moniker of closed workspace instance.

Description

The CloseWsp operation closes workspace instance.

Comments

To execute the operation, in the tWsp field specify moniker of the workspace instance to be closed. The moniker can be obtained on executing the OpenWsp operation.

The operation results in the logical True if the object was closed successfully.

Example

Below is the example of closing workspace instance. The response contains the moniker of opened workspace instance. The response contains whether the context is successfully closed.

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">
<CloseWsp xmlns="http://www.fsight.ru/PP.SOM.Som">
<tWsp xmlns="">
  <id>CIMJHKLEBJECGOAEDDAIHBNBMCJPBEIEDLDBMALGIAOFGHDO!M!S!WSPMCLOGNLEBJECGOAEIIMMCOLKFIOGIGNEPLNLFCEAJGEIEIBG</id>
  </tWsp>
  </CloseWsp>
  </s:Body>
  </s:Envelope>

SOAP response:

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

JSON request:

{
"CloseWsp" :
{
"tWsp" :
{
"id" : "CIMJHKLEBJECGOAEDDAIHBNBMCJPBEIEDLDBMALGIAOFGHDO!M!S!WSPMCLOGNLEBJECGOAEIIMMCOLKFIOGIGNEPLNLFCEAJGEIEIBG"
}
}
}

JSON response:

{
"CloseWspResult" : "1"
}
public static bool CloseWorkspace(string moniker)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tClose = new CloseWsp()
{
tWsp = new WspId() { id = moniker }
};
// Close workspace instance
var b = somClient.CloseWsp(tClose);
return b;
}

See also:

Working with Workspace