Why would the self-documenting feature not work?

Hi,

I’ve just noticed that the self-documenting feature of my server isn’t working. I used to be able to simply browse to the server address and port of the HTTP server channel and it would come up with the main page with the option to view the full documentation and a list of dispatchers etc.

Now it just comes up with “Invalid Page” and I have no idea what’s changed or broken. What should I check for this functionality to work correctly?

When I run the server in the IDE and try to access the main page in a browser, I get this error:

EROException: ‘Cannot load XML document. Reason: An invalid character was found in text content.’

Sounds like the embedded RODL is broken.

That doesn’t sound good :frowning:

Everything else appears to work fine. How can I check/fix the RODL?

Does the RODL open in Service Builder ok?

Can you attach your RODL here or drop to support@, pls?
we will review what is wrong.

pls specify your ROD version. it can be found in ROVersion.inc

Yes it does, although if I run a validate it comes up with quite a few warnings and errors - I’m guess those are the problem and should be fixed?

agree - errors should be fixed

Ok let me deal with that first and see if that cures the problem.

Hmm, there are a few warnings about invalid identifiers which are reserved words in Delphi or C++ builder but I don’t think these are causing any problems, especially as one is within the RO code itself.

I then have a load of “Duplicate Name” errors which appear to be regarding sub-group names as have a group called “Events” under each of my top-level group names. That wouldn’t cause a problem though would it?

EDIT: I just changed all the group names to remove the errors, just leaving a couple of the identifier warnings and it still doesn’t work I’m afraid.

you can ignore errors related to groups.
these groups have no influence to logic and just added for your convenience.

can you specify your delphi version? (unicode/non-unicode)

You may have some umlaut or other special character in your documentation. it was a reason why I asked for your RODL and version of RO

Using 10.2 Tokyo - I’ll drop the RODL to support@, bear with

can you specify your ROD version?

your RODL works for me w/o any problem. I’ve used http://localhost:8099/doc

I’m using 9.2.101.1295

How can I test the RODL in isolation like you’ve just done?

I just created a new RO VCL server and replaced NewLibrary.RODL in .dpr with your RODL.
after it, I’ve just rebuilt this project and launched it.

We have fixed similar issue some time ago. latest RTM (9.3) should generate correct documentation page.

Ok I’ll try upgrading and see if that helps

Ok I’ve upgraded to 9.3

The goods news is that it’s fixed the documentation page issue, thanks for that.

The bad news is I have another slight issue. I was using the Stream_ReadStringWithLength function in a handler of mine. This was declared in uROBinaryHelpers.pas and simply called Stream_ReadUTF8StringWithLength in uROBinMessage.pas.

It appears the main function in uROBinMessage.pas has been renamed to Stream_ReadStringAsUTF8WithLength which isn’t a problem per se, but I can’t get at this directly and the helper function I was calling previously has been removed from uROBinaryHelpers.pas for some reason.

Is there any way round this other than changing your code to add it back into the helpers file?

Stream_ReadStringAsUTF8WithLength was moved to implementation section of uROBinMessage.pas because it was used only here.
as a workaround, you can just copy it’s content to your code.

Ok I now have an utterly bizarre scenario whereby it only seems to work when running on my computer.

If my server is run on my computer then the documentation works, whether accessed locally or remotely.
If the same executable is run on another machine, it produces the Invalid Page error, whether run locally or remotely.

What on earth?! Has it somehow become bound to my computer name? I’m at a loss here.

Could this be a locale problem, of the RODL is in ASCII format and not UTF8, and the system locale differs between you computer and the server? Just guessing…