Closed S-Gaertner closed 9 years ago
The trouble with this argument is that its very difficult to be correct here, because its entirely possible you don't know the complete set when generating. If it is set to Element for the operation definition then in theory every type should be possible. That would be a big array.
I think this is something that should be examined as part of the Java API update. Could you raise a RID on it.
But I'm happy to fill it in for Attribute. I'll see what I can do.
Yes, I can see the issue there and will raise a RID on the Java API.
Luckily I don't need this functionality except for the one case in which it correctly returns the attribute types for MAL::Attribute. There is no other way to detect if a declared abstract type for a MAL message body element is an Element or an Attribute. I guess that would be another RID for the Java API. Without this functionality one of the SPP binding clauses cannot be implemented in the framework of the Java API and thus will fail the test. In this case David would probably change the specification to something with more overhead which is a solution I'd like to avoid if possible.
Can you check the latest commit and see if that fixes it?
The problem is fixed partly. It works if the element has been declared MAL::Attribute. But if the element has been declared ListlastElementShortForms
also contains the Attribute short forms instead of their list type counterparts. Please either provide the possible list type short forms or return an empty list.
Try now
Now it works as expected. Thank you!
According to Table 3-22 MAL Java API
lastElementShortForms
parameter of theMALOperationStage
constructor contains the short forms of the types that can be used for the last element of the message body in case of polymorphism.However, the generated code seems to always pass an empty array when constructing
MALOperationStage
objects.As an example see definition of
TESTMALATTRIBUTE_OP
field inorg.ccsds.moims.mo.malprototype.datatest.DataTestHelper
(line 355) that is generated from theMALPrototype.xml
service definition.If correcting this proves difficult, I would already be happy if
lastElementShortForms
contains all the attribute type short forms in case the MAL message body element is declared as MAL::Attribute, even if it is left empty in all other cases.