I am working on a RO (IndyHTTP channel) multi-message Delphi server. I am looking for a way to control the URL the server monitors. I don’t want the default of http://localhost:8099/soap.
// ROSOAPMessage should be drop to form
// '/v1/soap' string shouldn't be registered in `ROIndyHTTPServer1.Dispatchers`
procedure TMegaDemoServerMainForm.ROIndyHTTPServer1CustomResponseEvent(const aTransport: IROHTTPTransport;
const aRequestStream, aResponseStream: TStream; const aResponse: IROHTTPResponse; var aHandled: Boolean);
var
op: TROResponseOptions;
begin
if AnsiSameText(aTransport.PathInfo,'/v1/soap') then begin
MainProcessMessage(ROSOAPMessage,atransport,aRequestStream,aResponseStream,op);
aHandled := True;
end;
end;
I like that suggestion better, but it doesn’t work. I set the Path Info to V1/SOAP for the SOAPMessage in the server’s message Dispatchers and removed the CustomResponseEvent handler. With that config, the server returns an Invalid Path error for all requests directed to V1/SOAP.