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

Issue with Xml serialization #14

Closed
girishchandranc opened this issue Aug 1, 2023 · 8 comments · Fixed by #20
Closed

Issue with Xml serialization #14

girishchandranc opened this issue Aug 1, 2023 · 8 comments · Fixed by #20
Assignees

Comments

@girishchandranc
Copy link
Owner

girishchandranc commented Aug 1, 2023

The xml elements are created on the fly whenever the api's are used and this isn't ideal and could lead to schema violations. This needs a rework on the way xml is serialized.

@girishchandranc girishchandranc self-assigned this Aug 1, 2023
@girishchandranc
Copy link
Owner Author

Development ongoing in the branch 14-issue-with-xml-serialization.

@girishchandranc
Copy link
Owner Author

Hi @christianhecht86 ,
Could you please check and review the changes? Meanwhile, I will also try adding in some py tests for the fix.

Thanks!

@girishchandranc
Copy link
Owner Author

Hi @christianhecht86 ,
I fixed the issues reported by you. Have also added a couple of unit tests. Could you please check and review?
Thanks :)

@christianhecht86
Copy link
Collaborator

Hi @girishchandranc ,

unfortunately it solves not the entire issue. Please see my email.

Christian

@girishchandranc
Copy link
Owner Author

girishchandranc commented Sep 19, 2023

Hi @christianhecht86 ,
Fixed the issue reported via email. Can you check it again and let me know if that works for you.
Thanks again,
Girish

@christianhecht86
Copy link
Collaborator

Hi @girishchandranc ,

now it looks much better. Only two things...

  1. Schema error in CanNetwork.arxml Line 62 Column 50: Element '{http://autosar.org/schema/r4.0}CONTEXT-COMPONENT-REFS': This element is not expected. Expected is one of ( {http://autosar.org/schema/r4.0}CONTEXT-COMPONENT-REF, {http://autosar.org/schema/r4.0}TARGET-COMPONENT-REF ).

  2. different ordering of CONTEXT-COMPONENT-REF

code:
swcMap1.set_contextComposition(rootComp)
swcMap1.add_contextComponent(asw1_proto)
swcMap1.add_contextComponent(asw2_proto)

ARXML:

/Swcs/Comp/asw2_proto
/Swcs/Comp/asw1_proto

For some Lists, there should be a tagged value isOrdered="true" in the ecore definition. Here it is important to keep the ordering.

Christian

@girishchandranc
Copy link
Owner Author

Hi @christianhecht86 ,
Was able to fix the mentioned issues as well :) Basically, the tool wasn't properly handling the element of type "roleTypeWrapper".

Can you please check together with the issues you reported via email to see it the latest commit satisfies all the issues reported.

@christianhecht86
Copy link
Collaborator

Hi @girishchandranc ,

thank you for your hard work to fix the serialization issues. In current version my reported issues are solved.

So, from my point of view, you should merge it to master branch.

Christian

@girishchandranc girishchandranc linked a pull request Nov 17, 2023 that will close this issue
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants