<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope" xmlns:ns2="https://int44.zakupki.gov.ru/eis-integration/services/getDocsMis2">
<soapenv:Header/>
<soapenv:Body>
<ns2:getPublicDocsRequest>
<index>
<id>25aa7b1a-8ab2-4838-86b2-65f5e8127cc8</id>
<sender>test_001</sender>
<createDateTime>2024-01-17T09:30:47Z</createDateTime>
<mode>PROD</mode>
</index>
<selectionParams44>
<subsystemType>PRIZ</subsystemType>
<periodInfo>
<exactDate>2024-03-14</exactDate>
</periodInfo>
<organizations44Info>
<organization44Info>
<regNum>123456789012</regNum>
</organization44Info>
</organizations44Info>
</selectionParams44>
</ns2:getPublicDocsRequest>
</soapenv:Body>
</soapenv:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://zakupki.gov.ru/fz44/get-docs-le/ws">
<soapenv:Header/>
<soapenv:Body>
<ws:getNsiRequest>
<index>
<id>{{$guid}}</id>
<createDateTime>{{$isoTimestamp}}</createDateTime>
<mode>PROD</mode>
</index>
<selectionParams>
<nsiCode44>nsiAllList</nsiCode44>
<nsiKind>all</nsiKind>
</selectionParams>
</ws:getNsiRequest>
</soapenv:Body>
</soapenv:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://zakupki.gov.ru/fz44/get-docs-le/ws">
<soapenv:Header/>
<soapenv:Body>
<ws:getDocsByReestrNumberRequest>
<index>
<id>32c8b412-bbd7-4264-8a72-3a9bad9bc167</id>
<createDateTime>2024-10-24T11:29:22.980+03:00</createDateTime>
<mode>PROD</mode>
</index>
<selectionParams>
<subsystemType>PRIZ</subsystemType>
<reestrNumber>0847500000924001515</reestrNumber>
</selectionParams>
</ws:getDocsByReestrNumberRequest>
</soapenv:Body>
</soapenv:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://zakupki.gov.ru/fz44/get-docs-le/ws">
<soapenv:Header/>
<soapenv:Body>
<ws:getDocsByOrgRegionRequest>
<index>
<id>89cfbbaf-1951-423e-b455-70d433c66123</id>
<createDateTime>2024-11-22T12:36:00.084Z</createDateTime>
<mode>PROD</mode>
</index>
<selectionParams>
<orgRegion>50</orgRegion>
<subsystemType>UR</subsystemType>
<documentType44>contractProcedureUnilateralRefusal</documentType44>
<periodInfo>
<exactDate>2024-11-22</exactDate>
</periodInfo>
</selectionParams>
</ws:getDocsByOrgRegionRequest>
</soapenv:Body>
</soapenv:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://zakupki.gov.ru/fz44/get-docs-le/ws">
<soapenv:Header/>
<soapenv:Body>
<ws:getDocsByOrgRegionRequest>
<index>
<id>32c8b412-baa7-4264-8a72-3a9bad9bc167</id>
<createDateTime>2024-10-25T16:37:22.980Z</createDateTime>
<mode>PROD</mode>
</index>
<selectionParams>
<orgRegion>49</orgRegion>
<subsystemType>PRIZ</subsystemType>
<documentType44>epNotificationEZK2020</documentType44>
<periodInfo>
<exactDate>2024-10-17+03:00</exactDate>
</periodInfo>
</selectionParams>
</ws:getDocsByOrgRegionRequest>
</soapenv:Body>
</soapenv:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://zakupki.gov.ru/fz44/get-docs-le/ws">
<soapenv:Header/>
<soapenv:Body>
<ws:getDocsByOrgRegionRequest>
<index>
<id>{-Variable.gUID-}</id>
<createDateTime>{-Variable.dATE-}</createDateTime>
<mode>PROD</mode>
</index>
<selectionParams>
<orgRegion>77</orgRegion>
<subsystemType>UR</subsystemType>
<exactDate>2024-11-21+03:00<</exactDate>
</selectionParams>
</ws:getDocsByOrgRegionRequest>
</soapenv:Body>
</soapenv:Envelope>
33c8b413-bbd9-4264-8a72-3a9bad9ac187
2024-12-04T11:12:22.980+03:00
PROD
RPZ223
2240778154
. <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://zakupki.gov.ru/fz44/get-docs-le/ws">
<soapenv:Header/>
<soapenv:Body>
<ws:getDocsByReestrNumberRequest>
<index>
<id>33c8b413-bbd9-4264-8a72-3a9bad9ac187</id>
<createDateTime>2024-12-04T11:12:22.980+03:00</createDateTime>
<mode>PROD</mode>
</index>
<selectionParams>
<subsystemType>RPZ223</subsystemType>
<reestrNumber>2240778154</reestrNumber>
</selectionParams>
</ws:getDocsByReestrNumberRequest>
</soapenv:Body>
</soapenv:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://zakupki.gov.ru/fz44/get-docs-le/ws">
<soapenv:Header/>
<soapenv:Body>
<ws:getDocsByOrgRegionRequest>
<index>
<id>32c8b412-baa7-5264-8a74-3a9bad9bc167</id>
<createDateTime>2024-12-04T14:38:22.980Z</createDateTime>
<mode>PROD</mode>
</index>
<selectionParams>
<orgRegion>50</orgRegion>
<subsystemType>RPZ223</subsystemType>
<documentType223>purchasePlan</documentType223>
<periodInfo>
<exactDate>2024-10-17+03:00</exactDate>
</periodInfo>
</selectionParams>
</ws:getDocsByOrgRegionRequest>
</soapenv:Body>
</soapenv:Envelope>
<ws:getDocsByOrgRegionRequest>
<index>
<id>{{$guid}}</id>
<createDateTime>{{$isoTimestamp}}</createDateTime>
<mode>PROD</mode>
</index>
<selectionParams>
<orgRegion>77</orgRegion>
<subsystemType>RNP</subsystemType>
<documentType44>unfairSupplier2022</documentType44>
<periodInfo>
<exactDate>2024-12-18</exactDate>
</periodInfo>
</selectionParams>
</ws:getDocsByOrgRegionRequest>
import requests
import os
import uuid
from datetime import datetime
service_url = "https://int44.zakupki.gov.ru/eis-integration/services/getDocsLE2"
token = "ваш_токен"
save_path = r"путь для сохранения архива"
#SOAP-запрос
soap_request_template = """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://zakupki.gov.ru/fz44/get-docs-le/ws">
<soapenv:Header>
<token>{token}</token>
</soapenv:Header>
<soapenv:Body>
<ws:getDocsByOrgRegionRequest>
<index>
<id>{request_id}</id>
<createDateTime>{create_date}</createDateTime>
<mode>PROD</mode>
</index>
<selectionParams>
<orgRegion>38</orgRegion>
<subsystemType>PRIZ</subsystemType>
<documentType44>epNotificationEZK2020</documentType44>
<periodInfo>
<exactDate>2024-11-28</exactDate>
</periodInfo>
</selectionParams>
</ws:getDocsByOrgRegionRequest>
</soapenv:Body>
</soapenv:Envelope>"""
# Функция для создания запроса
def create_soap_request():
request_id = str(uuid.uuid4())
create_date = datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ')
return soap_request_template.format(token=token, request_id=request_id, create_date=create_date)
# Функция для отправки SOAP-запроса
def send_soap_request():
headers = {
"Content-Type": "text/xml; charset=utf-8",
}
data = create_soap_request()
response = requests.post(service_url, headers=headers, data=data, verify=False)
response.raise_for_status()
return response.text
# Функция для загрузки архива
def download_archive(archive_url, archive_name):
headers = {
"User-Agent": "Mozilla/5.0"
}
try:
with requests.Session() as session:
response = session.get(archive_url, headers=headers, stream=True, verify=False)
response.raise_for_status()
# Сохраняем файл
file_path = os.path.join(save_path, archive_name)
with open(file_path, "wb") as file:
for chunk in response.iter_content(chunk_size=8192):
file.write(chunk)
print(f"Архив скачан: {file_path}")
except requests.exceptions.HTTPError as http_err:
print(f"HTTP ошибка при загрузке: {http_err}")
except Exception as err:
print(f"Ошибка при загрузке архива: {err}")
# Исполнение
def main():
try:
print("Отправляем запрос к серверу для формирования архива...")
response = send_soap_request()
print("Ответ сервера:")
print(response)
if "<archiveUrl>" in response:
archive_url_start = response.find("<archiveUrl>") + len("<archiveUrl>")
archive_url_end = response.find("</archiveUrl>")
archive_url = response[archive_url_start:archive_url_end]
print(f"Ссылка на архив: {archive_url}")
# Извлекаем данные для имени файла
id_start = response.find("<id>") + len("<id>")
id_end = response.find("</id>")
archive_id = response[id_start:id_end]
date_start = response.find("<createDateTime>") + len("<createDateTime>")
date_end = response.find("</createDateTime>")
create_date = response[date_start:date_end].replace(":", "-")
archive_name = f"epNotificationEZK2020_{create_date}_{archive_id}.zip"
print("Загрузка архива...")
if not os.path.exists(save_path):
os.makedirs(save_path)
download_archive(archive_url, archive_name)
else:
print("Ссылка отсутствует")
except Exception as e:
print(f"Произошла ошибка: {e}")
if __name__ == "__main__":
main()
curl --data-binary C:\Stunnel\1.xml -X POST http://localhost:8080/eisintegration/services/getDocsLE
ocsLE2
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>
...могу написать что делал.
debug = 7
cert = (Путь к сертификату с расширением .cer)
output = (путь к файлу лога stunnel)
client = yes
[https]
accept = 127.0.0.1:8080
connect = int44.zakupki.gov.ru:443
http://127.0.0.1:8080/eis-integration/services/getDocsLE
http://[Имя моего сервера]:8080/eis-integration/services/getDocsLE