Programmatically create ROWebBrokerServer for TISAPIWebModule

I have successfully dropped a TROWebBrokerServer on a TISAPIWebModule and had it return data.
When I tried to create the same TROWebBrokerServer in code and set it’s parent to the TISAPIWebModule by passing in the TISAPIWebModule instance the TROWebBrokerServer would not return any data.
I double checked that all of the settings between were the same.

Why doesn’t the programmatically created server return data?

check TROWebBrokerServer.Loaded method - it performs some changes in TISAPIWebModule which aren’t made when you created it manually in runtime.