NumAllocateNumber
Занимает номер в зоне нумератора.
Запрос
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/NumAllocateNumber"
<?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>
<NumAllocateNumber xmlns="http://schemas.docsvision.com/Platform/2009-02-03/StorageServer/">
<sessionId>guid</sessionId>
<numeratorId>guid</numeratorId>
<userId>guid</userId>
<zoneName>string</zoneName>
<number>int</number>
</NumAllocateNumber>
</soap:Body>
</soap:Envelope>
python
- Параметры
-
- sessionId
-
Идентификатор пользовательской сессии
- numeratorId
-
Идентификатор карточки нумератора
- userId
-
Идентификатор сотрудника (справочник сотрудников), занимающего номер
- zoneName
-
Название зоны, которой принадлежит занимаемый
- number
-
Занимаемый номер
Ответ
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>
<NumAllocateNumberResponse xmlns="http://schemas.docsvision.com/Platform/2009-02-03/StorageServer/">
<NumberId>guid</NumberId>
</NumAllocateNumberResponse>
</soap:Body>
</soap:Envelope>
python
Ответ содержит идентификатор занятого номера.
Пример запроса
session.headers['SOAPAction'] = "http://schemas.docsvision.com/Platform/2009-02-03/StorageServer/NumAllocateNumber" (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>
<NumAllocateNumber xmlns="http://schemas.docsvision.com/Platform/2009-02-03/StorageServer/">
<sessionId>6565c75b-298d-e511-9417-90e6ba57b9f8</sessionId>
<numeratorId>A16E9792-5B88-E511-9417-90E6BA57B9F8</numeratorId>
<userId>C9449204-39AD-4DD8-B212-7C38580BD2BB</userId>
<zoneName>SimpleZone</zoneName>
<number>5</number>
</NumAllocateNumber>
</soap:Body>
</soap:Envelope>""" (2)
response = session.post(url, data=body) (3)
responseParsed = ElementTree.fromstring(response.content)
print(responseParsed.findtext(".//{http://schemas.docsvision.com/Platform/2009-02-03/StorageServer/}NumberId")) (4)
python
1 | Изменяем цель запроса в заголовке запроса. |
2 | SOAP-сообщение. |
3 | Отправляем SOAP-сообщение. |
4 | Разбираем ответ и выводим идентификатор занятого номера. |