My goal is to have one single servlet that gets told the schemname/tablename
and then provides one odata service each, returning this table's data.
As I read the source code, it is using the servlet path as the odata root and
therefore this is not possible. Do you agree or do you have any suggestions?
My thoughts had been:
The obvious starting point would be to have a single service with multiple
entitysets, one entityset per database table. But the $metadata would be
enormous then, given there are 100'000 tables with 100 columns in average.
Hence this is not viable.
Having 100'000 servlets and adding more whenever a new table is created does
not make sense either.
Better to have
a) a single servlet at the path @WebServlet("/odata/*")
b) a check via the URI to get schema and table names. The request would look
like http://localhost/odata/schema1/table1.svc
c) a single Edm, Processor and Handler per table, generated using the database
table metadata
d) a Metadata request which looks like this:
http://localhost/odata/schema1/table1.svc$metadata
At the moment, when I request
http://localhost:8080/hanatest/odata/SYS/TABLES.svc/data$metadata the error
Cannot find EntitySet, Singleton, ActionImport or FunctionImport with name
'SYS'.
is shown. For obvious reasons.
Any ideas what needs to be done to shift the service root two levels down and
still have a single servlet only?
My current code is essentially modeled after
https://olingo.apache.org/doc/odata4/tutorials/read/tutorial_read.html
Thanks in advance