on 04-14-2015 3:35 PM
Hey Guys,
I want to create a OData or JSON "Monitoring Service" (Using the internal Views in SCHEMA "SYS"). I created a User with all possible Authorizations...
My hello.xsodata looks like this:
service {
"SYS::M_SYSTEM_OVERVIEW";
}
But I get some activation errors:
Description Resource Path Location Type
[40136] Unknown object name "SYS::M_SYSTEM_OVERVIEW". test.xsodata
and
TestOData:systemview.hdbschema Schema name SYS is not equal to object name systemview. Please delete the object and create a new one that matches the schema name. Do not change the schema name in this object.
My systemview.hdbschema looks like that:
schema_name="SYS";
Is there anybody out there, help me sing my song ?!
Thanks and best regards
Daniel
>My systemview.hdbschema looks like that:
> schema_name="SYS";
hdbschema is for creating a new schema. SYS is an existing standard schema, why would you need to create it?
>My hello.xsodata looks like this:
> service {
> "SYS::M_SYSTEM_OVERVIEW";
> }
Your syntax is wrong. The :: is the separate between a namespace and a table. You have a schema and a table. There the separator should be a period. Plus this is a view so you will manually have to specific the keys.
Here is the correct syntax:
service {
"SYS"."M_SYSTEM_OVERVIEW" keys("SECTION","NAME");
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas,
Thanks for your reply.
I have to admit, I am completely new to develop OData stuff (in general developing WebServices or something similar - Therefore OS Level scripting work really good ). I thought the Engine needs to know what schema is needed, this was my misunderstanding of the definition file.
My thinking was that this is defined by *.hdbschema... But japp your explanation does make sense
OK now there are no errors by activating this files...
Output is now:
<service xml:base="http://host:8011/TestOData/hello.xsodata/">
<workspace>
<atom:title>Default</atom:title>
<collection href="M_SYSTEM_OVERVIEW">
<atom:title>M_SYSTEM_OVERVIEW</atom:title>
</collection>
</workspace>
</service>
So again for the n00b... How do I get some data out of this service via URL respectively WebBrowser?
Second question: Is it possible to set more than one view in this Service (if this makes sense at all...)?
Thanks a lot
Daniel
>So again for the n00b... How do I get some data out of this service via URL respectively WebBrowser?
Just add the entity name to the end of the URL.
>Second question: Is it possible to set more than one view in this Service (if this makes sense at all...)?
Sure, just define multiple entities in your XSODATA file.
You will find more details on these basic questions in the online help:
Hi Thomas,
japp I already had a look to the dev guide... and did a "rebuild" of the examples in this pdf. But someone has to build me a bridge so that I can understand what happened here.
I call the URL http://host:8011/TestOData/hello.xsodata/systemoverview
And I get this output:
What I expected:
best regards
Daniel
The default format for OData is Atom+XML which the browser is showing as an RSS feed.
Look at the raw response, change the browser settings to display not as RSS or use Chrome if you want to see the data directly.
You can also use the URL parameter $format=json to get the data back in JSON format instead of Atom+XML.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.