POST запрос к zakupki.gov.ru

1. m1kll 7 12.02.25 06:41 Сейчас в теме
Уважаемые форумчане, помогите пожалуйста найти ошибку в коде, пытаюсь получить с госзакупок файлы, xml в Postman отрабатывает корректно.
1С выдает: "Ошибка работы с Интернет: Превышен таймаут".
Запрос = Новый HTTPЗапрос("/eis-integration/services/getDocsIP");
	Запрос.УстановитьТелоИзСтроки(
	"<?xml version='1.0' encoding='UTF-8'?>" +
	"<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:ws='http://zakupki.gov.ru/fz44/get-docs-ip/ws'>" +
	"    <soapenv:Header>" +
	"   	 <individualPerson_token>Токен</individualPerson_token>" +
	"    </soapenv:Header>" +
	"    <soapenv:Body>" +
	"    <ws:getNsiRequest>" +
	"    		<index>" +
	"   			<id>ИД</id>" +
	"    			<createDateTime>Дата</createDateTime>" +
	"    			<mode>PROD</mode>" +
	"    		</index>" +
	"    	<selectionParams>" +
	"    		<nsiCode44>nsiKTRUNew</nsiCode44>" +
	"    		<nsiKind>all</nsiKind>" +
	"    	</selectionParams>" +
	"    </ws:getNsiRequest>" +
	"    </soapenv:Body>" +
	"    </soapenv:Envelope>" ,
	"utf-8"
	);
	Запрос.Заголовки.Вставить("Content-Type", "text/xml; charset=utf-8");
	Запрос.Заголовки.Вставить("SOAPAction", "getNsiRequest");
	
	HTTPСоединение = Новый HTTPСоединение("int44.zakupki.gov.ru");
	
	Ответ = HTTPСоединение.ОтправитьДляОбработки(Запрос);
	
	Сообщить(Ответ.ТелоКакСтрока());
Показать
Найденные решения
11. Sashares 33 12.02.25 12:50 Сейчас в теме
(9) Сервис открывается по адресу:
https ://int44.zakupki.gov.ru/eis-integration/services/getDocsIP?wsdl

Значит надо устанавливать защищенное соединение и порт 443.
m1kll; user1326147; +2 Ответить
2. antz 12.02.25 09:06 Сейчас в теме
(1) Соединение-то небось защищенное нужно.
12. user1326147 12.02.25 13:15 Сейчас в теме
(9) Только свои заголовки, тоекны и т.п.
&НаКлиенте
Процедура Запрос(Команда)
	Соединение = Новый HTTPСоединение(
        "int44.zakupki.gov.ru", // сервер (хост)
        443, // порт, по умолчанию для http используется 80, для https 443
        , // пользователь для доступа к серверу (если он есть)
        , // пароль для доступа к серверу (если он есть)
        , // здесь указывается прокси, если он есть
        , // таймаут в секундах, 0 или пусто - не устанавливать
       Новый ЗащищенноеСоединениеOpenSSL()
    );
 
    // Получаем текст страницы через GET-запрос.
    Запрос = Новый HTTPЗапрос("eis-integration/services/getDocsIP?wsdl");
	
	
	Результат = Соединение.Получить(Запрос);
    Сообщить(Результат.КодСостояния);
    Сообщить(Результат.ПолучитьТелоКакСтроку());
КонецПроцедуры
Показать




- 200
- <?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2018 rel. 2 sp1 (http://www.altova.com) by user_user (altcom_altcom) -->
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ip="http://zakupki.gov.ru/fz44/get-docs-ip/ws" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://zakupki.gov.ru/oos/base/1" targetNamespace="http://zakupki.gov.ru/fz44/get-docs-ip/ws">
    <wsdl:types>
        <xsd:schema>
            <xsd:import namespace="http://zakupki.gov.ru/fz44/get-docs-ip/ws" schemaLocation="https://int44.zakupki.gov.ru/eis-integration/services/getDocsIP?xsd=getDocsIP-ws-api.xsd"/>
        </xsd:schema>
    </wsdl:types>
    <wsdl:message name="getDocsByReestrNumberRequest">
        <wsdl:part name="getDocsByReestrNumberRequest" element="ip:getDocsByReestrNumberRequest"/>
    </wsdl:message>
    <wsdl:message name="getDocsByReestrNumberResponse">
        <wsdl:part name="getDocsByReestrNumberResponse" element="ip:getDocsByReestrNumberResponse"/>
    </wsdl:message>
    <wsdl:message name="getDocsByOrgRegionRequest">
        <wsdl:part name="getDocsByOrgRegionRequest" element="ip:getDocsByOrgRegionRequest"/>
    </wsdl:message>
    <wsdl:message name="getDocsByOrgRegionResponse">
        <wsdl:part name="getDocsByOrgRegionResponse" element="ip:getDocsByOrgRegionResponse"/>
    </wsdl:message>
    <wsdl:message name="getDocSignaturesByUrlRequest">
        <wsdl:part name="getDocSignaturesByUrlRequest" element="ip:getDocSignaturesByUrlRequest"/>
    </wsdl:message>
    <wsdl:message name="getDocSignaturesByUrlResponse">
        <wsdl:part name="getDocSignaturesByUrlResponse" element="ip:getDocSignaturesByUrlResponse"/>
    </wsdl:message>
    <wsdl:message name="getNsiRequest">
        <wsdl:part name="getNsiOrgRequest" element="ip:getNsiRequest"/>
    </wsdl:message>
    <wsdl:message name="getNsiResponse">
        <wsdl:part name="getNsiResponse" element="ip:getNsiResponse"/>
    </wsdl:message>
    <wsdl:portType name="GetDocsIPFacade">
        <wsdl:operation name="getDocsByReestrNumber">
            <wsdl:input name="getDocsByReestrNumberRequest" message="ip:getDocsByReestrNumberRequest"/>
            <wsdl:output name="getDocsByReestrNumberResponse" message="ip:getDocsByReestrNumberResponse"/>
        </wsdl:operation>
        <wsdl:operation name="getDocsByOrgRegion">
            <wsdl:input name="getDocsByOrgRegionRequest" message="ip:getDocsByOrgRegionRequest"/>
            <wsdl:output name="getDocsByOrgRegionResponse" message="ip:getDocsByOrgRegionResponse"/>
        </wsdl:operation>
        <wsdl:operation name="getDocSignaturesByUrl">
            <wsdl:input name="getDocSignaturesByUrlRequest" message="ip:getDocSignaturesByUrlRequest"/>
            <wsdl:output name="getDocSignaturesByUrlResponse" message="ip:getDocSignaturesByUrlResponse"/>
        </wsdl:operation>
        <wsdl:operation name="getNsi">
            <wsdl:input name="getNsiRequest" message="ip:getNsiRequest"/>
            <wsdl:output name="getNsiResponse" message="ip:getNsiResponse"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="GetDocsIPFacadeBinding" type="ip:GetDocsIPFacade">
        <soap:binding st yle="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="getDocsByReestrNumber">
            <soap:operation soapAction="http://zakupki.gov.ru/fz44/queue/ws/get-docs-ip"/>
            <wsdl:input name="getDocsByReestrNumberRequest">
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output name="getDocsByReestrNumberResponse">
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="getDocsByOrgRegion">
            <soap:operation soapAction="http://zakupki.gov.ru/fz44/queue/ws/get-docs-ip"/>
            <wsdl:input name="getDocsByOrgRegionRequest">
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output name="getDocsByOrgRegionResponse">
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="getDocSignaturesByUrl">
            <soap:operation soapAction="http://zakupki.gov.ru/fz44/queue/ws/get-docs-ip"/>
            <wsdl:input name="getDocSignaturesByUrlRequest">
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output name="getDocSignaturesByUrlResponse">
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="getNsi">
            <soap:operation soapAction="http://zakupki.gov.ru/fz44/queue/ws/get-docs-ip"/>
            <wsdl:input name="getNsiRequest">
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output name="getNsiResponse">
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="GetDocsIPFacadeService">
        <wsdl:port name="GetDocIPFacadePort" binding="ip:GetDocsIPFacadeBinding">
            <soap:address location="https://int44.zakupki.gov.ru/eis-integration/services/getDocsIP"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>
Показать
13. m1kll 7 13.02.25 06:08 Сейчас в теме
Большое спасибо всем откликнувшимся, проблема действительно была в том, что работает только https-соединение
Остальные ответы
Подписаться на ответы Инфостарт бот Сортировка: Древо развёрнутое
Свернуть все
2. antz 12.02.25 09:06 Сейчас в теме
(1) Соединение-то небось защищенное нужно.
3. m1kll 7 12.02.25 09:15 Сейчас в теме
(2) нет getDocsIP это для физ лиц, по токену, и запрос через Postman работает. Защищенное для для юрлиц.
4. Sashares 33 12.02.25 09:18 Сейчас в теме
(3) Ставьте Fiddler и смотрите что реально отправляется, и чем отличается от запроса в Postman'e.
5. m1kll 7 12.02.25 09:28 Сейчас в теме
(4) в том то и дело что ничего не отправляется я переписал процедуру чтобы отправлять файл
	имяФайлаОтправки = "ПУТЬ\2.xml";		
	HTTPСоединение = Новый HTTPСоединение("int44.zakupki.gov.ru",,,,,100);  
	Запрос = Новый HTTPЗапрос("/eis-integration/services/getDocsIP"); 
	Заголовки = Новый Соответствие();
	Заголовки.Вставить("Content-Type", "text/xml;charset=UTF-8");
	Заголовки.Вставить("SOAPAction", "http://zakupki.gov.ru/fz44/queue/ws/get-docs-ip");
	Запрос.УстановитьИмяФайлаТела(имяФайлаОтправки);
	Запрос.Заголовки = Заголовки;		
	Ответ = HTTPСоединение.ОтправитьДляОбработки(Запрос);
	Сообщить(Ответ.ТелоКакСтрока());
Показать

результат тот же.

вот эти моменты вызывают сомнения:
Новый HTTPСоединение("int44.zakupki.gov.ru"); 
Запрос = Новый HTTPЗапрос("/eis-integration/services/getDocsIP"); 
Заголовки.Вставить("SOAPAction", "http://zakupki.gov.ru/fz44/queue/ws/get-docs-ip");

но SOAPAction из wdsl, адрес вроде правельный
6. antz 12.02.25 10:11 Сейчас в теме
(5) А если через WS-прокси?
7. Sashares 33 12.02.25 10:28 Сейчас в теме
(5) Приложи RAW из Fiddler при отправке из Postman.
8. user1326147 12.02.25 10:50 Сейчас в теме
(7)
 report for int44.zakupki.gov.ru (94.25.27.252)
Host is up (0.020s latency).
PORT    STATE    SERVICE
80/tcp  filtered http
443/tcp open     https

И так видно, что он посылает на 80 порт, а его никто не слушает.
Sashares; +1 Ответить
9. m1kll 7 12.02.25 11:02 Сейчас в теме
HTTP/1.1 200 OK
Date: Wed, 12 Feb 2025 07:42:11 GMT
Server: Apache
Content-Type: text/xml;charset=utf-8
X-Powered-By: Undertow/1
Set-Cookie: priv-dstorebus-route=1739346120.83.8858.761360|9090942e507480ee63456f4135986194; Path=/dstore; HttpOnly
Vary: Accept-Encoding,User-Agent
Content-Encoding: gzip
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked

44ae
�������Խ׎�Jw&�*����u� �A��@�ɤ7O?�:=ݣsWl`W��4�LƊ�>�"�o���:�em����������)o�����s��������)��+7E?}���d\�������޶Ͽ��ך�Ő���}��_�����W�?^��?��?��?�} �H�b���AO�����1�пVŦ��]��i\����>�?��I���5�RMǿ,�_� }_�|
...................................................................................................................................................
Показать
11. Sashares 33 12.02.25 12:50 Сейчас в теме
(9) Сервис открывается по адресу:
https ://int44.zakupki.gov.ru/eis-integration/services/getDocsIP?wsdl

Значит надо устанавливать защищенное соединение и порт 443.
m1kll; user1326147; +2 Ответить
12. user1326147 12.02.25 13:15 Сейчас в теме
(9) Только свои заголовки, тоекны и т.п.
&НаКлиенте
Процедура Запрос(Команда)
	Соединение = Новый HTTPСоединение(
        "int44.zakupki.gov.ru", // сервер (хост)
        443, // порт, по умолчанию для http используется 80, для https 443
        , // пользователь для доступа к серверу (если он есть)
        , // пароль для доступа к серверу (если он есть)
        , // здесь указывается прокси, если он есть
        , // таймаут в секундах, 0 или пусто - не устанавливать
       Новый ЗащищенноеСоединениеOpenSSL()
    );
 
    // Получаем текст страницы через GET-запрос.
    Запрос = Новый HTTPЗапрос("eis-integration/services/getDocsIP?wsdl");
	
	
	Результат = Соединение.Получить(Запрос);
    Сообщить(Результат.КодСостояния);
    Сообщить(Результат.ПолучитьТелоКакСтроку());
КонецПроцедуры
Показать




- 200
- <?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2018 rel. 2 sp1 (http://www.altova.com) by user_user (altcom_altcom) -->
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ip="http://zakupki.gov.ru/fz44/get-docs-ip/ws" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://zakupki.gov.ru/oos/base/1" targetNamespace="http://zakupki.gov.ru/fz44/get-docs-ip/ws">
    <wsdl:types>
        <xsd:schema>
            <xsd:import namespace="http://zakupki.gov.ru/fz44/get-docs-ip/ws" schemaLocation="https://int44.zakupki.gov.ru/eis-integration/services/getDocsIP?xsd=getDocsIP-ws-api.xsd"/>
        </xsd:schema>
    </wsdl:types>
    <wsdl:message name="getDocsByReestrNumberRequest">
        <wsdl:part name="getDocsByReestrNumberRequest" element="ip:getDocsByReestrNumberRequest"/>
    </wsdl:message>
    <wsdl:message name="getDocsByReestrNumberResponse">
        <wsdl:part name="getDocsByReestrNumberResponse" element="ip:getDocsByReestrNumberResponse"/>
    </wsdl:message>
    <wsdl:message name="getDocsByOrgRegionRequest">
        <wsdl:part name="getDocsByOrgRegionRequest" element="ip:getDocsByOrgRegionRequest"/>
    </wsdl:message>
    <wsdl:message name="getDocsByOrgRegionResponse">
        <wsdl:part name="getDocsByOrgRegionResponse" element="ip:getDocsByOrgRegionResponse"/>
    </wsdl:message>
    <wsdl:message name="getDocSignaturesByUrlRequest">
        <wsdl:part name="getDocSignaturesByUrlRequest" element="ip:getDocSignaturesByUrlRequest"/>
    </wsdl:message>
    <wsdl:message name="getDocSignaturesByUrlResponse">
        <wsdl:part name="getDocSignaturesByUrlResponse" element="ip:getDocSignaturesByUrlResponse"/>
    </wsdl:message>
    <wsdl:message name="getNsiRequest">
        <wsdl:part name="getNsiOrgRequest" element="ip:getNsiRequest"/>
    </wsdl:message>
    <wsdl:message name="getNsiResponse">
        <wsdl:part name="getNsiResponse" element="ip:getNsiResponse"/>
    </wsdl:message>
    <wsdl:portType name="GetDocsIPFacade">
        <wsdl:operation name="getDocsByReestrNumber">
            <wsdl:input name="getDocsByReestrNumberRequest" message="ip:getDocsByReestrNumberRequest"/>
            <wsdl:output name="getDocsByReestrNumberResponse" message="ip:getDocsByReestrNumberResponse"/>
        </wsdl:operation>
        <wsdl:operation name="getDocsByOrgRegion">
            <wsdl:input name="getDocsByOrgRegionRequest" message="ip:getDocsByOrgRegionRequest"/>
            <wsdl:output name="getDocsByOrgRegionResponse" message="ip:getDocsByOrgRegionResponse"/>
        </wsdl:operation>
        <wsdl:operation name="getDocSignaturesByUrl">
            <wsdl:input name="getDocSignaturesByUrlRequest" message="ip:getDocSignaturesByUrlRequest"/>
            <wsdl:output name="getDocSignaturesByUrlResponse" message="ip:getDocSignaturesByUrlResponse"/>
        </wsdl:operation>
        <wsdl:operation name="getNsi">
            <wsdl:input name="getNsiRequest" message="ip:getNsiRequest"/>
            <wsdl:output name="getNsiResponse" message="ip:getNsiResponse"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="GetDocsIPFacadeBinding" type="ip:GetDocsIPFacade">
        <soap:binding st yle="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="getDocsByReestrNumber">
            <soap:operation soapAction="http://zakupki.gov.ru/fz44/queue/ws/get-docs-ip"/>
            <wsdl:input name="getDocsByReestrNumberRequest">
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output name="getDocsByReestrNumberResponse">
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="getDocsByOrgRegion">
            <soap:operation soapAction="http://zakupki.gov.ru/fz44/queue/ws/get-docs-ip"/>
            <wsdl:input name="getDocsByOrgRegionRequest">
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output name="getDocsByOrgRegionResponse">
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="getDocSignaturesByUrl">
            <soap:operation soapAction="http://zakupki.gov.ru/fz44/queue/ws/get-docs-ip"/>
            <wsdl:input name="getDocSignaturesByUrlRequest">
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output name="getDocSignaturesByUrlResponse">
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="getNsi">
            <soap:operation soapAction="http://zakupki.gov.ru/fz44/queue/ws/get-docs-ip"/>
            <wsdl:input name="getNsiRequest">
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output name="getNsiResponse">
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="GetDocsIPFacadeService">
        <wsdl:port name="GetDocIPFacadePort" binding="ip:GetDocsIPFacadeBinding">
            <soap:address location="https://int44.zakupki.gov.ru/eis-integration/services/getDocsIP"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>
Показать
10. m1kll 7 12.02.25 11:08 Сейчас в теме
а это из 1с
HTTP/1.1 502 Fiddler - Connection Failed
Date: Wed, 12 Feb 2025 08:07:17 GMT
Content-Type: text/html; charset=UTF-8
Cache-Control: no-cache, must-revalidate
Timestamp: 18:07:17.766
Connection: close

[Fiddler] The connection to 'int44.zakupki.gov.ru' failed.
Error: TimedOut (0x274c).
System.Net.Sockets.SocketException Попытка установить соединение была безуспешной, т.к. от другого компьютера за требуемое время не получен нужный отклик, или было разорвано уже установленное соединение из-за неверного отклика уже подключенного компьютера.
13. m1kll 7 13.02.25 06:08 Сейчас в теме
Большое спасибо всем откликнувшимся, проблема действительно была в том, что работает только https-соединение
Оставьте свое сообщение

Для получения уведомлений об ответах подключите телеграм бот:
Инфостарт бот