(01-20-2024, 09:28 AM)staff@ergosoft.it Wrote: This is why I was asking if there is any example of a SOAP call with XML passing
all with indy.
Try something like this:
Code:
var
SoapURL, SoapReqXML, SoapRespXML: string;
PostData: TStringStream;
begin
SoapURL := 'https://testsegreteria.halleycih.com/WSURBIX/PI0/PIWSMAIN.HBL';
SoapReqXML := '<soapenv:Envelope ...>...</soapenv:Envelope>';
PostData := TStringStream.Create(SoapReqXML, TEncoding.UTF8);
try
IdHTTP1.Request.ContentType := 'text/xml';
IdHTTP1.Request.Charset := 'utf-8';
IdHTTP1.Request.CustomHeaders.Values['SOAPAction'] := '...';
SoapRespXML := IdHTTP1.Post(SoapURL, PostData);
finally
PostData.Free;
end;
// parse SoapRespXML as needed...
end;