uROSoapMessage issue (rel. 1517)

Hello,

starting 1517 release, there is inconspicuous but painful error… inside TROSOAPMessage.Initialize method, at line 277, setting Http_Headers.Values property raises EStringListError, due to Http_Headers instance is created as Sorted… in this mode writing to “Values” property is prohibited. As a result of this issue, TROSoapMessage is currently unusable at all.

Regards from Prague, Jan

Logged as bugs://D19140.

Hi,

you are right.
pls update uROMessage.pas as

function TROMessage.Http_Headers: TStringList;
begin
  if fHttpHeaders = nil then begin
    fHttpHeaders := TStringList.Create;
  end;
  Result := fHttpHeaders;
end;

bugs://D19140 was closed as fixed.

Hi Evgeny, thanks for response, I’d temporary fix it in this manner:

procedure TROSOAPMessage.Initialize(const aTransport : IROTransport; const anInterfaceName, aMessageName: string; aType: TMessageType);
var
  lInterfaceName,
  lMessageName: String;
  i: integer;
begin
..
  if (fSoapAction = '') and (not fActionIsCustom) then begin
    fSoapAction := Format('urn:%s-%s#%s', [LibraryName, anInterfaceName, aMessageName]);
    Http_Headers.Sorted:= FALSE;
    Http_Headers.Values['SOAPAction'] := '"'+fSoapAction +'"';
    Http_Headers.Sorted:= TRUE;
  end;
..
end;

Are You sure that “Sorted” state of “Http_Headers” is unimportant and can be ignored…? If so… Your fix is better… more efficient, agree…

Regards from Prague, Jan

Hi,

in general, I expect up to 5 values in this list, so it can work w/o sorting