Skip to content

All Generated Properties Are Optional #110

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

Open
jpbulman opened this issue Apr 3, 2025 · 0 comments
Open

All Generated Properties Are Optional #110

jpbulman opened this issue Apr 3, 2025 · 0 comments

Comments

@jpbulman
Copy link

jpbulman commented Apr 3, 2025

Today, all fields of a converted object are marked as optional. The client should only mark a type as optional if the corresponding WSDL entry is marked with minOccurs=0. This issue stems from this bit of code where the field for making the type optional is always set to true.

The fix for this might be a bit annoying, I started taking a look, but don't have the capacity to write up a full solution. When definition parsing begins, the SOAP library parts field gives a recursive list of all the children of the definition, which is great. However, it unfortunately does not give metadata of each child, so there's no way for parseDefinition to know at any point if a field has minOccurs=0 set. To get around this, it would probably make sense to have some sort of once-over scan of all elements and make a map from propName (or something like that) to a metadata string.

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

No branches or pull requests

1 participant