procedure
TFmMain
.
BitBtn2Click(Sender: TObject);
var
XMLDoc : TXMLDocument;
HTTP : THTTPSend;
FS: TFileStream;
s :
string
;
begin
try
Memo1
.
Clear;
XMLDoc := TXMLDocument
.
Create(Application);
with
XMLDoc
do
begin
Options := Options + [doNodeAutoIndent];
Active :=
True
;
Version :=
'1.0'
;
Encoding :=
'UTF-8'
;
with
AddChild(
'ns:Documents'
)
do
begin
Attributes[
'Version'
] :=
'1.0'
;
with
AddChild(
'ns:Owner'
)
do
ChildValues[
'ns:FSRAR_ID'
] :=
'020000616195'
;
with
AddChild(
'ns:Document'
)
do
with
AddChild(
'ns:QueryClients'
)
do
with
AddChild(
'qp:Parameters'
)
do
with
AddChild(
'qp:Parameter'
)
do
begin
ChildValues[
'qp:Name'
] :=
'ИНН'
;
ChildValues[
'qp:Value'
] :=
'6143063881'
;
end
;
SaveToFile(
'C:\temp\client.xml'
);
end
;
end
;
FS := TFileStream
.
Create(
'C:\temp\client.xml'
, fmOpenRead);
FS
.
Position :=
0
;
HTTP := THTTPSend
.
Create;
HTTP
.
Document
.
CopyFrom(FS, FS
.
Size);
begin
s := HTTP
.
ResultString+
':'
+IntToStr(HTTP
.
ResultCode);
ShowMessage(s);
Memo1
.
Lines
.
Add(s);
end
;
finally
FreeAndNil(XMLDoc);
end
;
end
;