Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SOAP and Indy
#6
(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;

Reply


Messages In This Thread
SOAP and Indy - by staff@ergosoft.it - 01-19-2024, 04:01 PM
RE: SOAP and Indy - by rlebeau - 01-19-2024, 04:43 PM
RE: SOAP and Indy - by staff@ergosoft.it - 01-19-2024, 04:52 PM
RE: SOAP and Indy - by Robert Gilland - 01-19-2024, 10:58 PM
RE: SOAP and Indy - by staff@ergosoft.it - 01-20-2024, 09:28 AM
RE: SOAP and Indy - by rlebeau - 01-20-2024, 07:14 PM
RE: SOAP and Indy - by staff@ergosoft.it - 01-22-2024, 09:56 AM
RE: SOAP and Indy - by staff@ergosoft.it - 02-05-2024, 08:18 AM
RE: SOAP and Indy - by staff@ergosoft.it - 02-05-2024, 05:27 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)