OData Dispatcher questions

These tests are with the Delphi version of DA. I’d like the project to be modular. Can I have ODATA dispatchers on each service module that share the same /odata path? I haven’t been able to get that to work. I have to place all of the dispatchers on the server data module, assign the service they’ll provide access to, and then provide different paths. This isn’t very plugin friendly if I can’t do what I’m trying to do, though. I’d like one path (/odata/) and have any service module share that path whether they’re in the primary product or in add on modules.

Is there a way to accomplish this?

Hello,

Sorry for belated answer.

You can’t do what you want. ODataDispatcher should be placed near the HTTP server component. Each odata component is registered inside ROHTTPServer as ExtendedDispatchers when odata.Server is set, also odata creates DAService_impl instance during processing user request so it is a reason why it can’t be placed inside _impl.

Best regards

So how would you recommend making a project more modular? Particularly one that’s plugin-friendly?

Hello,

You could try to do the following: create method at the host CreateODataDispatcher with a primary initialization like assigning server component, etc. Call this method from your plugins and perform additional actions if they are needed.

Best regards

My apologies. I hadn’t seen that you asked me to do something until just now. I’ll give it a try tonight.