LabelCreate

Создаёт новую цветовую метку.

Метка будет добавлена только текущему пользователю.

Запрос

POST /DocsVision/StorageServer/StorageServerService.asmx HTTP/1.1
Host: DOCSVISION_SERVER.COM
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://schemas.docsvision.com/Platform/2009-02-03/StorageServer/LabelCreate"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <LabelCreate xmlns="http://schemas.docsvision.com/Platform/2009-02-03/StorageServer/">
      <sessionId>guid</sessionId>
      <xmlLabel>string</xmlLabel>
    </LabelCreate>
  </soap:Body>
</soap:Envelope>
Параметры
sessionId

Идентификатор пользовательской сессии

xmlLabel

Данные добавляемой цветовой метки

Строка xmlLabel должна соответствовать формату элемента CardLabelInfo, приведенному в схеме ServerRequests.xsd:

<xsd:complexType name="CardLabelInfo">
  <xsd:sequence>
    <xsd:element name="Description" type="xsd:string" />
  </xsd:sequence>
  <xsd:attribute name="ID" type="ms:guid" use="required"/>
  <xsd:attribute name="Color" type="xsd:int" use="required"/>
  <xsd:attribute name="Name" type="xsd:string"/>
</xsd:complexType>

Значение Color выбирается из цветовой схемы ARGB.

Ответ

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <LabelCreateResponse xmlns="http://schemas.docsvision.com/Platform/2009-02-03/StorageServer/">
      <labelId>guid</labelId>
    </LabelCreateResponse>
  </soap:Body>
</soap:Envelope>

Ответ содержит идентификатор добавленной цветовой метки.

Пример запроса

session.headers['SOAPAction'] = "http://schemas.docsvision.com/Platform/2009-02-03/StorageServer/LabelCreate" (1)

body = """<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <LabelCreate xmlns="http://schemas.docsvision.com/Platform/2009-02-03/StorageServer/">
      <sessionId>6565c75b-298d-e511-9417-90e6ba57b9f8</sessionId>
      <xmlLabel>&lt;CardLabelInfo Color=&quot;-16711937&quot; Name=&quot;NewColor&quot;&gt;&lt;Description&gt;New color&lt;/Description&gt;&lt;/CardLabelInfo&gt;</xmlLabel>
    </LabelCreate>
  </soap:Body>
</soap:Envelope>""" (2)

response = session.post(url, data=body) (3)
1 Изменяем цель запроса в заголовке запроса.
2 SOAP-сообщение.
3 Отправляем SOAP-сообщение.