Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write operation omits known object type #14

Open
fl-ma opened this issue Aug 23, 2018 · 3 comments
Open

Write operation omits known object type #14

fl-ma opened this issue Aug 23, 2018 · 3 comments
Assignees
Labels
developer webapp Related to O-MI test web client enhancement

Comments

@fl-ma
Copy link

fl-ma commented Aug 23, 2018

Selecting an object in the web UI's tree and performing a read-operation returns this output
<omiEnvelope xmlns="http://www.opengroup.org/xsd/omi/1.0/" version="1.0" ttl="0"> <read msgformat="odf"> <msg> <Objects xmlns="http://www.opengroup.org/xsd/odf/1.0/"> <Object> <id>ParkingService</id> <Object> <id>ParkingFacilities</id> <Object> <id>BMW Research and Technology House</id> </Object> </Object> </Object> </Objects> </msg> </read> </omiEnvelope>

Object "BMW Research and Technology House" is of type mv=ParkingFacility, this is not returned by read-operation. This leads to problems when using this data for later write-operations.

Tested with version 1.0.4

@TK009 TK009 added the developer webapp Related to O-MI test web client label Aug 23, 2018
@TK009
Copy link
Contributor

TK009 commented Aug 23, 2018

This xml that you have given is only the request. You should press Send to get the data, including the type.

@fl-ma
Copy link
Author

fl-ma commented Aug 23, 2018

sorry, meant to post a write example.

when I want to update an InfoItem, I select it and click on "write". This returns this:
<omiEnvelope xmlns="http://www.opengroup.org/xsd/omi/1.0/" version="1.0" ttl="0"> <write msgformat="odf"> <msg> <Objects xmlns="http://www.opengroup.org/xsd/odf/1.0/"> <Object> <id>ParkingService</id> <Object> <id>ParkingFacilities</id> <Object> <id>BMW second facility</id> <InfoItem name="numberOfOccupiedParkingSpots"> <value>VALUE_PLACEHOLDER</value> </InfoItem> </Object> </Object> </Object> </Objects> </msg> </write> </omiEnvelope>

As a user I would expect that I only have to change VALUE_PLACEHOLDER, but sending it then results in this:
<omiEnvelope ttl="10" version="1.0" xmlns="http://www.opengroup.org/xsd/omi/1.0/"> <response> <result> <return description="Invalid request: Only Object with type mv:ParkingFacility are allowed as childs of Objects/ParkingService/ParkingFacilities." returnCode="400"> </return> </result> </response> </omiEnvelope>

So my expectation would be, that the generated coding is syntactically correct.
Not a major thing though.

@TK009
Copy link
Contributor

TK009 commented Aug 23, 2018

Yes right, the error comes from the checks of the parking service agent, which are more strict than O-DF standard, but it might be useful feature to add the type automatically if it exists already.

@TK009 TK009 changed the title Read operation omits object type Write operation omits known object type Aug 23, 2018
@TK009 TK009 self-assigned this Aug 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer webapp Related to O-MI test web client enhancement
Projects
None yet
Development

No branches or pull requests

2 participants