0

While using Inno Setup to create an installer a need as arisen to verify a user's credentials during the installation process. The application has been out in production for a while and the only need to move to an installer is due to support for NPAPI within web browsers being deprecated. There is already a way that the application verifies a user's credentials before launching the application that I'm trying to take advantage of, which is through a SOAP request. The verification process is just not making sure the user is authorized but also assigning them a token that prevents their information from having to be sent multiple times during the running of the application.

My question, is there a way to make the SOAP request to verify a user's credentials through during the installation process? If so, how would this be accomplished?

S S
  • 5
  • 3

1 Answers1

0

SOAP is just an XML over HTTP.

So you can use the WinHttpRequest class:

WinHttpReq := CreateOleObject('WinHttp.WinHttpRequest.5.1');
WinHttpReq.Open('GET', 'http://soapserver.example.com/', False);
WinHttpReq.SetRequestHeader('Content-Type', 'application/soap+xml;charset=UTF-8');
WinHttpReq.SetRequestHeader('SOAPAction', '...');
WinHttpReq.Send('<data/>');
{ WinHttpReq.ResponseText will hold the SOAP response }

See also HTTP POST request in Inno Setup Script.


To parse the SOAP response, you can use the Msxml2.DOMDocument class:

How to read and write XML document node values?

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992