HTTP/1.1 404 Not Found from .remoteRODL

When I try to use the .remoteRODL file to update the interface file in my client project I get a 404 not found error. Here are the details:
[51649A18]{IndyProtocols240.bpl} IdHTTP.CheckException (Line 2742, "IdHTTP.pas" + 40) + $47
[51649E57]{IndyProtocols240.bpl} IdHTTP.TIdHTTPProtocol.ProcessResponse (Line 2934, "IdHTTP.pas" + 145) + $1
[5164A398]{IndyProtocols240.bpl} IdHTTP.TIdCustomHTTP.DoRequest (Line 3065, "IdHTTP.pas" + 34) + $E
[5164A191]{IndyProtocols240.bpl} IdHTTP.TIdCustomHTTP.Get (Line 3023, "IdHTTP.pas" + 1) + $17
[516455F4]{IndyProtocols240.bpl} IdHTTP.TIdCustomHTTP.Get (Line 777, "IdHTTP.pas" + 1) + $D
[18155B73]{RemObjects_Indy_D24.bpl} Uroindyhttpchannel.TROIndyHTTPChannel.RetrieveMetadata + $63
[1A341931]{RemObjects_Core_D24.bpl} Uroremoterodlsupport.LoadRemoteRODL + $111
[1A34171A]{RemObjects_Core_D24.bpl} Uroremoterodlsupport.LoadRemoteRODLLibrary + $42
[1A07C58F]{RemObjects_IDE_D24.bpl} Uroiderodlsupport.ProcessRemoteRODL + $7B
[1A07D982]{RemObjects_IDE_D24.bpl} Uroidemenu.CreateRemoteRODL + $BCE
[1A434C65]{RemObjects_Everwood_D24.bpl} Uewotahelpers.TEWOTAProjectManagerMenu.Execute + $D
[20537E5A]{coreide240.bpl} ContainerIntf.TProjectManagerMenuItem.Click (Line 1110, "ContainerIntf.pas" + 18) + $22
[50BD41B4]{vcl240.bpl } Vcl.Menus.TMenu.DispatchCommand (Line 3482, "Vcl.Menus.pas" + 5) + $4
[50BD5426]{vcl240.bpl } Vcl.Menus.TPopupList.WndProc (Line 4643, "Vcl.Menus.pas" + 4) + $E
[50060148]{rtl240.bpl } System.TMonitor.CheckOwningThread (Line 18080, "System.pas" + 2) + $0
[50060456]{rtl240.bpl } System.TMonitor.Exit (Line 18270, "System.pas" + 1) + $2
[500604A7]{rtl240.bpl } System.TMonitor.Exit (Line 18292, "System.pas" + 2) + $7
[50A855B7]{vcl240.bpl } Vcl.Graphics.FreeMemoryContexts (Line 7056, "Vcl.Graphics.pas" + 12) + $8
[50AA7C9C]{vcl240.bpl } Vcl.Controls.TWinControl.MainWndProc (Line 9850, "Vcl.Controls.pas" + 3) + $6
[50BD5375]{vcl240.bpl } Vcl.Menus.TPopupList.MainWndProc (Line 4618, "Vcl.Menus.pas" + 2) + $5
[50170DFC]{rtl240.bpl } System.Classes.StdWndProc (Line 17187, "System.Classes.pas" + 8) + $0
[2150942B]{vclide240.bpl} IDEVirtualTrees.TVirtualTreeHintWindow.IsHintMsg (Line 7067, "IDEVirtualTrees.pas" + 7) + $13
[50BEEDE7]{vcl240.bpl } Vcl.Forms.TApplication.ProcessMessage (Line 10534, "Vcl.Forms.pas" + 23) + $1
[50BEEE2A]{vcl240.bpl } Vcl.Forms.TApplication.HandleMessage (Line 10564, "Vcl.Forms.pas" + 1) + $4
[50BEF15D]{vcl240.bpl } Vcl.Forms.TApplication.Run (Line 10702, "Vcl.Forms.pas" + 26) + $3

I can access this service with the Service Tester and browser. The server is an isapi dll. Why can’t the remoteRODL connect to update the interface file when I can connect with the Service Tester?

Do I have the right idea that the .remoteRODL file resides in the client and when clicked, calls out to the server, reads the server’s rodl file and then updates the client side interface file?

This mighty seem like a silly question, but are you 100% sure the URL in the .remoteRODL is correct? If you copy it out and paste it into Internet Explorer or browser of your choice, so you see your server’s RODL, or do you to get a 404 error?

This is what I put into the .remoteRODL and the browser both. http://localhost/ISAPITEST/ISAPITest.dll/bin
This is what comes out of the browser:
<?xml version="1.0" encoding="UTF-8"?> <Library Version="3.0" UID="{E8DE287D-8E1D-4D31-9E38-9B5E0EF92D9E}" Name="TestLibrary"> <Services> <Service UID="{AE68A238-9919-4581-91B4-7AECAB6ACCC8}" Name="TestService"> <Interfaces> <Interface UID="{780B7975-91AA-45E0-8214-7937C96C1ED0}" Name="Default"> <Operations> <Operation UID="{2ECEBB41-F1BB-488B-B316-DBB26B57B338}" Name="Sum"> <Parameters> <Parameter Name="Result" Flag="Result" DataType="Integer"> </Parameter> <Parameter Name="A" Flag="In" DataType="Integer"> </Parameter> <Parameter Name="B" Flag="In" DataType="Integer"> </Parameter> </Parameters> </Operation> <Operation UID="{F075F0C9-5B18-40C3-9894-3C3E8CBC9434}" Name="GetServerTime"> <Parameters> <Parameter Name="Result" Flag="Result" DataType="DateTime"> </Parameter> </Parameters> </Operation> <Operation UID="{13791418-54EC-413A-8EC1-B0A3869AE7BF}" Name="GetServerProcess"> <Parameters> <Parameter Name="Result" Flag="Result" DataType="WideString"> </Parameter> </Parameters> </Operation> <Operation UID="{BEBECC1F-741B-4851-BBC6-0D2707A954C1}" Name="HangServerThread"> <Parameters> <Parameter Name="timeInSeconds" Flag="In" DataType="Integer"> </Parameter> </Parameters> </Operation> </Operations> </Interface> </Interfaces> </Service> </Services> <Structs> </Structs> <Enums> </Enums> <Arrays> </Arrays> </Library>

Using that uri in the .remoteRODL file I get a 404 error. Does it matter That I created the .remoteRODL file by hand?
Here are the contents of it:
<?xml version="1.0" encoding="utf-8"?> <RemoteRodl> <Server> <Name>TestLibrary</Name> <ServerUri>http://localhost/ISAPITEST/ISAPITest.dll/bin</ServerUri> </Server> </RemoteRodl>

Looks good, assuming of course that localhost is also the machine you’re running the IDE on ;). i’ll need to ahvesokeone form the Remoting SDK have a look at this, tomorrow.

Yes, I am running the IDE on localhost.

Thanks, logged as bugs://78137

bugs://78137 got closed with status fixed.

Thx.
this issue is affected only to ISAPI servers.

pls update LoadRemoteRODL method in uRORemoteRODLSupport.pas

var
...
    ch := ROUrlSchemaParser.ChannelForUri(aServerURI);
    ch.TargetUri.Path := 'rodl';
    if ch = nil then raise Exception.CreateFmt('Suitable channel for %s protocol is not detected',[aServerUri.Protocol]);

with

var lst: TStringList; //updated
...
    ch := ROUrlSchemaParser.ChannelForUri(aServerURI);  //existed
    if ch = nil then raise Exception.CreateFmt('Suitable channel for %s protocol is not detected',[aServerUri.Protocol]);
    if pos('/', ch.TargetUri.Path) <> 0  then begin
      lst := TStringList.Create;
      try
        lst.Delimiter := '/';
        lst.DelimitedText := ch.TargetUri.Path;
        lst[lst.Count-1] := 'rodl';
        ch.TargetUri.Path := lst.DelimitedText;
      finally
        lst.Free;
      end;
    end
    else
      ch.TargetUri.Path := 'rodl';

and recompile packages from BuildPackages_D24.groupproj

Is this how it’s supposed to look? If it is I recompiled the .groupproj with a clean all and build all. Then I restarted the IDE but the problem still persists for the .remoteRODL file. However, I’m now able to import this rodl with the Service Builder, which I was not able to before.

function LoadRemoteRODL(aServerUri: TROUri): string;
var
  ch: TROTransportChannel;
  lMetadataReader:IROMetadataReader;
  str: TStringList;
  str2: TStream;
  b: TBytes;
  lst: TStringList;
begin
  Result := '';
  if AnsiSameText(aServerUri.Protocol,'file') then begin
    Str := TStringList.Create;
    try
      str.LoadFromFile(aServerUri.Host);
      Result := str.Text;
    finally
      str.Free;
    end;
  end
  else begin
    ch := ROUrlSchemaParser.ChannelForUri(aServerURI);
    ch.TargetUri.Path := 'rodl';
    if ch = nil then raise Exception.CreateFmt('Suitable channel for %s protocol is not detected',[aServerUri.Protocol]);
     if pos('/', ch.TargetUri.Path) <> 0  then begin
      lst := TStringList.Create;
      try
        lst.Delimiter := '/';
        lst.DelimitedText := ch.TargetUri.Path;
        lst[lst.Count-1] := 'rodl';
        ch.TargetUri.Path := lst.DelimitedText;
      finally
        lst.Free;
      end;
    end
    else
      ch.TargetUri.Path := 'rodl';

    try
      if Supports(ch,IROMetadataReader,lMetadataReader) then begin
        lMetadataReader.RetrieveMetadata(str2);
        try
          str2.Position := 0;
          SetLength(b, str2.Size);
          if str2.Size > 0  then str2.Read(b[0],str2.Size);
          Result := AnsiBytesToString(b);
        finally
          lMetadataReader := nil;
          str2.Free;
        end;
      end;
    finally
      ch.Free;
    end;
  end;
end;

you don’t remove one line:

ch := ROUrlSchemaParser.ChannelForUri(aServerURI);
ch.TargetUri.Path := 'rodl';  //<<<<<<<<<<<< this line should be deleted
if ch = nil then raise Exception.CreateFmt('Suitable channel for %s protocol is not detected',[aServerUri.Protocol]);
1 Like

You beat me to it with your quick response! Thanks! I had seen that after I posted and was in the process of removing that line and recompiling when you posted. That fixed it! Thanks again!