ñåòè, è â òîì ÷èñëå íà ýòîì ñàéòå, ìíîãî òåì ïî ýòîìó ïîâîäó. Ñîäåðæèìîå áîëüøèíñòâà èç íèõ ãðîìîçäêè è çàïóòàííû.  ÷èñëå ïðî÷åãî óïîìèíàåòñÿ êîäèðîâêà îòïðàâëÿåìûõ äàííûõ â Base64, èñïîëüçîâàíèå ðàçäåëèòåëåé äëÿ îòïðàâêè ðàçëè÷íûõ äàííûõ â îäíîì çàïðîñå è ò.ä.  ïðèëàãàåìîé îáðàáîòêå âñå óïðîùåíî äî ìèíèìóìà è "äåáðè" íå ðàññìàòðèâàþòñÿ. Ïðåäíàçíà÷åíà äëÿ èñïîëüçîâàíèÿ â êà÷åñòâå óíèâåðñàëüíîé áîëâàíêè äëÿ ðåàëèçàöèè áîëåå ñëîæíîãî ôóíêöèîíàëà.  êà÷åñòâå ïðèìåðà èñïîëüçóåòñÿ ñåðâèñ îáùåèçâåñòíîé òðàíñïîðòíîé êîìïàíèè.  ïîñò-çàïðîñå îïðàâëÿåòñÿ íîìåð íàêëàäíîé, â îòâåò âîçâðàùàåòñÿ xml ñ èíôîðìàöèåé î å¸ ñîñòîÿíèè. Íà ñêðèí-øîòå ðåàëüíàÿ íàêëàäíàÿ (ñïàñèáî ãóãëó) íà êîòîðîé òåñòèðîâàë ðàáîòîñïîñîáíîñòü.
Êà÷àòü âñå íå îáÿçàòåëüíî, âûêëàäûâàþ âåñü êîä ìîäóëÿ ôîðìû:
Ïðîöåäóðà ÊíîïêàÂûïîëíèòüÍàæàòèå(Êíîïêà)
Ïîïûòêà
WinHttp = Íîâûé COMÎáúåêò("WinHttp.WinHttpRequest.5.1");
WinHttp.Option(2,"utf-8");
WinHttp.Open("POST","http://public.services.dellin.ru/tracker/XML/",0);
WinHttp.SetRequestHeader("Accept-Language", "ru");
WinHttp.SetRequestHeader("Accept-Charset","utf-8");
WinHttp.setRequestHeader("Content-Language", "ru");
WinHttp.setRequestHeader("Content-Charset", "utf-8");
WinHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded; charset=utf-8");
ÏàðàìåòðûÏÎÑÒ = "rwID=" + ÑîêðËÏ(ÍîìåðÍàêëàäíîé);
WinHttp.Send(ÏàðàìåòðûÏÎÑÒ);
ÒåêñòÎòâåòà = WinHttp.ResponseText();
Èñêëþ÷åíèå
Ñîîáùèòü(ÎïèñàíèåÎøèáêè());
ÊîíåöÏîïûòêè;
ÊîíåöÏðîöåäóðû
Ãäå "ÍîìåðÍàêëàäíîé" - ýòî ñòðîêîâîå ïîëå ââîäà íà ôîðìå, êóäà ââîäèòå íîìåð íàêëàäíîé (íàïðèìåð, Ñþ-00090170085), à "ÒåêñòÎòâåòà" - ýòî ìíîãîñòðî÷íîå ñòðîêîâîå ïîëå, êóäà âûâîäèì ðåçóëüòàò.
Ïîñëå êîììåíòàðèÿ Den_D ðåøèë äîáàâèòü òîæå ñàìîå, òîëüêî âñòðîåííûìè ñðåäñòâàìè. Îáðàòèòå âíèìàíèå íà àìïåðñàíä ïåðåä ïàðàìåòðîì - ñýêîíîìèòå âðåìÿ è íåðâû. Ýòî îáû÷íàÿ "îñîáåííîñòü" 1Ñ, êîòîðàÿ ðåøèëà ÷òî íåâàæíî ñêîëüêî ó âàñ òàì ïàðàìåòðîâ - ñòàâüòå àìïåðñàíä ÂÑÅÃÄÀ èáî ìû òàê õîòèì.
Îáðàáîòêó îáíîâèë.
Íó è êîä äëÿ íåæåëàþùèõ êà÷àòü âûêëàäûâàþ. Íàäåþñü ïðè ýòîì íà âàøó ñîöèàëüíóþ "ïëþñîîòâåòñòâåííîñòü".
Ïðîöåäóðà ÎñíîâíûåÄåéñòâèÿÔîðìûÂûïîëíèòü2(Êíîïêà)
Ñåðâåð = "public.services.dellin.ru";
Ðåñóðñ = "/tracker/XML/";
HTTP = Íîâûé HTTPÑîåäèíåíèå(Ñåðâåð);
ÔàéëÇàïðîñà = Ïîëó÷èòüÈìÿÂðåìåííîãîÔàéëà();
ÒåêñòîâûéÔàéë = Íîâûé ÒåêñòîâûéÄîêóìåíò;
ÒåêñòîâûéÔàéë.ÓñòàíîâèòüÒåêñò("&rwID=" + ÑîêðËÏ(ÍîìåðÍàêëàäíîé));
ÒåêñòîâûéÔàéë.Çàïèñàòü(ÔàéëÇàïðîñà, ÊîäèðîâêàÒåêñòà.UTF8);
ÔàéëÐåçóëüòàòà = Ïîëó÷èòüÈìÿÂðåìåííîãîÔàéëà();
ÇàãîëîâîêHTTP = Íîâûé Ñîîòâåòñòâèå();
ÇàãîëîâîêHTTP.Âñòàâèòü("Content-Type", "application/x-www-form-urlencoded");
ÇàãîëîâîêHTTP.Âñòàâèòü("Accept-Language", "ru");
ÇàãîëîâîêHTTP.Âñòàâèòü("Accept-Charset", "utf-8");
ÇàãîëîâîêHTTP.Âñòàâèòü("Content-Language", "ru");
ÇàãîëîâîêHTTP.Âñòàâèòü("Content-Charset", "utf-8");
HTTP.ÎòïðàâèòüÄëÿÎáðàáîòêè(ÔàéëÇàïðîñà, Ðåñóðñ, ÔàéëÐåçóëüòàòà, ÇàãîëîâîêHTTP);
Îòâåò = Íîâûé ÒåêñòîâûéÄîêóìåíò();
Îòâåò.Ïðî÷èòàòü(ÔàéëÐåçóëüòàòà, ÊîäèðîâêàÒåêñòà.UTF8);
ÒåêñòÎòâåòà = Îòâåò.Ïîëó÷èòüÒåêñò();
ÓäàëèòüÔàéëû(ÔàéëÇàïðîñà);
ÓäàëèòüÔàéëû(ÔàéëÐåçóëüòàòà);
ÊîíåöÏðîöåäóðû
Èñêëþ÷åíèÿ áûëî ëåíü ïèñàòü... Íî ðàáîòîñïîñîáíîñòü ïðîâåðÿë.