I imported some wsdl for the project. I want to change SoapRequest to the HttpRio onBeforeExecute event, but as I changed the request, I get some errors, how can I change the XML request file with the stringReplace function in this event.
I tried to resize the stream, I changed the encoding, etc., but in any case, it did not work.
Example
procedure TForm1.RiomBeforeExecute(const MethodName: string; SOAPRequest: TStream); var sTmp : TStringList; begin sTmp:=TStringList.Create; SOAPRequest.Position := 0; sTmp.LoadFromStream(SOAPRequest); sTmp.Text := StringReplace(sTmp.Text,'blablaa','bla',[RfReplaceAll]); sTmp.SaveToStream(SOAPRequest);
source share